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
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
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.
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.
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.
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.