[riot-notifications] [RIOT-OS/RIOT] Explain the setting for STLINK_VERSION more clearly. (#14142)

Jelle Haandrikman notifications at github.com
Tue May 26 11:40:28 CEST 2020

#### Description
I just started using RIOT OS with the Blue Pill board and a generic cheap ST-LINK debugger. It has cost me the better part of a day set the correct STLINK_VERSION variable in the Makefile. Not one place in the documentation. For either OpenOCD or the Blue Pill mentions to set this variable for OpenOCD. 
The documentation for OpenOCD in the wiki does mention "Transports and board support" but not how to include this in the build mechanism. 
The file 'dist/tools/openocd/openocd.cfg' mentions nothing of this setting. 
The error that 'make flash' gives doesn't provide much help either. It just mentions: "Error: open failed.
A pointer to 'RIOT/makefiles/tools/openocd-adapters/stlink.inc.mk' would have helped. Either from the Blue Pill documentation or the OpenOCD documentation. 

### Work-around
I found a build command that manually uploaded the ELF file. 
# Sure fire way to upload an ELF binary to the Blue Pill board using a
# cheap ST-LINK v2. 
openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg \
-c "transport select hla_swd" \
-f /usr/share/openocd/scripts/target/stm32f1x.cfg \
-c "program {{./bin/bluepill/foobar.elf}} verify reset; shutdown;" 

### Useful links

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200526/9afad121/attachment-0001.htm>

More information about the notifications mailing list