Forums

Flash program failure > 4k OpenOCD Eclipse Olimex Tiny

Started by artsaagluap August 3, 2008
Hi,

I have been successfully using my Olimex JTAG tiny with OpenOCD in
Eclipse (using an version on the Olimex GCC for Dummies which came
with my LPC-P2103) writing small programs.

Now I have one bigger than 4K. I was getting strange program
behaviour and when I looked at flash memory using the debugger I saw
that all locations bigger than 0x00000FFF were FF's.

Looking at the console I found this:

11 monitor flash write 0 main.bin 0x0
&"monitor flash write 0 main.bin 0x0\n"
monitor flash write 0 main.bin 0x0
@"failed writing file main.bin to flash bank 0 at offset 0x00000000
\n"
failed writing file main.bin to flash bank 0 at offset 0x00000000
@"flash program error\n"
flash program error
11^done

Even though there was this error I carried on and allowed me to run
the program and set breakpoints etc.

Anybody got some advice for my next step?

An Engineer's Guide to the LPC2100 Series

Oops, problem solved. See below.
--- In l..., "artsaagluap" wrote:
>
> Hi,
>
> I have been successfully using my Olimex JTAG tiny with OpenOCD in
> Eclipse (using an version on the Olimex GCC for Dummies which came
> with my LPC-P2103) writing small programs.
>
> Now I have one bigger than 4K. I was getting strange program
> behaviour and when I looked at flash memory using the debugger I
saw
> that all locations bigger than 0x00000FFF were FF's.
>
> Looking at the console I found this:
>
> 11 monitor flash write 0 main.bin 0x0
> &"monitor flash write 0 main.bin 0x0\n"
> monitor flash write 0 main.bin 0x0
> @"failed writing file main.bin to flash bank 0 at offset 0x00000000
> \n"
> failed writing file main.bin to flash bank 0 at offset 0x00000000
> @"flash program error\n"
> flash program error
> 11^done
>
> Even though there was this error I carried on and allowed me to
run
> the program and set breakpoints etc.
>
> Anybody got some advice for my next step?
>

reading the:

http://openfacts.berlios.de/index-en.phtml?
title=OpenOCD_configuration

site I saw that I had the wrong version for my LPC2103 it should
have been v2.

So now in my .cfg file I have:
#flash configuration
flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v2 0 14765 calc_checksum

and it works. Note that newer versions of openOCD have a different
order for the parameters.