On Nov 21, 2008, at 8:15 PM, Carlos Antunes wrote:

Hello!

I am trying to use OpenOCD trunk to flash the TinCanTools Hammer Board and I am getting an error. As I am a newbie, I don't know whether the screw up is of my making.


Probably not.

I start OpenOCD with the command:

openocd -f interface/flyswatter.cfg -f target/hammer.cfg -c "init" - c "reset"


Hurray!  Someone uses the built-in configs.

After that, I enter "halt" followed by "debug_level 3" and try to flash the Hammer with:

flash write_bank 0 /home/cmsa/devel/TCT-Hammer/sources/apex-1.5.6/ apex.bin 0x0

This is what I get back:

Debug: 193 216589 command.c:91 script_command(): script_command - write_bank Debug: 194 216589 command.c:108 script_command(): script_command - write_bank, argv[0]=ocd_flash_write_bank

[ snip many lines of boring debug logs that essentially mean "everything was working fine"]

Debug: 296 216881 target.c:717 target_call_event_callbacks(): target event 22 (debug-halted)

So, the target is halted in debug mode. This is what we expect since we put in a breakpoint at the end of the flash algorithm.


Debug: 297 216881 target.c:3125 target_handle_event(): event: 22 debug-halted - no action

And there are no registered handlers for that action. Not a big surprise.


Debug: 298 216881 target.c:1787 target_wait_state(): waiting for target debug-running...

This _appears_ to be coming from arm7_9_dcc_completion(). That method is specified to be called at the end of an arm7_9 write memory block. It is the only place in the arm7_9 code base where we wait for that particular state.


Error: 300 217221 target.c:1794 target_wait_state(): timed out while waiting for target debug-running

But we didn't hit that state in time. This probably has to do with the fact that the device is already halted. This failure bubbles up and causes the overall flash to fail. I don't have a arm7_9 based device to test against, but I suggest someone step through the flash routine and specifically the arm7_9 run algorithm code.


Debug: 301 217221 embeddedice.c:401 embeddedice_write_reg(): 12: 0x00000000 Debug: 302 217221 embeddedice.c:401 embeddedice_write_reg(): 12: 0x00000000 Debug: 303 217222 embeddedice.c:401 embeddedice_write_reg(): 20: 0x00000000 Error: 304 217225 flash.c:111 flash_driver_write(): error writing to flash at address 0x00000000 at offset 0x00000000 (-4) Debug: 305 217225 command.c:416 run_command(): Command failed with error code -4 User: 306 217225 command.c:616 openocd_jim_vfprintf(): Runtime error, file "?", line 1: User: 307 217225 command.c:616 openocd_jim_vfprintf(): User: 308 217226 command.c:616 openocd_jim_vfprintf(): In procedure 'flash' called at file "command.c", line 445 User: 309 217226 command.c:616 openocd_jim_vfprintf(): In procedure 'unknown' called at file "?", line 1

Any ideas?

Thanks!

Carlos




_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

--
Rick Altherr
[EMAIL PROTECTED]

"He said he hadn't had a byte in three days. I had a short, so I split it with him."
 -- Unsigned



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to