Debug LPC824 with extrnal probe

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

Debug LPC824 with extrnal probe

612 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andy55555 on Wed Aug 05 04:25:15 MST 2015
Hi,

I have the LPC824 and am trying to debug it using an lpcxpresso v2 board which has a LPC1549 on via SWD. I'm using the LPCxpresso IDE

Currently I am having no joy so far. This is my error:

""Error in final launch sequence
  Failed to execute MI command:
-target-select extended-remote | crt_emu_cm_redlink -msg-port=60254 -g -mi -2 -pLPC824 -vendor=NXP -vc -reset= -ProbeHandle=1 -CoreIndex=0 -flash-driver=LPC800_32.cfx
Error message from debugger back end:
Remote communication error.  Target disconnected.: No error.
  Remote communication error.  Target disconnected.: No error.""



Just for starters I'm using the periph_blinky to see if I can debug anything on the chip.

I believe I have followed the instructions in the datasheet, user guide and these links:

https://www.lpcware.com/content/faq/lpcxpresso/debug-design
https://www.lpcware.com/LPCXpressoV2Boards
(see piccy attached)

I have configured my pcb to match what's in the datasheet and I have a pull up on pio0_12 which is the ISP entry (see piccy attatched), I have alos configured the V2 board to have J1 shorted, and J2 shorted on pins 2 & 3.

Please tell me where I have gone wrong.

Thank you.

Andy
Labels (1)
0 Kudos
5 Replies

486 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andy55555 on Wed Aug 12 04:02:20 MST 2015
Hi,

Slightly different this time:

c:\nxp\LPCXpresso_7.9.0_455\lpcxpresso\bin>boot_link2.cmd
Booting LPC-Link2 with LPC432x_CMSIS_DAP_V5_112.bin.hdr
LPC-Link2 booted

c:\nxp\LPCXpresso_7.9.0_455\lpcxpresso\bin>redlinkserv.exe -commandline
redlink>probelist
No probes found
redlink>
0 Kudos

486 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Aug 06 06:16:53 MST 2015
It means your LPC-Link2 is not connected, or it is already booted.

Please run boot_link2 when the device is connected to the PC (and has been power cycled).
0 Kudos

486 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andy55555 on Thu Aug 06 06:01:16 MST 2015
OK,

so now I'm running 7.9 and have repeated your instructions.

Actually, the first time I followed them with 7.3 I ran the boot_link2.cmd and nothing happened and then proceeded to the next step the result of which is the previous post.

Now with 7.9 I attempted to run the boot_link2.cmd again and the altnerative method outlined, please see the result:

c:\nxp\LPCXpresso_7.9.0_455\lpcxpresso\bin>boot_link2.cmd
Nothing to boot

c:\nxp\LPCXpresso_7.9.0_455\lpcxpresso\bin>dfu-util.exe -d 1fc9:000c -c 1 -t 204
8 -R -D LPC432x_CMSIS_DAP_NB_V5_112.bin.hdr
dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Filter on vendor = 0x1fc9 product = 0x000c
Opening DFU capable USB device... ID 1fc9:000c
Run-time device DFU version 0100
Claiming USB DFU Runtime Interface...
Determining device status: state = dfuIDLE, status = 0
WARNING: Runtime device already in DFU state ?!?
Found Runtime: [1fc9:000c] devnum=0, cfg=1, intf=0, alt=0, name="DFU"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 0100
No valid DFU suffix signature
Warning: File has no DFU suffix
bytes_per_hash=276
Copying data from PC to DFU device
Starting download: [##################################################] finished
!
unable to read DFU status
can't detach
Resetting USB to switch back to runtime mode

c:\nxp\LPCXpresso_7.9.0_455\lpcxpresso\bin>

What do you think?

Thanks again,
Andy
0 Kudos

486 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andy55555 on Thu Aug 06 05:34:53 MST 2015
Hi,

Thanks for the quick reply.

So.. No I'm using 7.3, I am going to update and try again. But in the mean time I have tried the steps you have outlined above and this is the output I get from my cmd promt:


C:\nxp\LPCXpresso_7.3.0_186\lpcxpresso\bin>redlinkserv.exe -commandline
redlink>probelist
Index = 1
Manufacturer = NXP Semiconductors
Description = LPCLINK2 Redlink
VID = 21BD, PID=0006
Path = \\?\hid#vid_21bd&pid_0006#7&4d934e&0&0000#{4d1e55b2-f16f-11cf-88cb-001111
000030}

