Quality RTOS & Embedded Software

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




Loading

stack pointer terror

Posted by Nobody/Anonymous on March 24, 2006
Hi,

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.
Regards,
Joerg



RE: stack pointer terror

Posted by Nobody/Anonymous on March 24, 2006
Hi,

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.
Greets,
(name hidden)


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




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

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

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