EmbeddedRelated.com
Forums

JTAG Debugger

Started by mark_dell555 October 26, 2005
Sounds like the JTAG is still flaky.

Michael

>I noticed another problem with the debugging. When i just let the
>code run, and then hit stop, most of the time it will stop correctly
>within the RAM code. But sometimes it will stop with PC = 0x0000xxxx.
> Ie somewhere in flash. Flash is clear so there is no code there.
>Interrupts are disabled. Not sure why but sometimes it messes up when
>I tell it to stop. It will run correctly for a long time, until i
>tell it to stop. Weird. >Mark >Yahoo! Groups Links




An Engineer's Guide to the LPC2100 Series

Does anyone know how to setup flash jtag programming through the
debugger (AXD) ? Thanks,
Mark


Mark,

> Does anyone know how to setup flash jtag programming through the
> debugger (AXD) ?

The LPC2106 user manual states (page 199):

JTAG FLASH PROGRAMMING INTERFACE

There are three possibilities for this interface:
1. Debug tools can write parts of the flash image to the RAM and then
execute the IAP call "Copy RAM to Flash" repeatedly
with proper offset.
2. Debug tools can execute the flash programming code via JTAG port. I did not see a "3." in the user manual ... but point 1 seems to be simple.
Prepare a command parameter table with command and (optional) parameters
and have r0 point to this table, also have a piece in memory for the
command result table (point r1 to this) and then execute the IAP call.

I'm not sure how control gets back to the debugger so I would write a 2
word program (BL 0x7ffffff1 and a B <self> or NOP) and place a breakpoint
on the second instruction to return to the debugger.

Rob

-- Three is the number one shall count
One shall not count to two unless to proceed to three ...


mark_dell555 wrote:

>Does anyone know how to setup flash jtag programming through the
>debugger (AXD) ? >

Well, I use an Abatron BDI2000 and that operation is done in the
firmware of the probe (BDI2000). I could not correctly program the
LCP2138 until I got some beta firmware from Abatron. I don't know if
Abatron uses their own algorithm or calls the IAP code in Flash... TomW --
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------