redlink>probeopenbyindex 1
Handle = 0x00000001 = 1
redlink>wireswdconnect 1
DpID = 0BC11477
redlink>coreconfig 1
Number of CORES/TAPs = 1, Fully recognized: True
redlink>corelist 1
TAP 0: 0BC11477 Core 0: M0   APID: 04770031

redlink>cmhalt 1 0
redlink>cmregs 1 0
R0 : 00000001
R1 : 00000001
R2 : 000000FF
R3 : 40048080
R4 : 00000000
R5 : 00000001
R6 : A0000000
R7 : 4000C000
R8 : FFFFFFFF
R9 : FFFFFFFF
R10: FFFFFFFF
R11: FFFFFFFF
R12: FFFFFFFF
SP : 100001D0
LR : 1FFF01C3
PC : 1FFF00D6
PSR: 21000000
MSP: 10001FEC
PSP: 100001D0

redlink>probeclosebyindex 1
redlink>exit

Don't really know what it means, but it looks similar to your output :-)

The big difference I can spot is in the probe description,

I have  LPCLINK2 Redlink compared to your LPC-LINK2 CMSIS-DAP V5.112 NB.


Hopefully this gives you some insight into where the problem may lie.

Cheers,
Andy
0 Kudos

486 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Aug 05 12:47:00 MST 2015
Off hand, I don't see anything wrong with your debug circuit provided you've connected the signals to the 10 pin debug connector as you've indicated. The JP1/JP2 settings on the Xpresso v2 probe are correct, but in practice, I don't think the JP2 setting matters. Perhaps the problem is elsewhere in your board design.

You haven't said anything about which LPCXpresso version you're using. The following example presumes you're using the latest LPCXpresso 7.9.0 release*

*As a quick experiment, use the Redlink server program (redlinkserv.exe) to determine whether you have any kind of debug capability to the LPC824.

1. On Windows, open a DOS command shell, and navigate to the LPCXpresso <installation>/bin directory. Be certain you first DFU a firmware probe to the Xpresso v2. On Windows, you can DFU the CMSIS-DAP probe using this command script:

boot_link2.cmd

or this command line:

dfu-util.exe -d 1fc9:000c -c 1 -t 2048 -R -D LPC432x_CMSIS_DAP_NB_V5_112.bin.hdr

Note Linux and Mac OS X hosts use a slightly different command line ('-c 0').

2. Start the Redlink server program

redlinkserv.exe -commandline
C:\nxp\LPCXpresso_7.9.0_455\lpcxpresso\bin>redlinkserv.exe -commandline
redlink>probelist
Index = 1
Manufacturer = NXP Semiconductors
Description = LPC-LINK2 CMSIS-DAP V5.112 NB
VID:PID = 1FC9:0090
Path = \\?\hid#vid_1fc9&pid_0090&mi_00#8&ff48f8a&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}


redlink>probeopenbyindex 1
Probe Handle 1 Open
redlink>wireswdconnect 1
DpID = 0BC11477
redlink>coreconfig 1
Number of CORES/TAPs = 1, Fully recognized: True
redlink>corelist 1
TAP 0: 0BC11477 Core 0: M0   APID: 04770031

redlink>cmhalt 1 0
redlink>cmregs 1 0
R0  : 00000000
R1  : A5A5A5A5
R2  : 00000000
R3  : 00000001
R4  : A5A5A5A5
R5  : A5A5A5A5
R6  : A5A5A5A5
R7  : 10000948
R8  : A5A5A5A5
R9  : A5A5A5A5
R10 : A5A5A5A5
R11 : A5A5A5A5
R12 : A5A5A5A5
SP  : 10000948
LR  : 00000D0D
PC  : 0000031C
PSR : 61000000
MSP : 10001FA0
PSP : 10000948

CFBP: 02000000

redlink>probeclosebyindex 1
Probe Handle 1 Closed
redlink>exit


You'll know after the WIRESWDCONNECT command whether or not you have a debug connection to the target.

Thanks and regards,
LPCXpresso-Support
0 Kudos