rust-embedded / book

Documentation on how to use the Rust Programming Language to develop firmware for bare metal (microcontroller) devices
https://docs.rust-embedded.org/book/
Apache License 2.0
1.09k stars 172 forks source link

1.4.4. Verify Installation : openOCD - stlink.cfg does not exist [anymore?] #277

Closed cocoacrumbs closed 3 years ago

cocoacrumbs commented 3 years ago

The embedded rust book in section 1.4.4 suggests to use this command to verify the installation:

openocd -f interface/stlink.cfg -f target/stm32f3x.cfg

However, the stlink.cfg file does not exist when installing openOCD (which is version 0.10.0 in my case):

$ openocd --version
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html

I found the available interface scripts for openOCD at this path (I'm using Manjaro Linux):

/usr/share/openocd/scripts/interface

The available stlink scripts are:

stlink-v1.cfg
stlink-v2.cfg
stlink-v2-1.cfg

In my case, using stlink-v2-1.cfg solved my problem.

Maybe the Embedded Rust book could elaborate a bit more on using/finding the correct interface file?

mqsoh commented 3 years ago

This is a duplicate of #263.