Skip to content
MCU Atlas
Walkthrough

STM32 for Beginners

Getting started with STM32: the Blue Pill board, ST-Link versus USB-serial flashing, the two toolchains worth your time, and five real builds with parts lists.

By · Published: 11/26/2026 · Updated: 11/26/2026

STM32 is the family of 32-bit Arm microcontrollers STMicroelectronics has been shipping for over a decade — the quiet, precise chips inside 3D printers, flight controllers, smart watches and most industrial equipment that needs a fast brain more than it needs Wi-Fi. The hobbyist door into that world is the Blue Pill, a bare development board that costs about as much as a bus ride, and this guide covers the whole first week: what an STM32 is, which board and cables to buy, the one quirk about flashing that trips every newcomer, which software to install, and five real STM32 projects you can build from parts lists. If you are still choosing between families at all, start with our guide to which microcontroller a beginner should buy — but if the decision is made, read on.

A Blue Pill STM32 board on a breadboard wired to a USB-serial adapter with jumper wires, first-flash setup

In this guide:

  • What an STM32 is, and how it differs from an ESP32 or Pico

  • The Blue Pill (and its successor, the Black Pill)

  • When to step up: the STM32G5 tier

  • What else you need on the bench

  • The STM32 beginner trap: how firmware gets onto the chip

  • Installing the tools and flashing your first program

  • Five real STM32 projects, easiest first

  • Where to go next, common problems, and answers to the usual questions

What an STM32 is, in three sentences

An STM32 is a 32-bit microcontroller built by STMicroelectronics around Arm Cortex-M processor cores — the same core family professional firmware is written for. Chips in the family scale from tiny 8-pin parts to parts that run Linux, and development boards carrying them cost pocket money. What you give up versus an ESP32 is built-in wireless: most STM32 chips have no Wi-Fi or Bluetooth at all, and what you get instead is cheap, precise, well-documented control — which is why they end up inside printers, drones and test gear.

The Blue Pill: the board most beginners start with

The Blue Pill is a small breadboard-friendly board carrying an STM32F103C8: an Arm Cortex-M3 running at up to 72 MHz with 64 KB of flash, 20 KB of RAM and a USB 2.0 full-speed port. It has been the classic "first STM32" for years — it is the board four of the five projects below run on or relate to — and our Blue Pill part page carries its full specifications and current sourcing notes.

One honest warning before you buy: the cheapest Blue Pills are unbranded, and some carry clone chips that can misbehave — a caution our own STM32 tutorial pages repeat. Buying from a seller with solid reviews, or spending a little more, saves an evening of debugging.

If you want…BuyWhy it fits
The classic learning boardSTM32F103C8 Blue PillCortex-M3 at 72 MHz, 64 KB flash, 20 KB RAM; the board most STM32 tutorials (and three projects below) assume
The modern step-upSTM32F401 Black PillCortex-M4 with hardware floating point, up to 84 MHz, 256 KB flash, 64 KB RAM — and it's an official MicroPython board (see the FAQ)

Beyond the beginner boards: the STM32G5 tier

Nothing above changes: for a first board, buy the Blue Pill or the Black Pill. But November 2026 added a clearly-signposted step above them, and it is worth knowing where it sits even if you never buy one. At STM32 Summit 2026 (announced November 4, 2026), ST launched the STM32G5 series — mixed-signal microcontrollers built on an Arm Cortex-M33 core running at 280 MHz — and the series is in production now.

The G5 is not a week-one board. It is the intermediate tier for digital power and motor control: ST's announcement names power supplies for AI datacenters, robotics and humanoid motor control, photovoltaics, wind turbines, industrial drives and commercial drones as the targets. The compute on offer is 420 DMIPS / 1,136 CoreMark at 280 MHz, which ST says is twice the compute performance of the STM32G4 series. Behind that sit the peripherals that matter for this kind of work: ST's first MCU with its enhanced 12-channel high-resolution timer, built for digital power supplies, a position encoder (POSENC), a programmable logic array (PLAy) for on-chip custom hardware, motor-control timers, 12-bit ADCs and DACs, op-amps and ultra-fast comparators.

