EDIT: When you run flash write_bank the offset should be 0 not 0xfffc0000
I now have OpenOCD working with algorithms on the kuropro. It was r670 of OpenOCD with the patch at
http://byronbradley.co.uk/jtag/openocd- ... dley.patch (Full source:
http://byronbradley.co.uk/jtag/openocd- ... ley.tar.gz), using the Olimex tiny usb jtag adapter and the config file at
http://byronbradley.co.uk/jtag/lsp_olimex.txt.
Get your u-boot image and
http://byronbradley.co.uk/jtag/kuropro_ ... oot.script in the same directory as everything else and modify the last couple of lines of the script with the correct image file. The the commands should go along the lines of:
Code:
openocd -f lsp_olimex.txt
Then connect via telnet, you will probably have to enable dbgrq before it will halt successfully:
Code:
$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
>reset
JTAG device found: 0x07926041 (Manufacturer: 0x020, Part: 0x7926, Version: 0x0)
Timed out waiting for halt after reset
> arm7_9 dbgrq enable
use of EmbeddedICE dbgrq instead of breakpoint for target halt enabled
> reset
JTAG device found: 0x07926041 (Manufacturer: 0x020, Part: 0x7926, Version: 0x0)
target state: halted
target halted in ARM state due to debug request, current mode: Supervisor
cpsr: 0x400000d3 pc: 0xfffc2c30
MMU: disabled, D-Cache: disabled, I-Cache: enabled
> script kuropro_post_uboot.script
0 0 1 0: 00052078
dcc downloads are enabled
236248 byte written at address 0x00000000
16 byte written at address 0x00f4c000
downloaded 236264 byte in 2.990981s
verified 236264 bytes in 2.264992s
If it verified correctly then algorithms are working and you can flash using the working area:
Code:
> flash probe 0
flash 'cfi' found at 0xfffc0000
> flash info 0
#0: cfi at 0xfffc0000, size 0x00040000, buswidth 1, chipwidth 1
#0: 0x00000000 (0x1000 4kB) protection state unknown
[......]
#63: 0x0003f000 (0x1000 4kB) protection state unknown
non-cfi flash:
mfr: 0x00bf, id:0x00d6
> flash erase_sector 0 0 63
erased sectors 0 through 63 on flash bank 0 in 8.105110s
> flash write_bank 0 u-boot.bin 0
>
If you want to verify the image was written correctly then you can run:
Code:
> verify_image u-boot.bin 0xfffc0000
verified 262144 bytes in 1.777500s
>
or dump the image back to file and use something like vbindiff to compare them:
Code:
> dump_image u-boot.dump.bin 0xfffc0000 0x40000
dumped 262144 byte in 27.148109s
>
$ vbindiff u-boot.bin u-boot.dump.bin