Halcompile Setup

More
22 Feb 2020 13:23 - 22 Feb 2020 13:25 #158205 by Aciera
Halcompile Setup was created by Aciera
I am trying to modify genserkins.c and then use halcompile to try it with my LinuxCNC configuration.
I'm on Debian 9 and have linuxcnc-uspace and linuxcnc-uspace-dev 2.9.0 pre0.1048 installed. To try out dgarret switchkins I have a RIP install in my home directory that is linked to his git repository.

So I tried this in the Run in Place Installation (in my home directory ~/linuxcnc-dev/src/emc/kinematics):

1. Copied genser-switchkin and renamed it genser-switchkin-theta

2. halcompile --install genser-switchkins-theta.c (no changes have been made to the code)
Warning: Spoiler!

So I get this warning but it seems to create the .so file

3. Change the kinematics in the .hal file
Warning: Spoiler!

4. run the LinuxCNC configuration: ~/linuxcnc-dev/configs/sim/axis/vismach/melfa$ linuxcnc melfa-switchkins.ini
Warning: Spoiler!



/home/user/linuxcnc_print.txt:
Warning: Spoiler!


/home/user/linuxcnc_debug.txt:
Warning: Spoiler!


I get this error about an undefined symbol: go_matrix_vector_mult in genser-switchkins-theta.so
Can anybody give me a hint how to get this to work, please?
Last edit: 22 Feb 2020 13:25 by Aciera. Reason: wording

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

More
22 Feb 2020 14:25 #158208 by dgarrett
Replied by dgarrett on topic Halcompile Setup

genser-switchkins-theta.c:631:1: warning: the frame size of 4704 bytes is larger than 2560 bytes [-Wframe-larger-than=]
} // genserKinematicsInverse()


Above is a *warning* and can (probably) be ignored.
See old (2010) discussion:
www.mail-archive.com/emc-developers@list...ge.net/msg03790.html


genser-switchkins-theta: dlopen /home/user/linuxcnc-dev/rtlib/genser-switchkins-theta.so: undefined symbol: go_matrix_vector_mult


Above is a linker error. Halcompile is not designed for kins
modules that require additional libraries like the ones
specified in src/Makefile for genser-switchkins. Makefile
excerpts:
obj-m += genser-switchkins.o
genser-switchkins-objs := emc/kinematics/genser-switchkins.o
genser-switchkins-objs += libnml/posemath/gomath.o
genser-switchkins-objs += libnml/posemath/sincos.o $(MATHSTUB)
genser-switchkins-objs += emc/kinematics/kins_util.o
...
../rtlib/genser-switchkins$(MODULE_EXT): $(addprefix objects/rt,$(genser-switchkins-objs))

You could use the clever method suggested here:
www.mail-archive.com/emc-developers@list...ge.net/msg17951.html

But it may be simpler to modify src/Makefile to add special
kinematics (as in the excerpts above) and build
(run-in-place) as usual.
The following user(s) said Thank You: Aciera

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

Time to create page: 0.066 seconds
Powered by Kunena Forum