Hi Guyz,
I am new to MQX RTOS and i am working on MQX 3.0(MCF52259 DemoKit).
how exactly can i set stack size when creating the task?.
can any one explain me regarding that?.
is there any way to find out with trial and error method?
if yes how?
Thanks
Vijayaragavan S
Solved! Go to Solution.
Hi,
ensure that MQX_KERNEL_LOGGING is set to one in your user_config.h file and that "c:\Program Files\Freescale\Freescale MQX 3.6\mqx\source\klog\kl_stack.c" is compiled in you psp library.
Also is always better to use the latest MQX version (currently 3.6.2) . I think that stack usage check function was not included in the MQX 3.0.0.
Regards,
PetrL
You have 3 possibilities:
1) guess and exagurate to be sure that the size will never be overrun
2) analytically check the size of subsequent calls and their stack size; however- for large numbers of nested calls and their variations this is not trivial
3) do 1) and consequently use MQX TAD and look for stack usage, where the used column can tell you the max. watermark level of the stack.
Hello,
You're right but TAD needs CW professional edition
I use kernel logging features, enable by MQX_KERNEL_LOGGING and MQX_MONITOR_STACK (needs to compile MQX libraries), then use _klog_show_stack_usage() in your application to output messages on stdout device, it gives an idea about stack memory consumption.
Emmanuel
Hi every body
I am trying to catch a bug through ebabling MQX_KERNEL_LOGGING and MQX_MONITOR_STACK and use _klog_show_stack_usage() but I´'ve got this error message:
Link Error : Undefined : "_klog_get_task_stack_usage"
Referenced from "spi2_task_Entry" in
Link Error : Undefined : "_klog_show_stack_usage"
Referenced from "spi2_task_Entry" in
Link failed.
I appreciate any help
Hi,
ensure that MQX_KERNEL_LOGGING is set to one in your user_config.h file and that "c:\Program Files\Freescale\Freescale MQX 3.6\mqx\source\klog\kl_stack.c" is compiled in you psp library.
Also is always better to use the latest MQX version (currently 3.6.2) . I think that stack usage check function was not included in the MQX 3.0.0.
Regards,
PetrL
Thanks PetrL.
I carried out a whole MQX library recompilation and now klog functions are working.
Thanks again