0

i remade an empty project with Freertos STN32F107 for myself, but now there was a problem in the form of "Not enough RAM 'ucHeap'". The trick is that if you set the value configTOTAL_HEAP_SIZE ((size_t) (17 * 1024)) the error "Not enough RAM 'ucHeap'" appears, and if you set configTOTAL_HEAP_SIZE ((size_t) (1 * 1024)) the program will compile, but my task will not work.

I am using MK STM32F103C4, Freertos version 9.0.0

Please tell me what I'm doing wrong.

  • 1
    Have you tried another number between 1 and 17? Without even looking up the part numbers, I assume the 103 you're using has less RAM than the 107, so it can't compile with that much heap allocated. However, your program can't run with the very small amount you set. – Thomas Jager Apr 03 '21 at 17:23
  • Its seems that the board configuration you have is not correct. Look at the linker map file to determine what is going on. If you had a heap size issue, the linker would probably tell you about it. – Har Apr 03 '21 at 17:24
  • STM32F103C4 has only 6 KB of RAM, yet you are trying to use 17 KB. Try it with 3 or 4 KB. But with so little RAM, any RTOS will only barely work, if at all. I might make more sense to try a different approach like libopencm3, STM32 HAL without FreeRTOS or CMSIS. – Codo Apr 03 '21 at 22:13
  • I tried to set values ​​from 1 to 5, there are no errors, but the task still does not work. – user374707 Apr 04 '21 at 08:22

0 Answers0