Trying to debug LPC1768 project (with FreeRTOS) on hardware with J-Link
GDB Server I encountered problem: debugger receives SIGTRAP signal on
instruction SVC 0 (in function vPortStartFirstTask). As if breakpoint
catches. I can't understand why. I'm trying resume but it triggers
again. On single step it hangs and j-link shows a lot of these events
(target halted, started CPU, target halted, etc.). Moreover, I tried
standard example CORTEX_LPC1768_GCC_RedSuite from FreeRTOS. The same.
But IAR projects work fine. I'm using Yagarto toolchain. (Tried both old
arm-elf and latest arm-eabi versions). gdb commands I specified in
Eclipse debug configuration:
monitor endian little
monitor flash device = LPC1768
monitor flash download = 1
monitor flash breakpoints = 1
monitor speed 1000
monitor reg r13 = (0x00000000)
monitor reg pc = (0x00000004)
Also I checked Reset and Delay and Halt options. Set breakpoint at: main
and Resume also set and works fine (Program stopped at main, then I
resume and it stopped on SVC 0)
I worked with ARM7TDMI earlier and didn't experienced such problems.