Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To program an STM32 over SWD, connect a compatible ST-LINK probe to the target’s documented SWD signals, open STM32CubeProgrammer, select ST-LINK and SWD, connect, load the firmware with the address specified for that device, then program and verify it. Exact wiring, target power requirements, and firmware address depend on the board and STM32 model, so use their documentation rather than a universal pin map.

What you need before connecting

  • The exact STM32 part number and target-board model.
  • The board schematic or manual showing SWD signals, connector or pads, target power requirements, and reset access.
  • An ST-LINK probe, unless your board already has a compatible debugger integrated.
  • The firmware file and its accompanying instructions, including the correct device and programming address.
  • STM32CubeProgrammer installed on the computer you will use.

STMicroelectronics describes STM32CubeProgrammer as “an all-in-one multi-OS software tool for programming STM32 products.” It provides GUI and command-line options, supports Windows, Linux, and macOS, and can erase, program, and verify device memory. The software page lists release v2.23.0 dated 29 June 2026: STM32CubeProgrammer.

Check whether a separate probe is necessary

Some development boards include an ST-LINK debugger, in which case a standalone probe may not be needed. If the target board lacks one, ST-LINK provides the SWD/JTAG debug connection. A supported STM32 bootloader may offer another programming route, but availability depends on the MCU series and boot configuration. ST explains the distinction in its STM32CubeProgrammer documentation.

Confirm connector and voltage compatibility

Do not assume that an ST-LINK connector maps directly to your board’s header or pads. For example, ST’s STLINK-V3MINIE is a standalone debugger/programmer with an STDC14 connector, USB Type-C, and support for application voltages from 1.65 V to 3.60 V. Those specifications do not establish a pin mapping for a particular target; check both devices’ documentation before choosing a cable or adapter. The probe is self-powered through USB Type-C, so do not infer that it powers the target board.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
AITRIP 1PCS ST-Link V2 Emulator Downloader Programmer STM32F103C8T6 STM8 STM32 with Cable (Random Color)
  • The interface easy to use simple horns seat pitch of 2.54, with 20CM DuPont line, the line can respond to different target sequence, flexible wiring
  • Increased the 5V power output, the output I / O ports are protected afraid of operational errors caused by ST-LINK V2 damage
  • ST-Link V2 Stlink Mini STM8 STM32 STLINK Simulator Download Programmer Programming Supporting the full range of STM32 SWD debugging interface; Supporting the full range of STM8 SWIM download debugging (common development environments such as IAR, STVD etc. are supported);Supporting for automatic firmware upgrades
  • Support full series STM32 SWD download and debug
  • 4-wire interface (including power), the wiring is very simple because the interface definition is marked directly on the aluminum housing protects. ① RST;②SWDIO③GND④GND⑤SWIM⑥SWICK⑦3.3V⑧3.3V⑨5.0V⑩5.0V

Install STM32CubeProgrammer

  1. Download the release for your operating system from ST’s STM32CubeProgrammer page.
  2. Install it according to the platform-specific instructions in ST’s installation and software documentation.
  3. On Windows, check the instructions for the ST-LINK driver. ST says the driver is included in the release package for the listed ST-LINK families; an older driver can cause USB access or connection problems. Do not install a driver on another operating system unless its instructions call for one.

Connect the ST-LINK to the target

  1. Power down or prepare the target as its board documentation requires. Identify the documented SWD signals, target voltage arrangement, common-ground requirement, and any reset connection.
  2. Connect the probe to the corresponding target signals using the correct cable or adapter. Follow the board’s pin labels and schematic; connector orientation and pin assignments are not universal.
  3. Set up target power exactly as the board documentation specifies. Do not assume the probe supplies it.
  4. Connect the probe to the computer over USB. If the board has an integrated ST-LINK, use the board’s documented USB/debug connection instead.

Select SWD and connect in STM32CubeProgrammer

  1. Open STM32CubeProgrammer and select the ST-LINK connection interface.
  2. Choose SWD as the port. If multiple probes are attached or detected, select the one connected to your target.
  3. Choose a connection mode and SWD clock appropriate to the board, wiring, and target. The software exposes clock frequency, access port, reset mode, and connection mode; a maximum clock is not a universally reliable setting.
  4. Select Connect. If the connection fails, work through the checks in the troubleshooting section below.

Choose the connection mode for the situation

Mode When to use it
Normal For a typical connection when the target can be accessed normally.
Connect under reset When you need the probe to catch the target before its application code runs, such as when that code has disabled the debug pins.
Hot plug When you need to connect without halting or resetting the running target.

ST’s STM32CubeProgrammer manual describes these modes. Connect under reset is a recovery option, not a fix for incorrect wiring, missing power, or every other connection failure.

