Startup error messages in Axis

49 views
Skip to first unread message

mugginsac

unread,
Feb 20, 2019, 8:00:27 PM2/20/19
to Machinekit
I am running Stretch 9.8 (testing) on a BBB with Xylotex DB25 cape.
I am getting the following errors or warnings when Axis starts up:
prussdrv_init
prussdrv_open
prussdrv_pruintc_init
prussdrv_map_prumem
PRU data ram mapped
num_pwmgens : 1
num_stepgens: 4
num_encoders: 0
Init pwm
hpg_pwm_init
Init stepgen
hpg_stepgen_init
Init encoder

If I clear them then everything seems to run fine. So the question is what do they mean and why am I getting them?
Is there anyway to not get them?

schoo...@gmail.com

unread,
Feb 21, 2019, 3:48:01 AM2/21/19
to machi...@googlegroups.com
They are not errors or warnings, they are telling you what is happening with the pru.

Make sure your DEBUG= setting in your ini file is 0

The lines are coming from hal_pru_generic.c using rtapi_print() and would not normally show up without debugging set to something

Either way, if they were errors, they would start 'ERROR:'
--
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 machinekit+...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Condit Alan

unread,
Feb 21, 2019, 10:03:32 AM2/21/19
to schoo...@gmail.com, Machinekit
OK, thanks, Debug is already set to 0 in the ini file. My Xylotex.ini and Xylotex.hal are linked. 
I will start looking in hal_pru_generic.c. I am wondering if something got set when people were working on uio for the newer kernel and hasn’t been unset.

Alan

You received this message because you are subscribed to a topic in the Google Groups "Machinekit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/machinekit/TWQy0uCOU2Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to machinekit+...@googlegroups.com.

mugginsac

unread,
Feb 23, 2019, 2:42:19 PM2/23/19
to Machinekit
About a month ago Zultron "fixed" a logging problem. He changed rtapi_print from:

void rtapi_print(const char *fmt, ...) {
va_list args;
va_start(args, fmt);
rtapi_msg_handler(RTAPI_MSG_ERR, fmt, args);
va_end(args);
}

to:
void rtapi_print(const char *fmt, ...) {
va_list args;
va_start(args, fmt);
rtapi_msg_handler(RTAPI_MSG_ALL, fmt, args);
va_end(args);
}

This appears to be what is causing the messages to show up when axis starts even though there is no error.
However, they show up with an X in a red circle, so it sure looks like an error. Is there a way to fix the logging problem
without making the user think there is an error???

Alan

Charles Steinkuehler

unread,
Feb 23, 2019, 3:07:45 PM2/23/19
to machi...@googlegroups.com
If this is specific to the hal_pru_generic driver, the driver source
should probably be fixed. I wrote a fair amount of the driver code
before I really understood how the logging worked (esp. since
traditional LCNC drivers ran in kernel space).

If it's an issue that affects other drivers (esp. the hm2/mesa code),
then the "fix" should be reviewed and maybe changed.

--
Charles Steinkuehler
cha...@steinkuehler.net

Condit Alan

unread,
Feb 23, 2019, 4:57:48 PM2/23/19
to Steinkuehler Charles, machi...@googlegroups.com
Charles,

As far as I can tell the problem is limited to rtapi_app_main and pru_init. In looking at the code, in pru_init, it almost looks like you intended to take the rtapi_print calls out after it was working, as they are not indented like the rest of the code.

If I were to fix them, I would just find “rtapi_print(" and
replace with "rtapi_print_msg(RTAPI_MSG_ERR, “ as below (just not preserving the commented lines):

// rtapi_print("num_pwmgens : %d\n",num_pwmgens);
rtapi_print_msg(RTAPI_MSG_ERR, "num_pwmgens : %d\n",num_pwmgens);
// rtapi_print("num_stepgens: %d\n",num_stepgens);
rtapi_print_msg(RTAPI_MSG_ERR, "num_stepgens: %d\n",num_stepgens);
// rtapi_print("num_encoders: %d\n",num_encoders);
rtapi_print_msg(RTAPI_MSG_ERR, "num_encoders: %d\n",num_encoders);

// rtapi_print("Init pwm\n");
rtapi_print_msg(RTAPI_MSG_ERR, "Init pwm\n");

If that is acceptable let me know and I will do it and submit a pull request.

Alan

Charles Steinkuehler

unread,
Feb 23, 2019, 5:24:31 PM2/23/19
to machi...@googlegroups.com
Feel free to make the change and submit a PR.

IIRC those were just for debug output and can be modified or removed
as needed. The primary goal of the hal_pru_generic code is to mimic
as close as possible the hm2 driver behavior, so that's the reference
standard.
--
Charles Steinkuehler
cha...@steinkuehler.net

Condit Alan

unread,
Feb 23, 2019, 6:11:38 PM2/23/19
to Steinkuehler Charles, machi...@googlegroups.com
I submitted a pull request 

Changed hal_pru_generic.c to get rid of unnecessary error messages #1463

Changed calls to rtapi_print to call rtapi_print_msg with a lower priority RTAPI_MSG_DBG.
This should allow the information to be available for debugging without showing up everytime you start the program.

mugginsac

unread,
Feb 27, 2019, 12:29:19 AM2/27/19
to Machinekit
The next day after I submitted the pull request, I updated machinekit and the messages that I had fixed were no longer there, but there were some new ones. Things that I had missed. So I found them, fixed them and submitted a new pull request.
The next time I updated machinekit, the old messages were back??? The code for all the fixes is in master. Any idea what is going on???


Reply all
Reply to author
Forward
0 new messages