We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi All,
I'm using Keil5 developing application on a Cortex-M0 platform with FreeRTOS example.
In FreeRTOS, there is a global buffer ucHeap[] doing the memory dynamic allocation and free, it also used as the heap for OS tasks stack.
I want to define the size of ucHeap as bigger as it can, until use up the whole SRAM memory.
So I want to realize a function in Keil5 to change the size of ucHeap everything time based on other RW/ZI usage.
For example,
i)The total SRAM is 20KB, other RW/ZI/STACK usage is already 10KB, the Keil5 can allocate 20-10=10KB for the ucHeap.
ii)The total SRAM is 20KB, other RW/ZI/STACK usage is already 8KB, the Keil5 can allocate 20-8=12KB for the ucHeap.
Currently I manually change the size of ucHeap everytime to use up the whole SRAM. I would like to have method to achieve this function automatically.
Thanks.
Best Regards.
Have you asked on the FreeRTOS forums - if anyone there has already done this?
These may help:
https://developer.arm.com/documentation/dui0474/f/accessing-and-managing-symbols-with-armlink/region-related-symbols?lang=en
Andy Neil said:Have you asked on the FreeRTOS forums
The answer is here https://forums.freertos.org/t/squeeze-all-sram-memory-into-freertos-heap-in-keil5/10200/9