Content originally posted in LPCWare by fariouche on Sun Aug 12 06:55:21 MST 2012
Hi,
I'm trying to use gdb from command line. The twinkle sample application runs fine, but if I attach gdb, I get an hardfault exception.
If I run the debugger from eclipse, no issue.
I'm using dfu first, and then the following command line:
$(GDB) bin/twinkle.axf -x bin/gdb_script
where gdb_script is
target extended-remote | crt_emu_cm3_nxp -g -2 -pLPC1769 -wire=winUSBswd
I don't know what I'm doing (or not) compared to the IDE?!
Thanks a lot
Here is the output:
Pc: ( 30) Emulator Connected
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Conn&Reset. DpID: 2BA01477. Info: LPCLINK_1_1
Nc: SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Nc: Packet delay: 0 Poll delay: 0.
Nc: NXP: LPC1768 Part ID: 0x26113F37
Pc: ( 65) Chip Setup Complete
Nt: Connected: was_reset=false. was_stopped=true
Cr:v Registered license, download limit of 128K
Pc: ( 70) License Check Complete
Pc: ( 85) Registered Semihost Handler
Pc: (100) Target Ready
0x00000488 in ?? ()
(gdb) c
Continuing.
Nt: Stopped: VectorCatch:HardF (PC was 0x889B3EB4)
Program received signal SIGSTOP, Stopped (signal).
main () at main.c:84
84 changeval = DELAY_CHANGE;
(gdb) bt
#0 main () at main.c:84
(gdb)