Hi, I’m using cortex-m4 cpu and freertos. I’m using latest stable version - 7.5.2. For some time everything were fine, but at one moment my cpu begans to fail with HardFault at different points, such as calling printf(…), taskYIELD(), calling some local functions, allocations, etc.
Hours of horrible debug shows me, that problem in stack corruption of process “Tmr Svc”. Hardware breakpoint triggered at task allocation and, next, at context switch, that normal, but stack have been already corrupted.
Now I’m using freertos-7.4.2 with the same code of my program, and everything works fine. I can suppose, that problem in freertos.
And this bug appears when .bss section becomes large.
I’m using heap_3.c and all allocations works fine, i’ve modified linker script so, that memory for heap is after .stack section.
This bug appears also, if I’m using any other heap, that uses .bss section memory and if I create my own tasks restricted. I supposу cause of this bug is a dense memory organization, but i can’t tell exactly.