RTEMS stack checker
Joel Sherrill
joel.sherrill at oarcorp.com
Thu Jan 15 18:12:37 UTC 2015
On 1/15/2015 11:27 AM, Miller, Scott A. wrote:
> The problem was with my printk_plugin. I didn't have the the correct
> variable arguments setup, and when I was printing, the values for the
> format string were memory areas not assigned to the variables. Now
> that I'm passing the variable arguments, the stack checker appears to
> be working well.
>
I suspected something was wrong when you mentioned the plugin version
in the comment. I just couldn't conceive of how you would have gotten
that kind of output. :)
FWIW The with plugin variants are handy to let you not use printk() like
the default and redirect to a file, respond to a web service, etc.
> Thanks for the response, Joel.
>
No problem. This one just was too weird to leave you hanging long. :)
--joel
> On Jan 14, 2015, at 5:28 PM, Joel Sherrill <Joel.Sherrill at OARcorp.com
> <mailto:Joel.Sherrill at OARcorp.com>> wrote:
>
>
> On 1/14/2015 5:18 PM, Miller, Scott A. wrote:
>> Attempting to get the stack checker in RTEMS enabled our software.
>>
>> Before confdefs.h is included, along with all of our other CONFIGURE
>> variables, I have put:
>>
>> #define CONFIGURE_STACK_CHECKER_ENABLED
>>
>> When I later make the call to
>> rtems_stack_checker_report_usage_with_plugin(), I get output (one per
>> line) for each task running (and the interrupt context), but the
>> values printed (stack begin area, used, etc..) are all the same for
>> each task, and the stack size doesn't seem to match the memory area
>> allocated for the stack. The values don't seem trustable.
>>
>> Is there something I'm missing to use the stack checker properly?
>>
> That doesn't seem right at all. Calling the "with plugin" variant
> requires you
> to pass something that has a signature like fprintf(). Did you call
> that method
> directly or via the wrapper rtems_stack_checker_report_usage()?
>
> Can you run the fileio sample and try the stackuse command? That test
> should
> just work.
>> Running RTEMS 4.10.
>
> --
> Joel Sherrill, Ph.D. Director of Research & Development
> joel.sherrill at OARcorp.com On-Line Applications Research
> Ask me about RTEMS: a free RTOS Huntsville AL 35805
> Support Available (256) 722-9985
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20150115/768d6dfd/attachment-0002.html>
More information about the users
mailing list