If you want…GetWhat it is
The general entry pointNUCLEO-G564REA STM32 Nucleo board carrying the STM32G5-512K in an LQFP64 package — the developer board ST names in the announcement
Motor-control evaluationMotor Control Discovery Kit B-G564E-MC1SThe purpose-built kit for the G5's motor-control side
Digital-power evaluationDigital Power Discovery Kit B-G564E-DPOW1The digital-power counterpart

On price, one anchored figure exists and it is a chip price, not a board price: ST's announced pricing starts from $1.034 per unit for orders of 10,000 pieces (announced November 4, 2026; checked 2026-11-26). ST's announcement gives no price for the NUCLEO-G564RE board itself, so expect to check current board pricing at ST or a distributor when you get there. On the software side, the G5 is supported in STM32CubeMX2 with the new STM32Cube HAL2 abstraction layer, plus dedicated digital-power (X-CUBE-DPOWER) and motor-control (X-CUBE-MCSDK) software packages.

The security feature that marks the G5 out in its announcement is post-quantum cryptography: the cryptographic engine supports the latest algorithms, including ST's PQC libraries, alongside Arm TrustZone on the Cortex-M33, ST's immutable Root of Trust (STiRoT), secure boot and secure firmware update, tamper detection and side-channel resistance. That matters less for a bench prototype and more for power or motor hardware expected to sit in service for years.

Roadmap context, not buying advice. The same summit brought two more announcements worth one sentence each. ST is unifying its STM32 families onto one platform — Cortex-M core continuity, one STM32Cube ecosystem, shared process technologies — so architectures, IP, software and tools carry across industrial, automotive and robotics domains; and the new STM32A family extends that platform into high-safety and automotive systems. The first three STM32A microcontrollers are sampling to customers now, with broader availability planned in 2027, and the single-core G5 lineup itself grows dual-core parts in 2027. None of that is a reason to wait: buy the board today's project needs.

Where our content stands: no STM32G5 projects yet — motor-control content is a candidate, not a commitment. MCU Atlas has no STM32G5 project pages yet, and none of the five builds below uses one. We will take G5-based motor-control content on only if reader demand shows up in our traffic and search signals; until then, read this section as buying-guide context for the tier above the beginner boards, not as a project pathway.

What else you need — and one caution

The STM32 workbench is one board plus a short list of workshop bits — our cheapest starter kit guide prices the generic version tier by tier. The STM32-specific extras come down to how you flash, which is the next section.

ItemWhy you need it
An ST-Link or a USB-serial adapterGetting firmware onto the chip — pick one (or both); explained below
A data USB cableCharge-only cables are the number-one trap on every board family
Breadboard + jumper wiresWire displays, buttons and probes with no soldering
A few buttons and LEDsThe "hello world" circuits for the first week

The caution: STM32 pins run at 3.3 V logic, not the 5 V of a classic Arduino Uno. Every project tutorial on our STM32 pages repeats the rule — never connect a higher voltage directly to an input pin.

The STM32 beginner trap: how firmware gets onto the chip

Here is the difference that surprises everyone coming from Arduino or ESP32: a bare Blue Pill does not simply take a firmware upload over its USB port. The USB socket on a stock board is dead until firmware configures it. There are two standard ways in, and which one a project assumes is the single biggest fork in STM32 guides:

PathHardwareHow it works
ST-Link (SWD)An ST-Link debug probe, four wires (3V3, SWDIO, SWCLK, GND)ST describes the ST-LINK/V2 as an in-circuit debugger and programmer for STM32 microcontrollers, talking JTAG/SWD. It programs the chip directly, no cooperation from the chip needed — it always works
USB-serial + BOOT0A USB-serial adapter, the board's BOOT0 jumperYou move the BOOT0 jumper to 1 and reset; the chip boots ST's built-in ROM bootloader instead of your (absent) firmware, and ST's own STM32CubeProgrammer tool can then write flash over the serial line or USB

