Debug/Program problem

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

Debug/Program problem

662 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hjvanderlinden on Sat Nov 19 05:52:55 MST 2011
I am learning to work with NXP LPC's and have bought a dev board of off Ebay (LPC1768 dev board LandTiger). I want to use this board to develop because it has a lot of useful peripherals like a touch sensitive display.
However, when I attach the LPC-link JTAG to the target LPCXpresso tells me the target is not debuggable. What is the problem here?

Things I have tried:
LPCXpresso --> message: target not debuggable
LPCXpresso after putting the board in boot loader --> target not debuggable

Using Flash Magic
Flash Magic --> device is in use (with all ISP configurations)

Heiko
0 Kudos
9 Replies

534 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hjvanderlinden on Sat Nov 19 12:36:37 MST 2011
Hi Rob and Zero,

Thanks a lot for the quick replies and helping me solve my problem :)

I will explain how I got there with both your help so others in the future can solve the same problem... It came down to making the adapter cable and installing the JTAG_SEL jumper (JP4)

**************************************************************
HOW TO:
I cut/sawed/broke the LPC-link off the target board. This took some time and patience as the width of the saw line is minimal due to the LPCXpresso board line layout

Then I made a cable using a 10 pin JTAG interface wire. I cut off one connector, released the wires and striped/tinned the wire end. Then I connected the wires to two 10 pin SIL headers which were soldered to a piece of testboard. See the pictures in the link:

http://imageshack.us/g/502/dsc00366z.jpg/

***************************************************************
Header pinouts:
10 pin JTAG top view on LPC-link: pin 1 is bottom left (arrow head designates 1), pin 2 is top left, 10 is top right, 9 is bottom right
20 pin JTAG top view on LandTiger Board: pin 1 is top right, pin 2 is bottom right, pin 19 is top left, pin 20 is bottom left

The schematics for an adapter from Embedded Artists (EA) can be found here (click on the schematics link):
http://www.embeddedartists.com/products/acc/acc_jtag_adapter_kit.php

JTAG 10 pin    JTAG 20 pin
1                       1
2                       7
3                       GND = pins 4,6,8,10,12,14,16,18,20
4                       9
5                       GND = pins 4,6,8,10,12,14,16,18,20
6                       13
7                       11
8                       5
9                       GND = pins 4,6,8,10,12,14,16,18,20
10                     15

**************************************************************
Tips: I took the edge of a test board. Here there were unconnected columns of copper which saved me time and effort accurately cutting the traces... Use a piece of wire to connect all the ground connections. I used a piece of resistor 'leg' to solder a bridge to hold down the multicable and avoid mechanical load during install and pull out. After soldering all the wires check the connections with a conductivity checker!

***************************************************************
The LandTiger board worked with LPC-Link after installing the JTAG_SEL jumper JP4. I had no jumper for this so I took the jumper from the SPEAKER (SPK JP2). After this the whole thing worked just fine!

Thanks for your help and I hope this may help a few other starters...
Heiko
0 Kudos

534 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Sat Nov 19 08:09:58 MST 2011
Heiko,

just a sanity check:

Did you disable the J-link interface on the LandTiger board?

Did you insert the two jumpers JP6 and JP7 when using Flashmagic?

Did you connect the JTAG/SWD wires from the LPC-Link J4 to the LandTiger board as follows:[INDENT]LPC-Link pin 15 (Gnd) to pin 4,6,8,....20 of CN1
LPC-Link pin 11 (Reset) to pin 15 of CN1
LPC-Link pin 9 (TDI) to pin 5 of CN1
LPC-Link pin 7 (TDO/SWO) to pin 13 of CN1
LPC-Link pin 5 (TCLK/SWCLK) to pin 9 of CN1
LPC-Link pin 3 (TMS/SWDIO) to pin 7 of CN1
[/INDENT]And of course you do have power applied to your LandTiger board ...

Rob
0 Kudos

534 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Nov 19 07:57:24 MST 2011

Quote:

In the configuration window that opens there is no debugger tab. Is this tab somewhere else?

No, it's exactly where it should be :)


Quote:

