Skip to main content
Bob S
Super User
May 12, 2021
Question

STM32CubeMX FreeRTOS heap usage estimate incorrect

  • May 12, 2021
  • 2 replies
  • 2219 views

STM32CubeMX version 6.2.1, target STM3G474VE, CMSIS v2. If you create a time with "static" allocation, the "FreeRTOS Heap Usage" tab shows no heap usage by that timer. However, osTimerNew() always allocates the TimerCallback_t structure from the heap, even for "statically" allocated timers. So every timer uses at least 8 bytes of heap space.

I haven't done a thorough look at CMSIS v1, but at a quick glance it appears to correctly statically allocate all memory for a "static" timer. At least as long as the config param "memory allocation" is set to "dynamic/Static".

This topic has been closed for replies.

2 replies

Khouloud OTHMAN
Associate
May 19, 2021

Hello @Bob S​,

Please excuse the somewhat late reply and thank you for having reported.

I see your point and I will bring it up internally to be reviewed by our development team to see how we can address a modification.

I'll keep you posted with the updates.

Thank you for bringing this up.

Khouloud.

Bob S
Bob SAuthor
Super User
May 20, 2021

Thank you.