I’m compiling FreeRTOS V10.3.1 on a STM32F407g board, i have three tasks with the same priority that implement a simple program, with one task verifying the result of the other 2 tasks at the end of computation. If i use print ((tskTCB)pxCurrentTCB)
in gdb i get somehing similar to this:
$4 = {
pxTopOfStack = 0x200019e8 <ucHeap+4424>,
xStateListItem = {
xItemValue = 0x1,
pxNext = 0x200080b4 <pxReadyTasksLists+8>,
pxPrevious = 0xffffffff,
pvOwner = 0x20000014 <xIdleTaskTCBBuffer+4>,
pvContainer = 0x20000014 <xIdleTaskTCBBuffer+4>
},
xEventListItem = {
xItemValue = 0x2,
pxNext = 0x200019ec <ucHeap+4428>,
pxPrevious = 0xffffffff,
pvOwner = 0x200019ec <ucHeap+4428>,
pvContainer = 0x20002a54 <ucHeap+8628>
},
uxPriority = 0x0,
pxStack = 0x200080dc <pxReadyTasksLists+48>,
pcTaskName = "\377\377\377\377܀\000 ܀\000 \000\000\000",
uxBasePriority = 0x200080f0,
uxMutexesHeld = 0xffffffff,
ulNotifiedValue = 0x200080f0,
ucNotifyState = 0xf0,
ucStaticallyAllocated = 0x80 }
As you can see, the pcTaskName
is totally corrupted but i can’t understand why. I was suspecting a stack overflow somewhere so I enabled configCHECK_FOR_STACK_OVERFLOW 2
but the function never triggers. What’s strange is that the program still reach completition verifying the right result at the end of all computations. Any idea on what i should look for?