Using command line GDB
The underlying debugger within Red Suite/LPCXpresso is GDB. This page shows how to connect to a debug target with GDB using the Code Red debug driver.
The Code Red Debug Driver implements the GDB "remote" protocol to allow connection to debug targets. To start a debug session using GDB, we suggest following steps:
arm-none-eabi-gdb executable.axf ; start GDB and name the debug image target extended-remote | <debug driver and options> ; start debug driver, connect to target load ; load image and download to target
The <debug driver and options> command is as follows:
debug_driver options
where debug driver is one of:
crt_emu_lpc11_13_nxp (for LPC11xx, LPC12xx or LPC13xx parts)
crt_emu_cm3_nxp (for LPC17xx parts)
crt_emu_a7_nxp (for LPC21/22/23/24 parts)
crt_emu_a9_nxp (for LPC31/32 and LPC29xx parts)
crt_emu_cm3_lmi (for TI Stellaris LM3S parts)
and options are:
-n set information level for the debug driver.
n should be 2, 3 or 4. 2 should be sufficient in most circumstances
-ppart is the target device to connect to and must be specified
part should be the part you have specified in creating the executable. Examples of parts include LPC1768 or LPC1114/301 or LM3S6965
wire to specify the debug probe to use:
- (empty) (for Red Probe+, Red Probe, RDB1768v1, or TI Stellaris evaluation boards)
- -wire=hid (for RDB1768v2 without upgraded firmware)
-wire=winusb (for RDB1768v2 with upgraded firmware)
- -wire=winusb (for LPC-Link on Windows XP)
- -wire=hid (for LPC-Link on Windows Vista/ Windows 7)
Thus typical invocations would be:
1. target extended-remote | crt_emu_cm3_nxp -2 -pLPC1768 -wire=winusb 2. target extended-remote | crt_emu_cm3_lmi -2 -pLM3S6965
- establishes a connection to an NXP LPC1768 using RDB1768v2 or LPC-Link
- establishes a connection to a TI LM3S6965 using Red Probe+, Red Probe, RDB1768v1 or TI Stellaris Evaluation board