Load, program, and verify firmware

  1. Load the firmware file supplied for your STM32 and board. STM32CubeProgrammer supports Binary (.bin), ELF (.elf, .axf, .out), Intel HEX (.hex), and Motorola S-record (.srec) formats, according to ST’s software page.
  2. For a binary file, provide the start address specified by the firmware author or target documentation. Do not guess an address or assume it is the same across STM32 devices. Follow any device-specific instructions for other formats as well.
  3. Use the programming controls to erase and write the intended memory, applying any device-specific options required by the firmware instructions.
  4. Run the tool’s verify operation and check its result. A successful write alone does not confirm that the stored contents match the firmware file.

STM32CubeProgrammer also provides a command-line interface for repeatable programming and scripting; use the installed release’s documentation for the exact command syntax and arguments.

Rank #2
HiLetgo ST-Link V2 Emulator Downloader Programmer STM32F103C8T6 STM8 STM32 with Cable (Random Color)
  • Increase 5V power output, the output I / O port protection are not afraid of operational errors caused damage!
  • The interface easy to use simple horns seat pitch of 2.54, with 20CM DuPont line, the line can respond to different target sequence, flexible wiring
  • Supports automatic firmware upgrade, the factory has been upgraded to the latest firmware V2.J17.S4;
  • The interface definition directly in the shell marked, clear, convenient and practical;
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot a failed connection

  • The probe is not detected: Check its USB connection and host setup. On Windows, follow ST’s driver instructions and check whether an older driver is installed.
  • The probe appears, but the target will not connect: Confirm target power, common ground, documented SWD signal mapping, selected probe, and that SWD—not JTAG or another port—has been selected.
  • The target has run code that interferes with debugging: Try Connect under reset, which attempts to connect before the target executes its application instructions. If it still fails, investigate power, wiring, security state, and device-specific debug configuration.
  • You are considering a bootloader instead: Check the exact STM32 series and boot configuration to establish whether a supported interface is available. UART, USB DFU, I2C, SPI, or CAN programming is not supported in every configuration.

For version-specific behavior and target-series requirements, consult the installed CubeProgrammer release and the documentation for the specific STM32 and board.

Quick Recap

Bestseller No. 1
Bestseller No. 2
HiLetgo ST-Link V2 Emulator Downloader Programmer STM32F103C8T6 STM8 STM32 with Cable (Random Color)
HiLetgo ST-Link V2 Emulator Downloader Programmer STM32F103C8T6 STM8 STM32 with Cable (Random Color)
The interface definition directly in the shell marked, clear, convenient and practical;
$9.49
Bestseller No. 4
DEVMO ST-Link V2 Mini Metal Shell STM8 STM32 Emulator Downloader Programming Unit M267
DEVMO ST-Link V2 Mini Metal Shell STM8 STM32 Emulator Downloader Programming Unit M267
★Support automatic upgrades, full range of STM32 SWD & full range of STM8 SWIM download; ★Support the full range of STM32 SWD debugging interface
$15.99
Rank #4
DEVMO ST-Link V2 Mini Metal Shell STM8 STM32 Emulator Downloader Programming Unit M267
  • ★Support automatic upgrades, full range of STM32 SWD & full range of STM8 SWIM download
  • ★Support the full range of STM32 SWD debugging interface
  • ★A simple 4-wire interface (including power), fast, & stable
  • ★Interface definition marked on the casing! Do not need to refer to the manual
  • ★Package Includes:1PCS Emulator Downloader Programming Unit(Note:Random Color),Comes with 20CM Dupont Lines to easier connection
Rank #3
Sale
ST-Link V2 STM32 Emulator, Aideepen ST Link V2 Stm32 Programmer Unit mini STM8 STM32 Emulator Downloader M89 New (Random Color)
  • 【ST-Link V2 Emulator Downloader Programming】Supporting the full range of STM32 SWD debugging interface; Supporting the full range of STM8 SWIM download debugging (common development environments such as IAR, STVD etc. are supported);Supporting for automatic firmware upgrades
  • 【Clear Interface Definition】 4-wire interface (including power), the wiring is very simple because the interface definition is marked directly on the aluminum housing protects. ① RST;②SWCLK③SWIM④SWDIO ⑤GND⑥GND ⑦3.3V⑧3.3V⑨5.0V⑩5.0V
  • 【Supported SoftwareVersions】① ST-LINK Utility 2.0 and above; ② STVD and above; ③ STVP 3.2.3 and above; ④ IAR EWARM V6.20 and above; ⑤IAR EWSTM8 V1.30 and above; ⑥ KEIL RVMDK V4.21 and above
  • It's convenient and practical, fast speed and stable. ①Increased the 5V power output, the output I / O ports are protected afraid of operational errors caused by ST-LINK V2 damage; ②Internal board of this programmer is with 500MA self-recovery fuse, it can protect your computer motherboard
  • The interface easy to use simple horns seat pitch of 2.54, with 20CM DuPont line, the line can respond to different target sequence, flexible wiring

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.