Skip to main content
xrstokes
Associate III
August 1, 2020
Solved

Is the build analyzer in cubeide accurate when using freertos?

  • August 1, 2020
  • 3 replies
  • 1584 views

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

This topic has been closed for replies.
Best answer by KnarfB

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.

3 replies

prain
Visitor II
August 1, 2020

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
KnarfBBest answer
Super User
August 1, 2020

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
xrstokesAuthor
Associate III
August 2, 2020

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