Target marked as not debuggable

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

Target marked as not debuggable

2,085 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MindBender on Tue Jun 16 04:23:36 MST 2015
Since halfway this morning I can no longer debug my Embedded Artists LPC1788 board. When I'm trying run my code I'm getting a window with the following error:
Error reported by target
02: Failed on connect
  Target marked as not debuggable.
  Emu(0): Conn&Reset. Was: None. DpID: 00000000. CpuID: 00000000. Info: (null)

Aside from the regular unplugging and replugging of the LPC-Link2 it was working pretty well so far, but now unplugging, replugging, resetting and power-cycling doesn't get it to work.

Any ideas?
0 Kudos
Reply
9 Replies

1,958 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Jun 16 08:17:16 MST 2015
I should point out that if you are debugging, you do not need to erase the target flash. Just boot your target into ISP mode, and then the debugger will connect.

As the FAQ says, there are certain things your code can do (such as incorrectly setup the clock) so that NO debugger will be able to connect. However, with ISP mode, the chip is reset, the on-chip (ROM) bootloader is run, and your application is NOT run. At this point any debugger will be able to connect, without you having to erase your (bad) application from the flash. The debugger can download a new application, or, if you are trying to figure out what went wrong, you can debug the application.
0 Kudos
Reply

1,958 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Tue Jun 16 08:08:01 MST 2015

Quote: MikeSimmonds

Quote: starblue

You can use lpc21isp (that's what I do).



lpc twenty one isp?



My guess is it means LPC21xx In System Programming. Though nowadays it can handle a bit more than just LPC21xx.
0 Kudos
Reply

1,958 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MindBender on Tue Jun 16 08:03:57 MST 2015
Wow, you guys are way too fast for me to keep up, but I've got it working now. I went the FlashMagic way, using a virtual machine, because that was the fist tip I got.

A couple of caveats I'm willing to admit here: An LPC-Link2 shows up as a serial port on a Windows machine, but that's not the serial port you need to use. You need to use the serial port connected to UART0 on your SoC. The SoC has a bootloader in ROM listening to UART0 when powered up with the signal ISPEN activated. Using FlashMagic on that serial port, at a bit rate of 57k6 or lower (I used 19k2) and the board powered up with ISPEN activated, FlashMagic can work its magic.

In Linux, you can probably do the things FlashMagic does automatically, manually in minicom. They appear to be human readable commands. I didn't try this myself though. The tool lpc21isp can do this automatically under Linux and can be found here:
http://sourceforge.net/projects/lpc21isp
I didn't try that one either, but I'm sure I will, because I'm trying to underclock my LPC1788.

Thanks for all the help guys!
0 Kudos
Reply

1,958 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Tue Jun 16 07:00:15 MST 2015

Quote: starblue

Quote: MindBender
but unfortunately FlashMagic won't work on my Linux workstation


You can use lpc21isp (that's what I do).



lpc twenty one isp? shouldn't that be eighteen less --- lpc two ipc.

I don't know, I am not a Linux user

Mike
0 Kudos
Reply

1,958 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MikeSimmonds on Tue Jun 16 06:58:20 MST 2015
For just erasing a 'bad' image in flash via ISP, you could very probably get away with a terminal emulator. I understand that Linux
has a full range of those.

Just set baud to 57600 (or less) as there is a ROM bug that can't auto baud any higher.

See the UM for details.

Enter "?" (no-return/linefeed?)
Should receive 'Synchronized"<CR>
Enter "Syncronized"<CR>
Enter clock speed in KHz (I think -- see UM) e.g. "72000"<CR> for 72 MHz

Then Issue erase commands ...
Unlock ...
Prepare ...
Erase ...
Blank Check ...

Programming is too complicated to do by hand.

For syntax etc, I again refer you to the device UM.

Cheers, Mike

EDIT: the bloody bloody posting code removes anything in angle brackets! Imagine some "left angle bracket CR right angle bracket"
scattered about in the obvious places. Sheesh -- it gets me every single bloody time!
0 Kudos
Reply

1,958 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Tue Jun 16 06:38:34 MST 2015

Quote: MindBender
but unfortunately FlashMagic won't work on my Linux workstation


You can use lpc21isp (that's what I do).
0 Kudos
Reply

1,958 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Jun 16 06:32:21 MST 2015
First of all, boot into ISP and try to debug again  :)

If that fails, use FlashMagic...

And don't forget: UART ISP cannot be used at rates higher than 57,600 bits per second  :((
0 Kudos
Reply

1,958 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MindBender on Tue Jun 16 06:05:21 MST 2015
The problem started after programming an image, so I can rule out cable and power related problems. I'm using an Embedded Artists LPC1788, which is considered to be a reference design, so I can rule out electronic design related problems.

I'm using a stripped version of the Embedded Artists demo application and I did not manipulate any CRP fuses. I can't rule out they aren't touched as a side-effect of something else, but that's not very likely. The same goes for the debug pins.

However, I was mucking around with the CPU clock in my last download. I nearly overlooked that in your FAQ: Please consider making that a separate bullet point.

I have worked a lot with JTAG tools, but locking yourself out in this way is pretty rare in my experience. I will try the recommendations in the FAQ, but unfortunately FlashMagic won't work on my Linux workstation :-(. (Pretty awesome there's a Mac version though)
0 Kudos
Reply

1,958 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Tue Jun 16 04:28:16 MST 2015
Please read the FAQ:
http://www.lpcware.com/content/faq/lpcxpresso/target-marked-not-debuggable
0 Kudos
Reply