Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training


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.

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.


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 ]    [ Sitemap ]    [ ]

Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.

Free TCP/IP and file system demos for the RTOS

Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists