From: Dario V. <dar...@ti...> - 2008-07-31 11:14:18
|
Hi all, I found that after manually setting hardware breakpoints 'flash write_image' and 'verify_image' commands fail if there are no more hardware breakpoints available. I think they should be removed before command execution and then restored. --------------------------------------------------------- (STR9comStick, ARM966E, FT2232, openocd svn 881) --------------------------------------------------------- > bp 0x40 4 hw > bp 0x100 4 hw > verify_image prog.elf no watchpoint unit available for hardware breakpoint can't add hardware breakpoint, resource not available can't add breakpoint to finish algorithm execution error executing arm7_9 crc algorithm Runtime error, file "?", line 1: no watchpoint unit available for hardware breakpoint can't add hardware breakpoint, resource not available can't add breakpoint to finish algorithm execution error executing arm7_9 crc algorithm In procedure 'verify_image' called at file "?", line 1 > > rbp 0x40 > rbp 0x100 > verify_image prog.elf verified 5588 bytes in 0.109375s > --------------------------------------------------------- Another question, about 'working_area'. By default scripts (at least str9comstick.cfg) point at the beginning of SRAM. For this reason it is not very clear what 'working_area' is (unless you read the documentation...) and one can believe (me, for example...) it is the beginning of internal SRAM. If you load an application into the RAM at the same address (normally at the beginning of SRAM) using 'load-image' there is no check of this conflict and the load_image algorithm will overwrite itself while running. Similar problem can happen if you are stepping an application (loaded in flash) and you want to load an image (data for debugging purpose) into the RAM at a known free address and then resume the application. The beginning of the RAM will be overwritten by the algorithm code so some variable of your running application is now dirty (registers too?). In this case you can use the 'backup' option of 'working_area' command but it is not in the default script (should it be?) nor a warning is given to the user. The problem is evident only with 'dcc_downloads' enabled. ----------------------------------------------------------------------------------- (STR9comStick, ARM966E, FT2232, openocd svn 881) using default scripts (nobackup) ----------------------------------------------------------------------------------- > mdw 0x50000000 64 0x50000000: e1a02000 e3e00000 e1a03001 e3a04000 ea00000b e7d21004 e59f7030 e0200c01 0x50000020: e3a05000 e3500000 e1a06080 e2855001 e1a00006 b0260007 e3550008 1afffff8 0x50000040: e2844001 e1540003 1afffff1 eafffffe 04c11db7 00000000 00000000 00000000 0x50000060: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000080: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > mww 0x50000000 0 64 > mdw 0x50000000 64 0x50000000: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000020: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000060: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000080: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > dump_image zero.img 0x50000000 256 dumped 256 byte in 0.015625s > load_image zero.img 0x50000000 bin 256 byte written at address 0x50000000 downloaded 256 byte in 0.015625s > mdw 0x50000000 64 0x50000000: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000020: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000060: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [OK] 0x50000080: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > arm7_9 dcc_downloads enable dcc downloads are enabled > load_image zero.img 0x50000000 bin 256 byte written at address 0x50000000 downloaded 256 byte in 0.015625s > mdw 0x50000000 64 0x50000000: 00000000 e3110001 0afffffc ee111e10 e4801004 eafffff9 00000000 00000000 0x50000020: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000060: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [NOT OK] 0x50000080: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > mww 0x50000000 0x11111111 64 > mdw 0x50000000 64 0x50000000: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x50000020: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x50000040: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x50000060: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x50000080: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x500000a0: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x500000c0: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x500000e0: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 > load_image zero.img 0x50000000 bin 256 byte written at address 0x50000000 downloaded 256 byte in 0.015625s > mdw 0x50000000 64 0x50000000: 50000410 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x50000020: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x50000040: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x50000060: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 [NOT OK] 0x50000080: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x500000a0: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x500000c0: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 0x500000e0: 11111111 11111111 11111111 11111111 11111111 11111111 11111111 11111111 > arm7_9 dcc_downloads disable dcc downloads are disabled > load_image zero.img 0x50000000 bin 256 byte written at address 0x50000000 downloaded 256 byte in 0.015625s > mdw 0x50000000 64 0x50000000: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000020: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000040: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x50000060: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [OK] 0x50000080: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000a0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000c0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0x500000e0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 > ----------------------------------------------------------------------------------- Best regards, Dario |