Michael Schwingen came up with this idea. I thought I'd flesh it out a
bit w/the current tcl implementation.

The idea is to have commands that the target library defines a standard
for, but are actually implemented by the target scripts.

These are some examples of commands that work for all targets. The
implementation is very different.

produce <filename> <serialnumber>. Here filename is a single file.
The serial number is a text string. The actual file format and serial
number definition is defined and implemented inside the "produce"
procedure that the target defines. This method throws an
exception if the production failed. If the production succeeded the
function returns human readable status output. The serial number
is optional. Some target scripts can read the serial number from
the hardware.

other such commands that should work on all targets?

Implementation:

a target script will be in tcl if it ends w/.tcl, otherwise it is
a classic config script

Example. At end of target/at91eb40a.tcl:

proc produce {filename serialnumber} {
   openocd "reset init"
   openocd "flash write_image $filename elf"
   openocd "flash verify_image $filename elf"
   openocd "flash fillw 0x1001234 $serialnumber"
}




-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to