Both paths end in the same tool — ST's STM32CubeProgrammer, a free multi-OS program that writes flash over the debug interface or the bootloader interface (UART, USB DFU and more) and accepts the formats released firmware ships in (Intel HEX, binary, ELF). One more option removes the decision entirely: ST's Nucleo development boards have an ST-Link debugger built into the board itself, which is why several projects below name them.

This flashing fork is not a small footnote — it is the reason STM32 has a "not quite as beginner-friendly" reputation, and it is why only one of the five projects below earned our beginner rating: the others assume you have a toolchain or extra wiring working before step one.

Install the tools and flash your first program

Three good ways to start, in increasing order of "professional":

Path A: Arduino IDE (the familiar one)

  1. Download the Arduino IDE from arduino.cc. The STM32duino project's core only supports Arduino IDE 2 from release 2.8.0 onward, so take the current version.

  2. In Preferences, paste this into "Additional Boards Manager URLs": https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json

  3. In Boards Manager, install the STM32 MCU based boards platform, then select your chip — the Blue Pill is under "Generic STM32F1 series".

  4. Pick your upload method in the Tools menu (ST-Link, or serial with the BOOT0 jumper set) and upload an example, exactly as you would with an Arduino Uno.

For a sense of scale before you install anything: we compiled a bare Blink sketch for the Blue Pill with the STM32duino core and it came out at 9,412 bytes of the board's 64 KB flash and 852 bytes of its 20 KB RAM — measured on our bench with a PlatformIO build, three runs, median 4.8 seconds. First programs are small; you have room to grow into the board.

Path B: STM32CubeIDE (the official one)

ST's own toolchain, STM32CubeIDE, is a free C/C++ development environment built for STM32, with the chip-configuration tool built in. It comes in two variants — the long-standing Eclipse-based IDE, and a VS Code-based variant launched in 2025 that ST is now focusing on. It is more to learn than the Arduino IDE, but it is where professional STM32 work happens, and nothing you learn in it is wasted.

Path C: no toolchain at all (flash released firmware)

If your first project ships finished firmware — the beginner pick below does — you skip compilers entirely: download the release file, open STM32CubeProgrammer, and write it to the board over an ST-Link. That is the whole path, and it is a genuine first-week win.

The five STM32 builds, easiest first

These are the five STM32 projects in our catalog, all live with parts lists, prices and step-by-step tutorials. Ordered by difficulty, each adds one new skill — and per the note above, only the first is rated beginner:

#ProjectDifficultyCost bandWhat it teachesBoard
1EMBO: multi-instrument scope on an STM32 Blue PillBeginnerUnder $15Flashing released firmware; using a PC app as the instrument front-endBlue Pill
2STM32-O-Scope: minimalist $10 oscilloscope on Blue PillIntermediateUnder $15Your first compile-and-upload; wiring a display over SPIBlue Pill + ILI9341 TFT
3pillScope Plus: STM32F401 Black Pill educational oscilloscopeIntermediate$15–40A self-contained instrument: analog front end, on-screen measurementsBlack Pill + ST7735 TFT
4Jet Studio: build an Arduino Nano ESP32 game player and make games for it in a Godot-style editorIntermediateSee pageMaking your own games, not just firmwareSTM32 boards supported (Nucleo, Black Pill)
5SimpleFOC Arduino balancer: BLDC two-wheel balancing robotAdvanced$40–100Motor control with the SimpleFOC library; encoders and IMUsArduino-class, often STM32

