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
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)
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.