where to start ?
-
starting openocd works only one in about 4 times. The other times it returns various, different errors…
-
then, ‘halt’ rarely actualy halts the cpu(s)
-
therefore ‘flash write_image erase’ doesn’t work in that case
-
but even if it’s halted, you get about 1 chance in 3 for the flash to complete anyway (error 0904 or something) – trying again /usualy/ works.
I won’t mention the debug, since ‘printf’ is a hell of a lot faster than trying to get anything working there.
And yes I tried changing jtag speed, I tried several jtagkeys, and several hosts. It’s consistent. It’s also consistent on all the various stellaris demo kits and on my own custom hardware.
I’m going to try again on a fresh svn and see if it makes a difference…
% telnet localhost 4444
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.
Open On-Chip Debugger
targets
CmdName Type Endian ChainPos State
0: target0 cortex_m3 little 0 unknown
1: target1 cortex_m3 little 1 unknown
halt
target was in unknown state when halt was requested
flash write_image erase target_comms/gcc/target_comms.bin 0x800
auto erase enabled
Algorithm flash write 2048 words to 0x800, 7699 remaining
timed out while waiting for target halted
error executing stellaris flash write algorithm
flash writing failed with CRIS: 0x0
error writing to flash at address 0x00000000 at offset 0x00000800 (-902)
Runtime error, file “?”, line 1:
In procedure ‘flash’ called at file “command.c”, line 445
In procedure ‘unknown’ called at file “?”, line 1
flash write_image erase target_comms/gcc/target_comms.bin 0x800
auto erase enabled
Algorithm flash write 2048 words to 0x800, 7699 remaining
Algorithm flash write 2048 words to 0x2800, 5651 remaining
Algorithm flash write 2048 words to 0x4800, 3603 remaining
Algorithm flash write 1555 words to 0x6800, 1555 remaining
wrote 30796 byte from file target_comms/gcc/target_comms.bin in 4.736969s (6.348832 kb/s)
targets 1
Connection closed by foreign host.
Other shell:
zsh: segmentation fault sudo openocd -f catbells.cfg