Forums

Olimex Board LPC-L2294 - run program from flash

Started by "claus.meyer73" March 14, 2007
Hello,

I have an Olimex Board LPC-L2294 with Olimex ARM-USB-OCD.
I use Yagarto with OpenOCD and Eclipse.
I can write a program and transfer it to the RAM of the LPC2294. It
runs in a correct way. :-)

I can generate a BIN-File and transfer it to the internal flash. There
is no error-message. But the program does not start to run. :-(

Has anyone an idea whats going wrong?
How can I check if the BIN-File is OK?
Has anyone an BIN-File for the Olimex Board LPC-L2294 that toggle one Pin?
How can I check if the program is really in the internal flash?
How have I to set the jumper boot/isp/run?

Claus

An Engineer's Guide to the LPC2100 Series

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Claus,

claus.meyer73 wrote:
> Hello,
>
> I have an Olimex Board LPC-L2294 with Olimex ARM-USB-OCD.
> I use Yagarto with OpenOCD and Eclipse.
> I can write a program and transfer it to the RAM of the LPC2294. It
> runs in a correct way. :-)
>
> I can generate a BIN-File and transfer it to the internal flash. There
> is no error-message. But the program does not start to run. :-(
>
> Has anyone an idea whats going wrong?

You are using a different link file for the flash executable, right?

> How can I check if the BIN-File is OK?
> Has anyone an BIN-File for the Olimex Board LPC-L2294 that toggle one Pin?
> How can I check if the program is really in the internal flash?

You can use the Philips/NXP flash utility to read the contents of
internal flash.

> How have I to set the jumper boot/isp/run?

It's probably in the user manual or the data sheet, look it up.
If I remember correctly, both BOOT0 and BOOT1 need to be high
in order to boot from internal flash.

I think you don't need to change anything regarding the BSL and
RESET lines because you already succeeded in running from RAM.

Kind regards,
Bertrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF+D+LETD6mlrWxPURAotqAKCghmYE8a1egA9aCjdmtLvATHL6bgCglfMm
vN6wkSkgjKI4ke40KkO9JrE=k9l4
-----END PGP SIGNATURE-----
hi claus,
i am using the lpc l2294 board with openocd and i have problems
configuring the openocd.
can u send me useful data so that i can comeup with programming my lpcl2294
board using openocd.
when i tried to download the program it says "unable to open ftdi
device:1"

plz respond.

gowtham

On 14 Mar 2007 11:32:13 -0700, Bertrik Sikken wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Claus,
>
> claus.meyer73 wrote:
> > Hello,
> >
> > I have an Olimex Board LPC-L2294 with Olimex ARM-USB-OCD.
> > I use Yagarto with OpenOCD and Eclipse.
> > I can write a program and transfer it to the RAM of the LPC2294. It
> > runs in a correct way. :-)
> >
> > I can generate a BIN-File and transfer it to the internal flash. There
> > is no error-message. But the program does not start to run. :-(
> >
> > Has anyone an idea whats going wrong?
>
> You are using a different link file for the flash executable, right?
>
> > How can I check if the BIN-File is OK?
> > Has anyone an BIN-File for the Olimex Board LPC-L2294 that toggle one
> Pin?
> > How can I check if the program is really in the internal flash?
>
> You can use the Philips/NXP flash utility to read the contents of
> internal flash.
>
> > How have I to set the jumper boot/isp/run?
>
> It's probably in the user manual or the data sheet, look it up.
> If I remember correctly, both BOOT0 and BOOT1 need to be high
> in order to boot from internal flash.
>
> I think you don't need to change anything regarding the BSL and
> RESET lines because you already succeeded in running from RAM.
>
> Kind regards,
> Bertrik
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFF+D+LETD6mlrWxPURAotqAKCghmYE8a1egA9aCjdmtLvATHL6bgCglfMm
> vN6wkSkgjKI4ke40KkO9JrE> =k9l4
> -----END PGP SIGNATURE-----
>
>

--
your's
GOWTHAM
> You are using a different link file for the flash executable, right?
Yes, I change the target f .text from RAM to Flash.

> You can use the Philips/NXP flash utility to read the contents of
> internal flash.
This was a good idea. :-)