I tried the debug with the LandTiger board attached and I also get that 'not debuggable' error with only the LPC-link board attached to USB. Could it be that the software thinks that the LPC-link MCU is the target instead of the attached MCU?

No that's nonsense. LPC-Link is trying to establish a debug connection, with or without connected target mcu. If there is no target mcu, you get this error message:
[INDENT] Error launching Debug\blablabla.axf
02: Failed on connect: Ep(01). Target marked as not debuggable.:[/INDENT]
0 Kudos

534 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Sat Nov 19 07:56:32 MST 2011

Quote: hjvanderlinden
I cannot find the debugger tab... In the configuration window that opens there is no debugger tab. Is this tab somewhere else?


No, if you follow what's in the link Zero provided (...) then you open the a window called "Debug Configurations". You must now have opened this view using the instructions provided by Code Red or manually click on the C project in the left pane (e.g. your_project Debug), then you'll see the debug tab on your right hand side.

But you don't _need_ to do this, if you leave everything as is, the LPCXpresso tools will figure out what to use. Since JTAG and SWD use the same pins this should work.


Quote: hjvanderlinden

I tried the debug with the LandTiger board attached and I also get that  'not debuggable' error with only the LPC-link board attached to USB.


Which version of the tools are you using. ?
I tried to debug with just the LPC-Link board attached and then the software just 'hangs'. I've never seen the "not debuggable"  message.

Rob
0 Kudos

534 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hjvanderlinden on Sat Nov 19 07:34:46 MST 2011
Hi Zero!

I checked the connecting to jtag document. I cannot find the debugger tab... In the configuration window that opens there is no debugger tab. Is this tab somewhere else?

I tried the debug with the LandTiger board attached and I also get that 'not debuggable' error with only the LPC-link board attached to USB. Could it be that the software thinks that the LPC-link MCU is the target instead of the attached MCU?

Heiko
0 Kudos

534 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Nov 19 06:50:33 MST 2011

Quote:

I don't understand yet how the Serial Wire Debug works...

http://support.code-red-tech.com/CodeRedWiki/CM3_SWD


Quote:

How would I attach...

http://support.code-red-tech.com/CodeRedWiki/ConnectingToJtag


Quote:

it is possible to use the JTAG to do ISP...


As described above, LPCXpresso can use JTAG and SWD (at LPC1769 = Cortex M3). Default (and more modern ) option is SWD :rolleyes:
0 Kudos

534 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Sat Nov 19 06:38:55 MST 2011
I don't have one of these but after a bit of browsing I found schematics.
I think it is this board you have?

In that case there is already a J-link module on the board - see page 3 of the PDF.
In order to use the LPC-Link you have to check how to disable the J-Link interface (maybe by placing shorting the JTAG_SEL jumper JP4.

What do you mean by:
Quote:

Using Flash Magic
Flash Magic --> device is in use (with all ISP configurations)


Looking at the schematics, Flashmagic can be used on the COM1 connector when you place jumpers at JP6 and JP7.

Rob
0 Kudos

534 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hjvanderlinden on Sat Nov 19 06:37:10 MST 2011
Hi Zero!

Thanks again for your quick answer. Much appreciated!

You are correct that I am using a separated LPC-link board and am connecting this to the LandTiger board. I don't understand yet how the Serial Wire Debug works and am currently using JTAG to interface with the LandTiger board.

How would I attach to the dev board if I am going to use SWD?

Heiko
P.S. a sanity check question: it is possible to use the JTAG to do ISP and debug right? Or is the debug only possible with SWD?
0 Kudos

534 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Nov 19 06:15:19 MST 2011

Quote:

However, when I attach the LPC-link JTAG to the target LPCXpresso...

What :confused:

Usually "LPC-Link" means the separated LPCXpresso LPC-Link board.
Usually "target LPCXpresso" means the separated LPCXpresso target board (with 1769 or 1343 or...).

If I understand you right, you are trying to connect a separated LPC-Link with a  'LandTiger development board' :)

That should work without problems if you just connect SWD, Reset and GND :eek:

See: #9 of http://knowledgebase.nxp.com/showthread.php?t=1874
0 Kudos