How to Flash Executable Files (March 6, 2008, by cpo) ********************************************************************** When bringing an RCE up for the first time: - download ffsInit over JTAG using xmd - connect to xmd using gdb - "break init_executive" (and perhaps __cxa_throw if you are interested in the c++ exceptions) - "set doFormat=1" - delete the init_executive breakpoint (this is important because otherwise the image will get the breakpoint's "trap" instruction saved into flash). - continue program execution - if everything goes correctly, you should see 0xabadcafe show up in the LED display This writes the executable into image0. It has two "bootparams setting": rotary switch position 0 will do that fast memory test, rotary switch location 1 will do the full memory test. The plan is to have the safe executable in image0 and be selectable from rotary switch position zero. For safety, this is NOT over-writable by the other flash mechanism described below. Also, we should probably do our best to have a one-to-one correspondence between the rotary switch setting and the file number (which is enforced in software when adding additional executables to the program flash, as described below). ********************************************************************** To add another executable to the RCE program flash: - download the executable over JTAG using xmd - connect to xmd using gdb - "break Init" - "set rce_flash_image_number=N" where 1<=N<=15. I recommend a number >=2 to avoid overwriting the default images put into the RCE at board commissioning time. This will write the image into that file number, and the rotary switch will also point to that file number. - delete the Init breakpoint (this is important because otherwise the image will get the breakpoint's "trap" instruction saved into flash). - continue program execution.