On Wed, May 2, 2012 at 6:55 PM, Spencer Oliver <[email protected]> wrote:
> On 2 May 2012 11:39, Xiaofan Chen <[email protected]> wrote:
>> On Wed, May 2, 2012 at 6:10 PM, Spencer Oliver <[email protected]> wrote:
>>> On 2 May 2012 10:33, Xiaofan Chen <[email protected]> wrote:
>>>>
>>>> Thanks. With regard to STLink V1, is it supported by
>>>> OpenOCD? If yes, then which OS? I remember that
>>>> it will be not possible to support STLink V1 under
>>>> Mac OS X.
>>>>
>>>
>>> Yes the V1 is supported.
>>> Do not see a reason why it should not work, taking into account the
>>> broken mass storage implementation of the V1.
>>
>> Thanks. I assume that under Mac OS X, the following
>> codeless kext is needed, right?
>> https://github.com/texane/stlink/tree/master/stlinkv1_macosx_driver
>>
>
> guess so i do not have access to Mac OSX
Yes the codeless kext works fine under Mac OS X 10.7.4.
>> Under Windows, then we need to replace the Mass Storage
>> driver with WinUSB.
>>
>
> we now emulate the mass storage cmds using libusb for the V1.
> for V2 we use libusb 1.0 with winusb backend.
Under my Mac Mini running Mac OS X, OpenOCD
works fine with the stlink v1, tested with
STM32VL Discovery board.
mymacmini:stlink xiaofanc$ openocd -f board/stm32vldiscovery.cfg
Open On-Chip Debugger 0.6.0-dev-00543-g908ee4d (2012-05-05-20:28)
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
...
mymacmini:stlink 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: 0x080007e0 msp: 0x20000400
> poll off
> dump_image demo.bin 0x08000000 131072
dumped 131072 bytes in 3.310738s (38.662 KiB/s)
> dump_image dump.bin 0x08000000 131072
dumped 131072 bytes in 3.310984s (38.659 KiB/s)
> verify_image dump.bin 0x08000000
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0x20000400
verified 131072 bytes in 2.089227s (61.267 KiB/s)
> stm32f1x mass_erase 0
device id = 0x10016420
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: 0x20000400
wrote 131072 bytes from file dump.bin in 4.002771s (31.978 KiB/s)
> verify_image dump.bin 0x08000000
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x61000000 pc: 0x2000003a msp: 0x20000400
verified 131072 bytes in 2.095682s (61.078 KiB/s)
> load_image dump.bin 0x20000000 bin 0x20000000 20480
20480 bytes written at address 0x20000000
downloaded 20480 bytes in 0.299804s (66.710 KiB/s)
> reset run
> halt
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x0800029c msp: 0x200003f0
> 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