cancel
Showing results for 
Search instead for 
Did you mean: 

Is the build analyzer in cubeide accurate when using freertos?

xrstokes
Associate III

Can someone tell me if this is accurate when using freertos! using lots of ram and i'm only getting started so I'm trying to gauge how i'm going. I plan to move the heap too CCM ram if i get stuck.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
KnarfB
Principal III

The build analyzer is not FreeRTOS aware. If you view its Memory Details tab, you see how FLASH and RAM usage is calculated: it includes static memory requirements plus _Min_Heap_Size + _Min_Stack_Size space in RAM. These are the values you supplied in the .ioc file (Project Manager tab) or the built-in defaults if you didn't. They are used to assure that the heap can grow to _Min_Heap_Size and the stack can grow to _Min_Stack_Size without overlap. You could change them to your estimates and re-build the project to check if there will be still sufficient RAM.

You should study https://www.freertos.org/FAQMem.html and check/tune the settings in FreeRTOSConfig.h before estimating the sizes.

View solution in original post

3 REPLIES 3
prain
Senior III

They are accurate. Even when you use freeRTOS dynamic memory allocation. By default the maximum value of memory that you have configured for freeRTOS is reserved at compile time. Also check different heap_X.c files for more options.

KnarfB
Principal III

The build analyzer is not FreeRTOS aware. If you view its Memory Details tab, you see how FLASH and RAM usage is calculated: it includes static memory requirements plus _Min_Heap_Size + _Min_Stack_Size space in RAM. These are the values you supplied in the .ioc file (Project Manager tab) or the built-in defaults if you didn't. They are used to assure that the heap can grow to _Min_Heap_Size and the stack can grow to _Min_Stack_Size without overlap. You could change them to your estimates and re-build the project to check if there will be still sufficient RAM.

You should study https://www.freertos.org/FAQMem.html and check/tune the settings in FreeRTOSConfig.h before estimating the sizes.

xrstokes
Associate III

Thanks, this helped me find what i need. using the nxp tools for eclipse i can view my heap usage live. From what i understand the task stacks come out of the heap. So as long as my heap usage while running is healthy i should be alright?

Thanks