I found the mistake:
I use the Olimex ARM-USB-OCD connected to the JTAG interface. When you
connect this to the USB-Port it pull down the Reset-Line all the time.
So the LPC2294 can not start the program from flash. Start and stop
once OpenOCD on the PC. Now the Reset-Line is High and the program
will run.

Thanks for Help!

best regards

Claus
Hi Gowtham,

do you use Yagarto and ARM-USB_OCD too?

Do you have read this Manual
http://www.atmel.com/dyn/resources/prod_documents/atmel_tutorial_source.zip?
> when i tried to download the program it says "unable to open ftdi
> device:1"
This message appear when the Device ist not installed or you start the
OpenOCD twice.
Here is my OpenOCD Conf-File:

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 2

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst srst_pulls_trst

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe

#target configuration
daemon_startup reset

#target arm7tdmi
target arm7tdmi little run_and_init 0 arm7tdmi-s_r4

run_and_halt_time 0 30

#target_script specifies the flash programming script file
target_script 0 reset ./prj/temp.ocd

#working_area
<'backup'|'nobackup'>
working_area 0 0x40000000 0x40000 nobackup

#flash configuration flash bank lpc2000 0 0
[calc_checksum]
flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum

# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
I am using ARM usb ocd and i have installed yagarto i guess.
DO I need both of them for my eclipse. I am using "ARM" not atmel.
Is there any way I can program the flash using usb ocd. If yes, can u send the details. Also when i run it says "Thread[0] suspended. no stack available. here is my configuration file .

regards gowtham

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003
jtag_speed 2

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config trst_and_srst separate

#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe

#target configuration
daemon_startup reset

#target
#target arm7tdmi
target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4
run_and_halt_time 0 30

#target_script 0 reset oocd_flash2138.script
working_area 0 0x40000000 0x40000 nobackup

#flash configuration
flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum

# For more information about the configuration files, take a look at:
# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger

Hi Gowtham,
>
>do you use Yagarto and ARM-USB_OCD too?
>
>Do you have read this Manual
>http://www.atmel.com/dyn/resources/prod_documents/atmel_tutorial_source.zip?
>> when i tried to download the program it says "unable to open ftdi
>> device:1"
>This message appear when the Device ist not installed or you start the
>OpenOCD twice.
>Here is my OpenOCD Conf-File:
>
>#daemon configuration
>telnet_port 4444
>gdb_port 3333
>
>#interface
>interface ft2232
>ft2232_device_desc "Olimex OpenOCD JTAG A"
>ft2232_layout "olimex-jtag"
>ft2232_vid_pid 0x15BA 0x0003
>jtag_speed 2
>
>#use combined on interfaces or targets that can't set TRST/SRST separately
>reset_config trst_and_srst srst_pulls_trst
>
>#jtag scan chain
>#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
>jtag_device 4 0x1 0xf 0xe
>
>#target configuration
>daemon_startup reset
>
>#target arm7tdmi
>target arm7tdmi little run_and_init 0 arm7tdmi-s_r4
>
>run_and_halt_time 0 30
>
>#target_script specifies the flash programming script file
>target_script 0 reset ./prj/temp.ocd
>
>#working_area
>working_area 0 0x40000000 0x40000 nobackup
>
>#flash configuration flash bank lpc2000 0 0
> [calc_checksum]
>flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum
>
># For more information about the configuration files, take a look at:
># http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
> I am using ARM usb ocd and i have installed yagarto i guess.
> DO I need both of them for my eclipse.

> I am using "ARM" not atmel.
http://www.atmel.com/dyn/resources/prod_documents/atmel_tutorial_source.zip
This is a very good tutorial about using Yagarto and ARM-USB-OCD! They
use an Atmel board but most of it you can translate easy to the
Olimex-board.

Have also a look at this website:
http://www.yagarto.de/howto/yagarto1/index.html
He show how to debug a program in RAM. If this work you can go a step
ahead! :-)

There you find a example for the Olimex LPC-E2294 you can use with
your board too.
http://www.yagarto.de/download/yagarto/LPC2294Test.zip

Best regards

Claus