New HAL Components - Best Practice

More
30 May 2025 19:41 #329406 by kubes
New HAL Components - Best Practice was created by kubes
I am new to LinuxCNC, but I play a software engineer in life.  I have identified a few areas where new or updated (and refactored) components could be beneficial.  What is the current best practice to build HAL components?  I would assume halcompile, but more specifically, .comp files or just long-hand .c?  The components that I am currently thinking about are in the user-space.   The first one I want to tackle is an updated/new hy_gt vfd component.  I am running 2.9, so backward compatibility is not a personal concern for me, but maybe people don't update?

Any feedback would be appreciated.
Thanks
 

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

  • Aciera
  • Aciera's Avatar
  • Away
  • Administrator
  • Administrator
More
31 May 2025 09:02 - 31 May 2025 09:06 #329430 by Aciera
Replied by Aciera on topic New HAL Components - Best Practice
Both is fine.
The .comp format is more compact and easier to understand and maintain particularly for people not totally familiar with pure c.

Note that the component should remain compatible with older configurations.
Last edit: 31 May 2025 09:06 by Aciera.
The following user(s) said Thank You: kubes

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

More
31 May 2025 09:10 #329431 by rodw
Replied by rodw on topic New HAL Components - Best Practice
I think you should use halcompile because this also lets you document your component via a man entry and the web site in the same file.
For new contributions, you should be using 2.10 (master) branch as 2.9 is frozen.
Using C would just add extra work. Not sure on user space comps though. I have never written one.
The following user(s) said Thank You: Aciera, kubes

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

More
31 May 2025 18:31 #329459 by kubes
Replied by kubes on topic New HAL Components - Best Practice
Thanks

If I build against 2.10, how is backwards compatibility handled? I am running 2.9.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum