On 1/12/2018 8:29 AM, 'fishy' via Machinekit wrote: > > > I am a machinekit newbie so please make allowances for any stupidty I may > show in this question. > > I want to play with kinematics and trajectory planning(I have no real > experience or knowledge in the field but would like to learn) > > I have looked at the src in src/emc/kinematics (tp) and made copies out of > tree to play with. > > I have done this with low level drivers and use 'comp --install' to compile > c code out of tree and it installs and runs fine when added into a hal > config. > > But I try this with kinematics and tp e.g. > > 'bin/comp --install pathtonewtp/tp.c' -----> syntax error in VERSION script > 'bin/comp --install pathtonewtp/tpmain.c' -------> compiles fine but > missing required symbols when module is loaded into hal > 'bin/comp --install pathtonewkinematics/genserkins.c' -------> compiles > fine but missing required symbols when module is loaded into hal > > So my question how can I get 'comp' to link in objectfiles and shared libs > so that the modules will load?
comp really isn't meant to be used for complex HAL modules like the trajectory planner, hostmot2 driver, etc. You're better off adding your files to the Makefile rather than using comp. That said, you can "abuse" the comp command a bit if you just need to use some extra libraries: EXTRA_LDFLAGS="-lprussdrv" comp --compile file.comp ...and you can always just copy/paste the gcc command used to build the modules when running make, edit as required for your new module name, and drop them into a small script file. I had to do this for a while when the comp command was broken for userspace components on the BBB. It looked like this: # work-around for userspace components not finding header files comp -p --userspace BBB_listener.comp gcc -I. -pthread -DTHREAD_FLAVOR_ID=0 -DRTAPI -D_GNU_SOURCE -D_FORTIFY_SOURCE=0 -D__MODULE__ -I/usr/include/linuxcnc -fPIC -g -funwind-tables -URTAPI -U__MODULE__ -DULAPI -Os -o BBB_listener BBB_listener.c -Wl,-rpath,/usr/lib -L/usr/lib -llinuxcnchal -- Charles Steinkuehler [email protected] -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
