NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Configuring LinuxCNC Advanced Configuration compiling kinematics modules

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: compiling kinematics modules

compiling kinematics modules 16 Apr 2012 07:33 #19239

  • mjmb
  • mjmb's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
Since I am learning to work with Linuxcnc and especially with kinematics, I did some little tests with the comp command. I installed Linuxcnc 2.5.0 from the CD and loaded the trivkins module from the git.linuxcnc.org repository. After installing the linuxcnc-dev package, I renamed the existing trivkins.ko to trivkins0.ko and launched the command comp --install trivkins.c.
After that, a new trivkins.ko appeared in /usr/realtime.../modules/linuxcnc, which is working normally. I was surprised though to see that the new version has a filelength of 90175 bytes, while the original one has only 3199 bytes! Is there some reason for this big difference?
Last Edit: 16 Apr 2012 07:37 by mjmb.
The administrator has disabled public write access.

Re:compiling kinematics modules 16 Apr 2012 09:25 #19247

  • ArcEye
  • ArcEye's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 1318
  • Thank you received: 102
  • Karma: 129
Hi

trivkins.c is a pure C program, not one generated by comp, so not suitable for compiling with comp.

Easiest way to compile it is to compile the 2.5 source, with your trivkins.c substituted for the stock one.

Alternatively dissect the Makefile to get the switches, includes, linkages required.

On my 2.5~pre-xxx, trivkins.ko comes out at 3203 bytes, so god knows what comp included in with it, a complete static library perhaps !

regards
Last Edit: 16 Apr 2012 09:27 by ArcEye.
The administrator has disabled public write access.

Re:compiling kinematics modules 16 Apr 2012 09:41 #19249

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4111
  • Thank you received: 140
  • Karma: 129
ArcEye wrote:
trivkins.c is a pure C program, not one generated by comp, so not suitable for compiling with comp.

You can use comp as a simple way to compile and link C-code as well as .comp macro code.

comp is an appropriate way to compile pure-C kinematics modules.
The administrator has disabled public write access.

Re:compiling kinematics modules 17 Apr 2012 01:36 #19300

  • ArcEye
  • ArcEye's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 1318
  • Thank you received: 102
  • Karma: 129
OK if you don't mind the bloat.

Ran strip on the 90K module output by comp and got it down to 1.8K but produced
insmod error: invalid module format -1 so obviously not all debugging symbols that comp is adding.

I'll stick with my method of re-compiling within the source tree. :blink:
The administrator has disabled public write access.

Re:compiling kinematics modules 18 Apr 2012 09:40 #19355

  • mjmb
  • mjmb's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
I did some more testing and found out that the module length , once loaded with loadrt or by launching linuxcnc, is 1274 bytes for the recompiled version as well as for the original version
So I suppose that the 2 versions are identical

Thanks for your help.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.840 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.