Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

JTAG Flashing of LPC2148 through openOCD

2006-03-22 by sixtyfivebit

Hi,

I am trying to flash my LPC2148 through JTAG using openOCD, which
turns out to work, but the program doesn't seem to run.

The program is the stock demo2148_blink_flash from Lynch's ARM/Eclipse
tutorial. I took the elf file and converted it to binary with
arm-elf-objdump: "arm-elf-objdump -O binary demo2148_blink_flash.elf
demo2148_blink_flash.bin"

JTAG seems to work very well, and I have never encountered an error
throughout the use of ocdcommander or openocd. 

My openocd configuration line for the LPC flashing looks like this:
flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v2 0 12000 calc_checksum

Although I'm pretty sure the flash part of the chip is greater than
0x40000, I didn't bother to change it yet. The JTAG emulator I am
using is the popular wiggler clone (in this files section).

After starting openOCD, and telneting in for the command console. I
issue the command: "flash write 0 demo2148_blink_flash.bin 0x0"
(demo2148_blink_flash.bin is of course in the same directory as the
openOCD executable).

It flashes the chip without a hitch, and then I disconnect JTAG/close
openOCD, unplug the JTAG jumper and reset the board. ... the LED isn't
flashing ...

So for investigation, I readback the flash from 0x40000000 to
0x400003B0 to see that the data was flashed, but some parts seem to
be "rearranged?" Here are the raw binary files:

http://www.breezynet.com/BinaryFile   (632bytes)
http://www.breezynet.com/FlashOnChip  (944bytes)

Is what I see in the flash due to the checksum insertion routines
OpenOCD executes? Does everything look good in general?

I'm new to all of this JTAG flashing business so please bear with me.
If there is any other sample code or detailed instructions on this
type of flashing that would be appreciated as well.. I can't seem to
find much information online about JTAG flashing for the LPC series
chips, probably because most are using the bootloader/rs-232 method
(which I can't do in my case).

Thanks-sixtyfivebit.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.