rust-embedded / discovery

Discover the world of microcontrollers through Rust!
https://docs.rust-embedded.org/discovery/
Apache License 2.0
1.48k stars 511 forks source link

Simplify openocd launching using board configuration #103

Open johnthagen opened 6 years ago

johnthagen commented 6 years ago

Once OpenOCD issue 200 is fixed, we can update the guide to simplify the launching of openocd from two arguments to one argument.

Here:

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

Can become:

openocd -f board/stm32f3discovery.cfg

But this can't be merged until OpenOCD fixes the issue linked above because the current stm32f3discovery.cfg points to the older interface/stlink-v2-1.cfg.

johnthagen commented 6 years ago

Confirmed through discussions on the issue that this has been fixed in master and should then be fixed in the next OpenOCD release.

japaric commented 6 years ago

Nice!

Before landing this change we should also check that easy to install the latest OpenOCD release on the 3 major OSes (specially on Windows).

therealprof commented 6 years ago

@johnthagen One of my biggest beefs with OpenOCD is that they're extremely release-unhappy.

@japaric Yeah, that's trivial. For Windows there're several sites providing packages, e.g. http://gnutoolchains.com/arm-eabi/openocd/. For macOS there's homebrew: brew install open-ocd, for Linux there're a couple of different ways how to obtain it but it is always possible to build it yourself.

johnthagen commented 6 years ago

And just in case anyone on Mac finds this thread and wants to try this out before the next OpenOCD release, the Homebrew command to get the latest master (with the unreleased fix) is:

$ brew install --HEAD openocd