Debugging STM32 in VSCODE with stlink and jlink | VIDEO 45
In this video I talk about hardware and software requirements for debugging STM32 in vscode using cortex-debug plugin. I also talk about important compiler flags that can ruin debugging.
Feel free to navigate to these time points: 0:00 - Introduction 0:18 - Hardware used in the video 0:33 - Software for stlink and jlink upgrade and reflash 1:38 - stlink and jlink debugger software 3:10 - VSCode Cortex-Debug pluging and configuration 9:50 - JLink demonstration and Debug view walkaround 12:17 - STLink (st-util) demonstration 13:05 - Compiler optimizations for debugging
If you want to skip to hardware initialization:
If you want to skip to code:
In this video I explain the workings of ADC along with all the settings and code to make use of this peripheral. All the code is available in the Github link below:
https://github.com/SausageCode/Embedded_videos/tree/master/024_ADC-HAL
...
https://www.youtube.com/watch?v=k-clmvClDG8
In this video I show you how to send data over USART and USB to Serial converter to a PC.
Previous video: https://www.youtube.com/watch?v=IE2PpYzsa9M&t=0s&index=3&list=PLEg2mgYz66IOkLc0hID_RQRVExP2K0Ih2
Project code: https://github.com/SausageCode/STM32videos
...
https://www.youtube.com/watch?v=Ldbe1rIgbxg
In this video I show you a comparison on implementation of i2c device on arduino vs stm32 and list some pros and cons. At the end I don't dislike or hate Arduino as it has its own purpose, but I like to joke a bit on its expense.
This video is "part 2" to video 31 as I use the same ic on same configuration, so make sure to watch that one before:
https://www.youtube.com/watch?v=Fy8ttSjbX_M&feature=youtu.be
My i2c video tutorial:
https://www.youtube.com/watch?v=cvmQNTVJrzs&feature=youtu.be
...
https://www.youtube.com/watch?v=W6wq74vaJpQ
In this video I show you how to use DMA with ADC as a simple and useful example. Data is then sent over UART to a serial terminal. Make sure to see previous videos on those topics.
Previous video: https://www.youtube.com/watch?v=FeuZdqR9Fk8
Project code: https://github.com/SausageCode/STM32videos
...
https://www.youtube.com/watch?v=xVYhjGYLAMA
In this video I do a little update on the stlink on other features and some handy info for compiling code.
Check out my previous video about this topic and others on the playlist:
https://www.youtube.com/watch?v=rvQ5t9C5kH4
Check out the code on Github:
https://github.com/SausageCode/STM32videos
...
https://www.youtube.com/watch?v=6COo9RZq74M
In this video I show you how to use internal ADC to read data from one pin and send it over UART to PC. Check out my previous video in the same playlist for tutorials on how to use USART.
Previous video: https://www.youtube.com/watch?v=y5i2ye7wDNE&feature=youtu.be
Project code: https://github.com/SausageCode/STM32videos
...
https://www.youtube.com/watch?v=C6gyFE37IL4
This is the second part of Timers part 1 where I show you how to use OC modes for toggling LEDs and using PWM with different frequencies and resolution.
Check out my previous video about this topic and others on the playlist:
https://www.youtube.com/watch?v=gE_IEzRDYoI&t=321s
Check out the code on Github:
https://github.com/SausageCode/STM32videos
...
https://www.youtube.com/watch?v=rvQ5t9C5kH4
In this video I continue on my project audio dac. I added oled display and refreshed some code to make it more modular.
New code for this project.:
https://github.com/SausageCode/Embedded_videos/tree/master/029_DIY-DAC-PT3
Feel free to explore implementation. More about SSD1306 displays will be mentioned in future videos.
SSD1306 library is based on this one:
https://github.com/afiskon/stm32-ssd1306
Dual mono dac project:http://www.dimdim.gr/2017/11/arduino-controlled-dual-mono-ak4490-dac-part-1/
SSD1306 controller:https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
SH1106:https://www.displayfuture.com/Display/datasheet/controller/SH1106.pdf
...
https://www.youtube.com/watch?v=2vKjlCURS-s
In this video I show you 4 ways to flash firmware onto STM32 using 3 different interfaces. Demonstration is on Fedora 34 but all tools are available on all platforms.
Timestamps:
0:00 Introduction
1:56 Project introduction
3:13 ST-LINK: STM32CubeProgrammer (gui)
5:39 ST-LINK: ST-Flash (terminal)
11:16 JLINK (terminal)
14:50 JLINK automated download using Make
20:18 JLINK launch in vscode
21:06 ST-LINK: ST-Flash using Make launched with vscode
22:38 UART using STM32 built in bootloader
33:59 UART configuration using Make
36:19 UART launch with vscode
Links:
STM32CubeProgrammer: https://www.st.com/en/development-tools/stm32cubeprog.html
ST-FLASH: https://github.com/stlink-org/stlink
ST-LINK convert to JLINk: https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/
JLINK software: https://www.segger.com/downloads/jlink/
UART flasher: https://sourceforge.net/p/stm32flash/wiki/Home/
...
https://www.youtube.com/watch?v=1cleO3mHjWw