Yes, I am still using the practically obsoleted ST-Link-V1 on a STM32F1 disco board. It still gets the job done but regretfully it is not supported out of the box by IDE I happen to use from time to time.
When I gave a try to the AC6 (SW4STM32) I found out that, to not much of a surprise, the ST-Link-V1 is not supported. Only V2 and V2.1 are supported. Well, I decided to change that unfortunate situation because I have two of the disco boards with this debugger laying around.
After some research and analysis it turned out to be a pretty easy thing to do. It can be summarized with two points:
- Alter some OpenOCD configuration/board files.
- Use the new files.
The main problem lain in connect_assert_srst parameter in OpenOCD configuration file. This feature forces system reset before every connection to the chip. This is supported by STM32 MCUs but somehow it caused issues during connection.
After identifying the problem I created two files:
- stm32f3x_v1.cfg — solely for STM32F3 MCU family based on the stm32f3x.cfg original file.
- stm32f3x_stlink_v1.cfg — a file based on the stm32vldiscovery_f3_v2.cfg original file.
Of course the stm32f3x_v1.cfg file has a single modification. The connect_assert_srst parameter was commented out. The files are right here (please mind to change the extension):
After the mischief was done the only thing that remained was to use these file in AC6 like this:
Well, there was also one more thing to be done which was a pretty well known issue of the ST-Link-V1. You have to change the driver from the proprietary one to the WinUSB driver. For this Zadig application can be successfully utilized:
But remember, there is always a catch — the moment you replace the driver the board will not work with ST-Link Utility but it does with OpenOCD and AC6! Still, you can revert the process by removing the driver from OS.