Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

Stack overflow when only Idle task running

Posted by Naik on May 4, 2012
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.

RE: Stack overflow when only Idle task running

Posted by Richard on May 4, 2012
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.

RE: Stack overflow when only Idle task running

Posted by Naik on May 4, 2012
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 :-/

RE: Stack overflow when only Idle task running

Posted by Naik on May 4, 2012
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 :-)


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner