Flashing MCU using STLINK-V2 debug probe

Hardware

ST-Link STM8/STM32 v2 Compatible Programmer & Emulator

stlink

<aside> 💡 This installation does not require the use of a GUI - though has the option to. Recommended for CI/CD and headless programming.

</aside>

  1. Install stlink

Macos

brew install stlink

Linux

Follow instructions for installing here

Windows

  1. Verify installation was successful
st-info --version

Check serial number of STLINK-V2 probe

st-info --serial
st-info --probe
  1. Connect the debug probe to the SWD header on one of the boards (see link below)

    There are currently three switch products that are designed for easy configuration and management, these are:

  2. Power on the board and verify correct MCU device is found by probe

st-info --probe
  1. Flash chosen firmware file to MCU