1. EMBO scope — the beginner-rated one, and the right first project. One Blue Pill, one ST-Link, no compiling: you flash EMBO's released firmware, then run its PC app on Windows, Linux or macOS and get a six-in-one test bench — oscilloscope, logic analyzer, voltmeter, PWM and signal generator, and a counter. It is the only STM32 project we rate beginner, it is on our beginner projects hub, and it pays for the ST-Link you will reuse for everything after.

2. STM32-O-Scope — your first compile. The same Blue Pill becomes a stand-alone scope with a TFT on its SPI pins. Its tutorial's step one is "set up the toolchain" and its documentation lives on a 2018-era wiki, so expect the odd library wrinkle — that is honest intermediate territory, and exactly the skill it teaches.

3. pillScope Plus — the self-contained instrument. A modern Black Pill with a colour display and an LM358 input stage: a scope that works with no PC attached, with on-screen measurements and UART export. Building the front end and calibrating it is the step up.

4. Jet Studio — STM32 as a game console. Different in kind: a free, MIT-licensed, Godot-style editor that builds 2D and 3D games and flashes them to a handheld you wire yourself. The honestly-labelled catch for this guide: its tested path is an Arduino Nano ESP32 — STM32 boards (ST Nucleo, the WeAct Black Pill "for small scenes") are supported but secondary, and the editor currently needs a Linux PC.

5. SimpleFOC balancer — the advanced capstone. Gimbal brushless motors driven by the SimpleFOC FOC library, magnetic encoders and an IMU, balancing on two wheels. STM32 is one of several boards that can run it. When this one is on your desk working, you are not a beginner any more.

Where to go next

All five projects live on our STM32 hub, STM32 Projects: 5 Real Builds with Parts Lists, alongside their parts lists and current prices. When you outgrow them, the honest next step is bigger STM32 chips on ST's own Nucleo boards (the STM32G5 tier above) — or a second look at the other families: the beginner projects hub lists every beginner-rated build on the site across all boards, and our starter kit guide shows what a complete first bench costs.

Common first-week problems

  • The board does nothing when plugged into USB. Expected on a bare STM32 — the USB port needs firmware before it works. Flash over ST-Link or serial first (see the flashing section).

  • ST-Link says "no target connected". Check the four wires (3V3, SWDIO, SWCLK, GND) and that the board is powered. If wiring is right and it still refuses, suspect the clone-chip warning from the buying section.

  • The flash succeeded but the sketch never runs. The BOOT0 jumper is still at 1, so the chip keeps booting the ROM bootloader. Move it back to 0 and reset.

  • A component or pin died. Almost always a voltage over 3.3 V on an STM32 pin. The rule from every tutorial above: never connect higher voltages directly.

  • Uploads over serial fail silently. Re-check the adapter's TX/RX orientation and that BOOT0 was at 1 during reset — the bootloader only listens after a reset with the jumper set.

Frequently asked questions

Do I need an ST-Link?

Not strictly — the USB-serial + BOOT0 path programs any board — but an ST-Link clone costs very little, always works, and removes the jumper dance. Our advice: get one with your first board.

Do I need to solder?

Not for the first project. EMBO needs a Blue Pill, four wires to an ST-Link and a USB cable. Soldering enters with pillScope Plus, where the front end wants a tidy build.

Blue Pill or Black Pill?

Blue Pill to learn on — it is the board the tutorials and three of the five projects assume. Black Pill when you want more headroom (floating point, four times the flash) or Python (next question).

Can I program an STM32 in Python?

Yes — MicroPython began on an STM32 board, and its official board list includes the WeAct F411 Black Pill. The F103 Blue Pill is not an official MicroPython board, though, so if Python is the goal, buy the Black Pill.

Why not just use an ESP32?

If your project needs Wi-Fi, do — that is the ESP32's whole pitch. STM32 wins on cheap, precise control and on being the chip the professional world uses. We run the full comparison, same program on all three boards, in ESP32 vs Arduino vs Pico.

— Connie, MCU Atlas editor