Stack overflow when only Idle task running

Hi everyone ! i actually got a “little” problem within my project: even when i don’t use any task (so there shall only be the Idle one running), i got stack overflows after a while; using traceTASK_SWITCHED_IN() and uxTaskGetStackHighWaterMark() to print stack usage on UART, it seemed that the stack is continuously growing up to the overflow… Do you have any idea about where could it come from?
I guess it’s probably an error in my port (using a TI MSP430F5438 with mspgcc), as there ain’t many people talking about such a thing on the internet.
TY
Matt.

Stack overflow when only Idle task running

Where did you get the port from? If it was from the FreeRTOS distribution – then the FreeRTOS GCC port will only work on the base, rather than extended, MSP430 parts.  There are official FreeRTOS ports to that device, but only for IAR and CCS. FreeRTOS has both an IAR MSP430 and an IAR MSP430X port, so if you want to have GCC running on an X part I would suggest looking at both IAR ports to see the differences, and then copy the differences into your GCC port layer.  If you use it unmodified, I would not expect it to work. Regards.

Stack overflow when only Idle task running

Wow! the quick reply is quite impressive ! Thanks ! :) The port has been made by a colleague, using the official versions from the demos ( i’m nearly shure that’s from the IAR one). So I guess i shall have a look at how he made his port. But there’s something weird : it looks like everything is working fine with some other projects which have the same port :-/

Stack overflow when only Idle task running

Okay, i found the problem: i was using the traceTASK_SWITCHED_IN() macro, but i was doing some printf() inside…
Once i removed them, everything came back to normal :-)