Hi all, I'm interested in getting stack information via an UDP message with an ASCII log trace inside. Basically, I cannot get the information using a printf. I found the function rtems_stack_checker_report_usage_with_plugin(rtems_printer* printer) in order to get the information and send it using my UDP log function. So first of all I created a function called logPlugin (I used as exampled the plugin at printf_plugin.c):
static int logPlugin(void *context, const char *format, va_list ap) { (void) context; return addLog(INFO, STACK,format, ap); /* First two arguments are used to classify message at reception*/ } Then at rtems_stack_checker_report_usage_with_plugin calling scope: rtems_printer printer; printer.context = NULL; printer.printer = logPlugin; rtems_stack_checker_report_usage_with_plugin(&printer); It is important to say that addLog puts the message in a circular buffer that other task will read and send the content using UDP. When stack checker report usage is called, only the information header is printed: " STACK USAGE BY THREAD\n" "ID NAME LOW HIGH CURRENT AVAIL USED\n" Next, stack values are not printed correctly and I can only get a value that is constant and equal to the same memory location (in decimal). It is a correct guide to implement this? I do not know how to use the printer struct context variable, can this cause my problem? Thanks in advance, Regards, ________________________________ [cid:image001.gif@01D5AF6C.02B3BC40] Fernando Domínguez Pousa Ingeniero de Software Software Engineer GMV Isaac Newton, 11 P.T.M. Tres Cantos E-28760 Madrid Tel. +34 91 807 21 00 Fax +34 91 807 21 99 www.gmv.com <http://www.gmv.com/> [cid:image002.png@01D5AF6C.02B3BC40]<http://www.facebook.com/infoGMV> [cid:image003.png@01D5AF6C.02B3BC40]<http://www.twitter.com/infoGMV_es> [cid:image004.png@01D5AF6C.02B3BC40]<https://plus.google.com/+Gmvcompany> [cid:image005.png@01D5AF6C.02B3BC40]<http://www.youtube.com/infoGMV> [cid:image006.png@01D5AF6C.02B3BC40]<https://www.linkedin.com/company/gmv> [cid:image007.png@01D5AF6C.02B3BC40]<http://www.gmv.com/en/RSS> [cid:image008.png@01D5AF6C.02B3BC40]<http://www.gmv.com/blog_gmv/language/en/> P Please consider the environment before printing this e-mail.
_______________________________________________ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users