A guy called “Bingo” converted the ST-Link v1 (STM32VLDISCOVER) into a Versalon programmer which can be used by OpenOCD application to program many other micro-controller over SWD interface.
If you have 2 STM32VLDISCOVER boards you are a luck guy and could just follow this tutorial:
If you (like me) is a humble guy and have only 1 STM32VLDISCOVER then you need to use your creativity to convert ST-Link in a Versalon board.
It is common for people who work with embedded system to have some J-Link programmers around (J-Link is like a gift included in many evaluation boards). Then I decide to use it to program Versalon firmware into STM32VLDISCOVER.
This is like I connect J-link pins to STM32VLDISCOVER:
J-LINK STM32DISCOVER V-ref (pin 1) 3.3V SWDIO (pin 7) SB10 SWCLK (pin 9) SB6 5V-supply (pin 19) 5V GND (pin 20) GND
Then I used “J-Flash ARM” to Unsecure and Erase Chip and used “J-Link Commander” to program Versalon firmware (firmwares-svn-986.tar.gz):
SEGGER J-Link Commander V4.40b ('?' for help) Compiled Dec 22 2011 10:55:05 DLL version V4.40b, compiled Dec 22 2011 10:54:45 Firmware: J-Link ARM V8 compiled Sep 22 2011 16:23:23 Hardware: V8.00 S/N: 20100214 Feature(s): RDI,FlashDL,FlashBP,JFlash,GDBFull VTarget = 3.080V Info: TotalIRLen = ?, IRPrint = 0x..000000000000000000000000 No devices found on JTAG chain. Trying to find device on SWD. Info: Found SWD-DP with ID 0x1BA01477 Info: TPIU fitted. Info: FPUnit: 6 code (BP) slots and 2 literal slots Info: Found Cortex-M3 r1p1, Little endian. Cortex-M3 identified. JTAG speed: 100 kHz J-Link>exec device = STM32F103C8 Info: Device "STM32F103C8" selected (64 KB flash, 20 KB RAM). J-Link>loadbin c:\versa.bin, 0x0 Loading binary file... [c:\versa.bin] Writing bin data into target memory @ 0x00000000. WARNING: CPU is running at low speed (8031 kHz). Info: J-Link: Flash download: Flash programming performed for 1 range (28672 byt es) Info: J-Link: Flash download: Total time needed: 13.330s (Prepare: 2.459s, Compa re: 0.191s, Program: 8.869s, Verify: 0.159s, Restore: 1.650s) J-Link>
Update: There a way to use the serial programmer native of STM32 chip to update its firmware, this way you don’t need other board or external programmer, but needs a USB/Serial 3.3V: http://miosix.org/boards/stm32vldiscovery-linux-support.html
2 thoughts on “Converting a STM32VLDISCOVER on versalon programmer”