Debug with GDB (lpc1756)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debug with GDB (lpc1756)

570 Views
lpcware
NXP Employee
NXP Employee
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
Labels (1)
0 Kudos
Reply
1 Reply

490 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Croman13n3c on Fri Nov 30 04:09:07 MST 2012
The solution was change gdb init script to this:

reset 0
break main
continue
0 Kudos
Reply