On Mon, May 14, 2012 at 7:50 PM, Spencer Oliver <[email protected]> wrote:
> On 13 May 2012 14:58, Xiaofan Chen <[email protected]> wrote:
>> But then when I tried the standalone ST-Link V1 and the IAR
>> STM32 Starterkit STM32-SK, it failed.
>>
>> mymacmini:stm32 xiaofanc$ openocd -f interface/stlink-v1.cfg -f
>> target/stm32f1x.cfg
>> Open On-Chip Debugger 0.6.0-dev-00550-g4257cb7 (2012-05-13-21:38)
>> Licensed under GNU GPL v2
>> For bug reports, read
>> http://openocd.sourceforge.net/doc/doxygen/bugs.html
>> 1000 kHz
>> 1000 kHz
>> adapter_nsrst_delay: 100
>> Runtime Error:
>> /usr/local/Cellar/open-ocd/HEAD/share/openocd/scripts/target/stm32f1x.cfg:27:
>> invalid command name "jtag_ntrst_delay"
>> in procedure 'script'
>> at file "embedded:startup.tcl", line 58
>> at file
>> "/usr/local/Cellar/open-ocd/HEAD/share/openocd/scripts/target/stm32f1x.cfg",
>> line 27
>>
>
> The stlink cannot use the same target config, try
> openocd -f interface/stlink-v1.cfg -f target/stm32f1x_stlink.cfg
Thanks, this works fine.
mymacmini:stm32 xiaofanc$ openocd -f openocd_stlink.cfg
Open On-Chip Debugger 0.6.0-dev-00550-g4257cb7 (2012-05-13-21:38)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
1000 kHz
Info : clock speed 1000 kHz
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
1000 kHz
..
mymacmini:stm32 xiaofanc$ telnet localhost 4444
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger
> init
> reset init
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
> poll off
> adapter_khz 8000
8000 kHz
> dump_image dump.bin 0x08000000 131072
dumped 131072 bytes in 3.291646s (38.886 KiB/s)
> verify_image dump.bin 0x08000000
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0xfffffffc
verified 131072 bytes in 2.087557s (61.316 KiB/s)
> stm32f1x mass_erase 0
device id = 0x20036410
flash size = 128kbytes
stm32x mass erase complete
> flash write_image dump.bin 0x08000000
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003e msp: 0xfffffffc
wrote 131072 bytes from file dump.bin in 4.109462s (31.148 KiB/s)
> verify_image dump.bin 0x08000000
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0xfffffffc
verified 131072 bytes in 2.094413s (61.115 KiB/s)
> load_image dump.bin 0x20000000 bin 0x20000000 20480
20480 bytes written at address 0x20000000
downloaded 20480 bytes in 0.494348s (40.457 KiB/s)
> shutdown
shutdown command invoked
> Connection closed by foreign host.
--
Xiaofan
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel