Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

Memory use report

Posted by Dave Nadler on July 11, 2011
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

RE: Memory use report

Posted by Dave Nadler on July 11, 2011
Sorry if I wasn't clear, I need to report STACK memory use...

RE: Memory use report

Posted by Richard on July 11, 2011
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.

RE: Memory use report

Posted by Dave Nadler on July 11, 2011
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

RE: Memory use report

Posted by Richard on July 11, 2011
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.

RE: Memory use report

Posted by Richard on July 11, 2011
...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.

RE: Memory use report

Posted by Dave Nadler on July 11, 2011
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

RE: Memory use report

Posted by Richard on July 11, 2011
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.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists