Functions do not execute, rtapi_print_msg do not print anything

More
12 Dec 2017 23:25 #103047 by GingerPotato
Hi all!
I am working on driver. Inside .hal I add functions like:
loadrt my-driver
addf my-driver.func servo-thread
In code I export it with:
rtapi_snprintf(name, HAL_NAME_LEN, "%s.func", NAME);
hal_export_funct(name, my_function, NULL, 0, 0, comp_id)

Unfortunately function my_function do not execute.
Looking further I start thinking that nothing in my driver doesn't execute: none of rtapi_print_msg prints in terminal, parameters (pins) changed in code (inside rtapi_app_main) are not changed in linuxcnc.
On the other hand, changing function name without its changing in .hal cause error, so some part of code is being executed.
What can I do?

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

More
12 Dec 2017 23:26 #103048 by GingerPotato
I could send whole driver and configuration packed if someone would be able to look at it

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

  • rodw
  • rodw's Avatar
  • Away
  • Platinum Member
  • Platinum Member
More
15 Dec 2017 22:07 #103146 by rodw
Sounds like you are not using halcompile. It will make your life so much easier and there will be no need for the export_func

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

More
16 Dec 2017 01:48 #103151 by andypugh
If you are using RTAI then your rtapi_print will probably end up in dmesg, not at the terminal.

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

Time to create page: 0.172 seconds
Powered by Kunena Forum