Programming HEX files with OpenOCD?

Is there a way to program just a specific HEX file into my LPC2148 header board using OpenOCD?

It looks like this is possible, but I am not sure of the proper command to use.

8-Dale

The “help” command has the following syntax:

load_image [address] [‘bin’|‘ihex’|‘elf’|‘s19’]

It takes the file as an argument, and auto-detects the image type by default. You can optionally specify an address that’s used to relocate the image, for example to load a HEX file that starts at 0x0 to address 0x10000000.

The file type can be optionally specified as a third argument.

Best regards,

Dominic

Dominic:
The “help” command has the following syntax:

load_image [address] [‘bin’|‘ihex’|‘elf’|‘s19’]

OK, got that now. :) It just seems a bit difficult to get to and use. I was hoping for a way I could use this function from the Eclipse IDE, like right click a .hex file in a project, get an option to program the file, select that and it does it. Is there a program that will allow loading a binary image from the command line using JTAG?

Oh well, I can do it this way. At least I can do it.

Thanks,

8-Dale

Ah, sorry, if you want to write to flash the command is “flash write_image” using the same arguments. This will write to all flash memories of the currently selected target as required by the image, i.e. a single image could specify sections in internal and external flash for example.

Martin Thomas has quite a lot information on using the OpenOCD in an automated way: http://www.siwawi.arubi.uni-kl.de/avr_p … index.html

Regards,

Dominic