Memory use report

Apologies, I know this must exist somewhere but I can’t find it.
I need a simple memory report that shows available memory
for all tasks (including IDLE), in conjunction with the
stack-check setting 2 to provide a good check for adequate
provisioning….
Thanks in advance,
Best Regards, Dave

Memory use report

Sorry if I wasn’t clear, I need to report STACK memory use…

Memory use report

I’m not sure I fully understand what you are looking for but, see: http://www.freertos.org/uxTaskGetStackHighWaterMark.html xPortGetFreeHeapSize() found in heap_1.c and heap_2.c and of course http://www.freertos.org/a00111.html Regards.

Memory use report

Apologies Richard for not being clear.
I did study the material you noted.
I need to print a report that lists,
for each task including IDLE,
how much stack space has not been used.
uxTaskGetStackHighWaterMark presumes
all the task handles are available; but they
aren’t handy and I don’t know where to find
the IDLE task handle.
Thanks again !
Best Regards, Dave

Memory use report

In which case this is what you want: http://www.freertos.org/a00021.html#vTaskList The documentation on the web site is not great for that function (I think the reference manual has more), but if you grep in the FreeRTOS/Demo directory you will find lots of examples.  It produces something like this: where the “stack” column is the high water mark – so the closer it is to zero the closer the task has come to overflowing its stack. Regards.

Memory use report

…addition If you are using IAR or Eclipse, you can also use the plug-in for those IDEs to show you the start of stack, end of stack, and high water mark for each task. Regards.

Memory use report

Apologies for missing vTaskList in the manual;
I looked in the “memory” section.
Anyway, thanks, does the trick. Separately, the Eclipse plugin with CodeRed:
- displays “Off” in the “min stack available” column
IIRC It didn’t even display the column prior I
enabled configUSE_TRACE_FACILITY. Thanks for the help !
Best Regards, Dave

Memory use report

There is a menu item to turn the stack checking on in the IDE.  I think you might even be able to right click on the column in the plug-in window to turn it on.  It is off by default because of the time it takes to determine the data. Regards.