Guide on how to connect, check, program, and debug your custom STM32-based hardware via SWD and the ST-Link debugger utilising STM32CubeIDE. If you have any questions or suggestions for future videos, please let me know in the comments! [Timestamps] 00:00 Introduction 00:28 ST-Link 01:08 Hardware Connections 02:11 ST-Link Utility (Checking that we can connect to STM32 MCU) 03:37 STM32CubeIDE (Programming and debugging software package) 05:22 Enabling SWD 06:04 Setting up an external high-speed crystal (HSE) 07:10 Additional peripheral selection 08:50 LED blinking test code 09:44 Building code and checking for compiler errors 10:02 Debug configuration, debugging, and flashing via ST-Link 11:26 Running, pausing, and setting breakpoints 12:20 Hardware running code [Hardware] ST-Link/V2 Debugger: 🤍🤍st.com/en/development-tools/st-link-v2.html 20-pin to 10-pin 1.27mm Adapter: 🤍🤍olimex.com/Products/ARM/JTAG/ARM-JTAG-20-10/ [Software] STM32CubeIDE: 🤍🤍st.com/en/development-tools/stm32cubeide.html ST-Link Utility: 🤍🤍st.com/en/development-tools/stsw-link004.html ID: QIBvbJtYjWuHiTG0uCoK
Hello Phil, how are you doing?
Are you only able to debug and read the code in the stm if you are the creator of the code? or can anyone review and edit as long as they have physical access to the chip board?
Thank you in advance!
Thank you so much! This helped me get going with the MIKROE board, the documentation of MikroSDK and their forum were barely helpful
Hi Phil, just another question about the power inputs. I see you have many voltage sources(More than 2 usb and that lipo source) but my question is, can you plug in all the sources at once? Also if you were to plug in 2 usb, how would 2 5v inputs safely work? What if i wanted to monitor battery while i plug usb to monitor via serial port?
You explain so well, congrats, and continue the good work.
Thanks Phil, great pacing and very useful to help me get started with STM and ST-Link, coming from other embedded tools like TI/CCS, Arduino,VS-Code/ESP32 etc.
St- link V2 will it work for STM32H7 series as debugger?
@ qMUzLU636s8&t=5m45s 5:45 why you choose Serial Wire instead of JTAG4/5 !? and what is the difference between them!?
Do you have a video where you make this particular pcb?
the best stm32 tutorials on youtube
I have a custom Chinese board which has an Stm32f105RC. The designer has decided to put 4 SWD pins on it. I want to program it using a Chinese clone St-link v2. But Cube can't find the mcu even tho it's power led is on. I guess I am connecting things wrong.
My question is, how come swd needs 4 pins(on the board) but the stm32 socket on my debugger has 10 pins?
Hi Phil, i hope you are doing well .is it possible to read hex from Stm32 and write in to new Stm32 with St-link v2 .i just want to understand can we copy this Hex and write in to blank stm32 .my one board damage and want to copy that hex file in to new fresh stm32 .
Hi sir,
great content but in your flight controller respiratory there are 2 firmwares , can you please specify which firmware will go to which micro controller? which one is uploaded to F4 (Navic)mcu and which will be uploaded to F7(The main flight controller).
You forgot to close gp1 gp2 on board
Super helpful!
Thank you for this very nice video! Your video provided the hints I was looking for. I've got a working "hello blinky LED" program now.
One note in case of my board, I had to press the RESET button on the board before ST link application would recognize the target.
Great videos well done Phils. I’m currently having some issues with STM32H7 chip on a board I designed, and I don’t seem to find resources on how to program the chip directly with STLink/V2 programmer via SWD. Can you suggest me any help? as I haven’t been able to downloaded any code to the chip.
Thanks
Thanks a lot! qMUzLU636s8&t=5m42s 5:42 is very important. I originally thought my debugger is broken.
Hi Phil, Can this ST-Link also be used for STM 8 bit controllers? or is it specific to STM32 controllers?
Can you help me out with something? When I use ST-Link I can connect to my board however when I try to debug with STM32CubeIDE I get an error ST-Link not found.