wz2b wrote on Wednesday, May 30, 2007:
What sorts of things would make it so that FreeRTOS runs stand-alone just fine but it gets aborts when you run it with the debugger? For example, I wrote a small app with one task (plus of course the idle task) that blinks a few LEDs. If I run it without the debugger (i.e. just turn it on or push the reset button) it works fine, but if I run it through gdb it does nothing. When I eventually abort it I get:
Program received signal SIGINT, Interrupt.
data_abort () at src/startup.S:83
83 b data_abort
1: /x $pc = 0x8b0
(gdb) print/x $lr
$1 = 0xc0c
It’s fairly consistent about stopping in that same spot, which is in the middle of vPreemptiveTick() as it calls the macro portRESTORE_CONTEXT():
/* The critical nesting depth is the first item on the stack. */
/* Load it into the ulCriticalNesting variable. */
"LDR R0, =ulCriticalNesting
–> "LDMFD LR!, {R1} BLOWS UP HERE
"STR R1, [R0]
(this is based on the LPC2106 GCC port, though mine is an LPC2129).