Rust on STM32F103 Blue Pill with Probe-run tooling

Image for post
Image for post

Rust embedded software tooling is always an interesting alternative to MCU vendor specific IDE software, such as those provided by TI, Microchip, STM32, Nordic, etc.

With the advent of probe-rs and subsequently probe-run software, Rust for embedded coding can take a different path from , and it is getting more convenient.

There are already lots of cortex-m quick-start guides, especially of STM32F103 “Blue Pill”. Unfortunately, Rust library such as is changing fast. For example, the now is initiated differently from the past.

Here is my latest try get it up and running:

  1. get hardware: STM32F103C8T6 module + ST-link (v2) debugger
  2. setup software: follow this link or stm32f1xx_hal (link) and use (link) instead of

3. git clone the source code from this repository: https://cgit.pinealservo.com/BluePill_Rust/blue_pill_base

change runner in to

runner = "probe-run --chip stm32f103c8"

4. In a terminal window, type

That’s it. You should now see LED flashing and debugging message in the terminal window.

Useful References

STM32 Blue Pill pinout diagram (link)

Old way with openocd + gdb (link)

New way with probe-run (link)

Rust embedded GPIO model (link)

Rust software/hardware notes (link)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store