Bipod setup

More
28 Sep 2010 16:57 #4394 by andypugh
step4linux wrote:

I

/tmp/tmpV8rQEs/dualbipod.c:175: error: ‘HAL_SUCCESS’ undeclared (first use in this function)
This symbol was in 8.04 in a header file, now its missing or moved.


It is no longer used and was removed in this patch:
git.linuxcnc.org/gitweb?p=emc2.git;a=com...327a5d5047eb306335a7
As dualbipod is not a distributed part of EMC2 it was not patched, presumably.
Using zero or checking for a negative returned value should work.

Please Log in or Create an account to join the conversation.

More
28 Sep 2010 19:40 #4398 by step4linux
I use line like this one:
if((res = hal_param_float_new("dualbipod2.D01", HAL_RW, &halXY->dist, comp_id)) != HAL_SUCCESS) goto error;

They are for sure derived from another kinetics module.
So it should look this I guess:
if((res = hal_param_float_new("dualbipod2.D01", HAL_RW, &halXY->dist, comp_id)) != 0) goto error;

Gerd

Please Log in or Create an account to join the conversation.

More
28 Sep 2010 20:30 #4401 by andypugh
step4linux wrote:

I use line like this one:

if((res = hal_param_float_new("dualbipod2.D01", HAL_RW, &halXY->dist, comp_id)) != 0) goto error;

All the other examples I saw used:
if((res = hal_param_float_new("dualbipod2.D01", HAL_RW, &halXY->dist, comp_id)) < 0) goto error;
As all error returns are negative numbers.

Please Log in or Create an account to join the conversation.

More
29 Sep 2010 05:53 #4406 by step4linux
ok Andy, I think this is acceptable.

I did some more quick tests and I confirm:

If the path name from where you start comp contains blanks, comp fails. Not a big thing, but good to know. Maybe some expert can look at scripts and makefiles how to solve that. This is also in my old 8.04/2.3 system.

With above mentioned mods, comp finishes with warnings:
WARNING: "hal_init" [/tmp/tmpFFENKL/dualbipod.ko] undefined!
WARNING: "hal_exit" [/tmp/tmpFFENKL/dualbipod.ko] undefined!
WARNING: "hal_malloc" [/tmp/tmpFFENKL/dualbipod.ko] undefined!
WARNING: "hal_param_float_new" [/tmp/tmpFFENKL/dualbipod.ko] undefined!
WARNING: "hal_ready" [/tmp/tmpFFENKL/dualbipod.ko] undefined!

This is in 8.04/2.3 as well as in 10.04/2.4.
I ignored it up to now and it worked perfect in the old 8.04/2.3 system.
I could not test it in 10.04/2.4, but I think Wolfgang did and confirmed it works.

Gerd

Please Log in or Create an account to join the conversation.

More
29 Sep 2010 09:17 #4407 by dab77
Replied by dab77 on topic Re:Bipod setup x and y wrong
i remember this issue from older linux distributions, since those days i always avoid using blank spaces in files and folders names in linux (and also on windows..)

Please Log in or Create an account to join the conversation.

More
29 Sep 2010 10:07 #4409 by andypugh
step4linux wrote:

With above mentioned mods, comp finishes with warnings:

WARNING: "hal_init" [/tmp/tmpFFENKL/dualbipod.ko] undefined!
WARNING: "hal_exit" [/tmp/tmpFFENKL/dualbipod.ko] undefined!
WARNING: "hal_malloc" [/tmp/tmpFFENKL/dualbipod.ko] undefined!
WARNING: "hal_param_float_new" [/tmp/tmpFFENKL/dualbipod.ko] undefined!
WARNING: "hal_ready" [/tmp/tmpFFENKL/dualbipod.ko] undefined!


I have just got used to ignoring those. I see them sometimes when compiling the whole tree, not just with "comp"
The functions are defined in hal.h, so might disappear if that is put in the includes.

Please Log in or Create an account to join the conversation.

More
29 Sep 2010 13:36 #4414 by step4linux
hal.h is included.
First lines of code:
#include "kinematics.h"		/* these decls */
#include "rtapi_math.h"

#include "hal.h"

Please Log in or Create an account to join the conversation.

More
30 Sep 2010 12:58 #4438 by Schnitti
Hi there,

after heavy googleing and testing.

My proposal for getting out of this sandpit ist following:

1.) the emc2 modules do not have a Modules.symvers file. This file holds the dependencies of extern defined functions.
2.) the rtai modules do have this file.

So to get it work to check dependencies to avoid the above mentioned warnings, we must have a Modules.symvers file too for emc modules.

This is a little more work to do. And when we want to do it, then we should correct the whole things for modules, like not living in standard kernel trees.

Advice from kernel.org is to use

/lib/modules/kernel-vers/extra/rtai and ../emc

My proposal is to use

/lib/modules/kernel-vers/extra/emc
/lib/modules/kernel-vers/extra/rtai

The next point is, if we do so:

The kernel Makefile syntax for external modules was changed, this is not dramatically but we can write it shorter in our template.

New line for rtai modules would be:

$(MAKE) -C $(KERNELDIR) M=$(RTAIMOD) O=$(RTAIMOD)

with

RTAIMOD := /lib/modules/linux-2.6.32-122-rtai/modules/extra/rtai
KERNELDIR := /usr/src/linux-headers-2-6-32-rtai

and for emc modules:

$(MAKE) -C $(KERNELDIR) M=$(EMCMOD) O=$(EMCMOD)

with

EMCMOD := /lib/modules/linux-2.6.32-122-rtai/modules/extra/emc
KERNELDIR := /usr/src/linux-headers-2-6-32-rtai

If we do it in this way, the O=.... can be omitted.

In former times you have to use KERNEL_EXTMOD Variable for something like that.

Or, if do NOT want this, we should generate at least the Modules.symvers file for emc modules.

Kind Regards

Wolfgang

Please Log in or Create an account to join the conversation.

More
07 Oct 2010 06:40 #4553 by benehuber
Hi Guys,

Now I'm a little bit confused, sorry. Is it now possible to compile bipod.c (from code.google.com/p/emc2hotwinch/ )or not? And if yes, can someone to this for me ;)
Or are there still problems to do comp with 10.04 and 2.4.4?

regards

Please Log in or Create an account to join the conversation.

More
07 Oct 2010 12:33 #4557 by BigJohnT
I'm sure that I don't understand your question(s).

Comp is a program that creates HAL components and it works fine.

What are you attempting to do?

John

Please Log in or Create an account to join the conversation.

Time to create page: 0.110 seconds
Powered by Kunena Forum