Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

Using and Connecting ST-Link | STM32 Tutorial #93

781 views on YouTube

ST-Link Getting Started Tutorial. In this video we will cover ALL the different ways a ST-Link debug probe can be hooked up to a development board.

We will cover basic SWD flash and debug and we will add SWO trace and UART.

Buy Jolt Connect: https://currentmakers.com/products/jolt/jolt_connect/
Buy Streamline: https://currentmakers.com/products/streamline/

The Jolt Connect: https://www.youtube.com/watch?v=TyyegjeK8TA

Dealing with Bricked STM32: https://www.youtube.com/watch?v=lqUGe2TQ-HE

ST-Link on STM32world wiki: https://stm32world.com/wiki/ST-Link
Black Pill on STM32World wiki: https://stm32world.com/wiki/Black_Pill
Jolt Connect on STM32world wiki: https://stm32world.com/wiki/Jolt_Connect
DIY ST-Link page on STM32World wiki: https://stm32world.com/wiki/DIY_STM32_Programmer

Github Repository source used in this video: https://github.com/STM32World/stm32fun/tree/master/examples/blackpill_blink2

Open Source STLINK tool: https://github.com/stlink-org/stlink

#STM32 #GettingStarted #Tutorial #STM32CubeIDE #STM32CubeMX #STM32CubeProgrammer #STLink #STM32World #CurrentMakers #JoltConnect

00:00 The Challenge
01:18 Welcome
01:47 Developing without a “programmer” – DFU flashing
03:01 Official ST-Link/V2 and why it is horrible (mini-USB and no legend)
05:05 The Chinese knock-off ST-Link/V2 devices
06:01 Home made DIY ST-Link/V2-1
07:00 The Jolt Connect programmer (see link)
08:46 The Black Pill pinout and SWD pins
11:15 The Jolt Connect pinout and basic 4 pins used for SWD
11:53 The basic SWD connection – target powered from programmer
12:12 Flashing from STM32CubeIDE
12:50 Using the Open Source ST-Link CLI tools
13:47 Doing Mass Erase
14:38 Using the STM32CubeProgrammer
16:20 Adding a reset pin
19:08 Running in-circuit Debug from STM32CubeIDE
21:38 Breakpoints and examining local variables
23:00 Single stepping through code
24:50 LEARN to debug – it is an essential part of the learning process
25:40 Live expressions – still only 2 wires (plus power)
25:41 Extra goodies NOT supported by Chinese knock-offs
27:29 Enabling SWO trace pin in STM32CubeMX
28:36 Adding the SWO wire from Jolt Connect to Black Pill
29:57 Adding printf redirect code
31:31 Opening the ITM Data Console view and enabling capture
32:35 Enabling capture
34:01 Using SWO to do statistical profiling
36:35 Serial print debugging
40:29 Use Streamline to avoid the cabling nightmare
42:30 Using alternative (and possibly better) ST-Link firmware
44:43 Final thoughts and outtro

Corrections:
17:50 Embarrassing I used the wrong pin
28:07 I meant PB3 not 13