Diagnostics when connecting to LPC-Link
Occasionally customers may experience problems when trying to start a debug session. To help diagnose the cause of the problem, run the following diagnostics, and collect all of the output.
Windows
- Disconnect and reconnect the LPCXpresso (LPC-Link) board
Device Manager will display USB Device with DFU capabilities
- Open a Command Prompt and then enter the appropriate command, depending upon Code Red IDE version....
cd <install_dir>\bin\Scripts [Code Red IDE v3]
cd <install_dir>\lpcxpresso\bin\Scripts [LPCXPresso 4]
cd <install_dir>\redsuite\bin\Scripts [Red Suite 4]
- Run one of the following commands, depending on you OS type
bootLPCXpresso winusb [WinXP]
bootLPCXpresso hid [WinVista/Win7]
- this will load the LPC-Link with the USB debug firmware
- LPC-Link will appear in Device Manager
- set CRT_DEBUG_TRACE=1
- this will enable some additional diagnostics in the debug driver
Now cd <install_dir>\bin
- Run the command, depending on your OS type
<debug_driver> -info-emu -wire=winusb [WinXP]
<debug_driver> -info-emu -wire=hid [WinVista/Win7]
where <debug_driver> is one of the following, depending on your target hardware
crt_emu_lpc11_13_nxp [LPC11/12/13]
crt_emu_cm3_nxp [LPC17]
crt_emu_a7_nxp [LPC2xxx]
crt_emu_a9_nxp [LPC29/31/32]
- Run the command, depending on your OS type
<debug_driver> -info-target -p<target> -wire=winusb -4 [WinXP]
<debug_driver> -info-target -p<target> -wire=hid -4 [WinVista/Win7]
where <target> is your target MCU, such as LPC1768, LPC1343, LPC1114/301 etc.
Linux
- disconnect and reconnect the LPCXpresso (LPC-Link) board
open a Terminal and cd <install_dir>/bin
run dfu-util -l
- this will display the bootable devices
run dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D LPCXpressoWIN.enc
- this will load the LPC-Link with the USB debug firmware
run lsusb
- an LPC-Link device will be listed
- setenv CRT_DEBUG_TRACE 1
- this will enable some additional diagnostics in the debug driver
run the command <debug_driver> -info-emu -wire=winusb
where <debug_driver> is one of the following, depends on you target hardware
crt_emu_lpc11_13_nxp [LPC11/12/13]
crt_emu_cm3_nxp [LPC17]
crt_emu_a7_nxp [LPC2xxx]
crt_emu_a9_nxp [LPC29/31/32]
run the command <debug_driver> -info-target -p<target> -wire=winusb -4
where <target> is your target MCU, such as LPC1768, LPC1343, LPC1114/301 etc.