EmbeddedRelated.com
Forums
Memfault Beyond the Launch

internal flash programming using ARM Multi-ICE

Started by windam_2000 January 24, 2007
Hi All,

I'm using an ARM Multi-ICE on a MCB2130 board (LPC2138) and debugging
via gdb insight. So far, I've only been able to use the flash utility
via ISP to flash the chip.
The eventual product will only have a jtag connector, so I was
wondering how I can flash the chip via jtag. I tried searching this
list, but didn't find any posts that answered my query.
Does anyone have any experience with this?

Thanks in advance,

-win

An Engineer's Guide to the LPC2100 Series

This doesn't directly answer your question... but it's worth a read.

Try the sparkfun forums under the OpenOCD thread.
http://www.sparkfun.com/cgi-bin/phpbb/viewforum.php?f&sid229f5a0a7cdb
d808ba92765d94f8b

I managed to flash an image onto my LPC2148 board using openOCD.
I still have a tough time debugging though.

Grant

-----Original Message-----
From: l... [mailto:l...]On Behalf Of
windam_2000
Sent: Wednesday, January 24, 2007 4:53 PM
To: l...
Subject: [lpc2000] internal flash programming using ARM Multi-ICE
Hi All,

I'm using an ARM Multi-ICE on a MCB2130 board (LPC2138) and debugging
via gdb insight. So far, I've only been able to use the flash utility
via ISP to flash the chip.
The eventual product will only have a jtag connector, so I was
wondering how I can flash the chip via jtag. I tried searching this
list, but didn't find any posts that answered my query.
Does anyone have any experience with this?

Thanks in advance,

-win
--- In l..., "windam_2000" wrote:
>
> Hi All,
>
> I'm using an ARM Multi-ICE on a MCB2130 board (LPC2138) and debugging
> via gdb insight. So far, I've only been able to use the flash utility
> via ISP to flash the chip.
> The eventual product will only have a jtag connector, so I was
> wondering how I can flash the chip via jtag. I tried searching this
> list, but didn't find any posts that answered my query.
> Does anyone have any experience with this?
>
> Thanks in advance,
>
> -win
>
Hi Win,

programming support comes or does not come with the debugger of the
tool. ARM Multi-ICE no matter if it comes with ARM Real-View or ADS
does not support internal Flash programming on the LPC or as far as I
know neither any other devices. Packages supporting Flash programming
through the debugger interface are at least IAR, Keil and Rowley, also
emulators like Lauterbach, Hitex, Ashling or Nohau through their user
interface. While it does not really help your situation may be it
helps at least to understand the background. The debugger vendor, in
your case ARM needs to implment this programming support.

Bob
Win,

Yes, you can program the Flash via JTAG and it's fairly easy.
See section 20.9 in the LPC2131/32/34/36/38 User manual (UM10120).
You can write a small assembly program to do the programming but NXP
designed the In Application Programming interface in such a way that it
is easy to use directly from your debugger. Just setup the data
structure, place a pointer in R0 for the parameters and R1 for the
result and call the IAP handler.

The manual even includes an example.
Please read the manual on this. It's easy to use but it's also easy to
make a mistake [:)]

Most debuggers will allow some scripting. I am not familiar with gdb but
I guess that gdb will allow you to make some kind of script that does
the job for you.

IAP (In Application Program) is easy. You do not need any special JTAG
programming code to toggle all the bus-lines from the ARM core like in
the old days with external flash.

Have fun!

Rob

--- In l..., "lpc2100_fan" wrote:
>
> --- In l..., "windam_2000" windam_2000@ wrote:
> >
> > Hi All,
> >
> > I'm using an ARM Multi-ICE on a MCB2130 board (LPC2138) and
debugging
> > via gdb insight. So far, I've only been able to use the flash
utility
> > via ISP to flash the chip.
> > The eventual product will only have a jtag connector, so I was
> > wondering how I can flash the chip via jtag. I tried searching this
> > list, but didn't find any posts that answered my query.
> > Does anyone have any experience with this?
> >
> > Thanks in advance,
> >
> > -win
> >
> Hi Win,
>
> programming support comes or does not come with the debugger of the
> tool. ARM Multi-ICE no matter if it comes with ARM Real-View or ADS
> does not support internal Flash programming on the LPC or as far as I
> know neither any other devices. Packages supporting Flash programming
> through the debugger interface are at least IAR, Keil and Rowley, also
> emulators like Lauterbach, Hitex, Ashling or Nohau through their user
> interface. While it does not really help your situation may be it
> helps at least to understand the background. The debugger vendor, in
> your case ARM needs to implment this programming support.
>
> Bob
>
Win,

can you tell me how you configure gdb insight to work with ARM Multi-
ICE. What type of server to you use (Multi-ICE server).

Thanks,

Kurt

--- In l..., "windam_2000"
wrote:
>
> Hi All,
>
> I'm using an ARM Multi-ICE on a MCB2130 board (LPC2138) and
debugging
> via gdb insight. So far, I've only been able to use the flash
utility
> via ISP to flash the chip.
> The eventual product will only have a jtag connector, so I was
> wondering how I can flash the chip via jtag. I tried searching
this
> list, but didn't find any posts that answered my query.
> Does anyone have any experience with this?
>
> Thanks in advance,
>
> -win
>
Hi,

Many JTAG emulators include FLASH programmer functionallity (BDI2000,
PEEDI...)
I use PEEDI for production programming, because it can work in
stand-alone mode, i.e. does not need to be connected to PC.
--- In l..., "kurt_sterckx" wrote:
> can you tell me how you configure gdb insight to work with ARM
Multi- ICE. What type of server to you use (Multi-ICE server).

My Multi-ice is ooold --- v 1.4. It works with insight, but crashes
when you keep doing stop-continue-stop-continue... etc. Single-step
sometimes works or not. Anyway, here are my steps:

Start Multi-ice server 1.4
Start multi-ice gdb server:
multi-ice-gdb-server.exe --remote-port 9000 --byte-sex l --config-dialog
Start insight:
Run->Connect to Target
Target Selection:
Target: GDBServer/TCP
Hostname: localhost
Port: 9000

When you look at the multi-ice server window, TAP0 should be
connected. Once connected, open the elf file in insight.

For more details, see: http://ecos.sourceware.org/multi-ice.html

Hope this helps,

-win
--- In l..., "peternowotny" wrote:
> Many JTAG emulators include FLASH programmer functionallity
(BDI2000, PEEDI...)
> I use PEEDI for production programming, because it can work in
> stand-alone mode, i.e. does not need to be connected to PC.

Thank you all for your responses! I will look into using gdb's
"monitor flash write" command.
However, I'm researching this for the production folks as well.
They will connect via jtag to the board which has the LPC2138 and
flash the main program into it.
We already have several old parallel port Multi-ICEs so I wanted to
know if the production folks could use it.
The PEEDI sounds like a better fit for them. Thanks for letting me know.

Cheers,

-win

Memfault Beyond the Launch