lpcware

Debug with GDB (lpc1756)

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Croman13n3c on Mon Nov 19 06:41:50 MST 2012
I am try to debug LPC1756 with J-link under Eclipse. And its very often generate SIGTRAP (with differen toolchain : gcc arm, codesourcery,yagarto ).

Exception occurs on FreeRTOS function prvPortStartFirstTask.


{
    __asm volatile(
                    " ldr r0, =0xE000ED08     \n" /* Use the NVIC offset register to locate the stack. */
                    " ldr r0, [r0]             \n"
                    " ldr r0, [r0]             \n"
                    " msr msp, r0            \n" /* Set the msp back to the start of the stack. */
                    " cpsie i                \n" /* Globally enable interrupts. */
                    " svc 0                    \n" /* System call to start first task. */
                    " nop                    \n"
                );
}


Trying to exclude RTOS, exception occurs on timer init.With keil its work.

Maybe you know the reason for this behavior?

My GDB init script:


monitor speed 50
monitor reset  0
monitor sleep 100
monitor reg r13 = (0x00000000)
monitor reg pc = (0x00000004)
break main
continue

Outcomes