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 pointer terror

Posted by Nobody/Anonymous on March 24, 2006

it seems that the stack pointer in system mode
of ARM7 gets corrupted.
I work with STR7 ARM7 controller. FreeRTOS runs
in supervisor mode and the tasks in system mode.
I put the stacks at the top of the internal
RAM of the controller, down from 0x2000FFFF.
In supervisor mode (vPortYieldProcessor) the stack
pointer is 0x2000FDDC which is ok.
In system mode (task) it points at 0x200011FC which goes far to deep.
In the startup assembler it was set to 0x2000FE30.
The global variables go up to 0x20005000!
So I think this should not happen?
The stack pointer is set to this wrong value the first time the task gets called.
I run only one task in preemptive mode.
I'm unable to find the moment when the sp gets corrupted.
I got a JTAG debugger but where to set the breakpoint?
By the way, even if I run 3 tasks, the system is running in general. So I found this at a very late stage in the project.

RE: stack pointer terror

Posted by Nobody/Anonymous on March 24, 2006

I should have think about it a little more before posting ! ;-)
The stack pointer for each task points to the
memory allocated by heap1.c
So I think this is right as it has to be.
Sometimes I stumble about FreeRTOS details.
(name hidden)

[ 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