Step-by-Step: STM32 Development Environment with OpenOCD and Visual Studio Code (Windows)

preview_player
Показать описание
This video is intended for beginner with STM32, or embedded system in general, using mostly the free and open source software resources in order to get started quickly.

Show your support to my Patreon:

00:00 Intro
00:20 Visual Studio Code installation
01:50 VSCode extensions installation
04:12 MSYS2 installation
05:40 xPack OpenOCD and GNU ARM Toolchain installations
10:35 Check and double check all installation and dependencies
11:12 Start using MSYS shell
11:38 Git installation in MSYS
12:50 Make installation in MSYS
13:25 Getting examples from libopencm3
15:45 Population libopencm3 submodule
17:07 Navigate in VSCode and building example in MSYS
18:50 Installing missing Python3 in MSYS
19:51 Updating path to GNU ARM Toolchain
20:30 Building libopencm3 library and miniblink example
21:33 Configuring Cortex-Debug for debugging with OpenOCD
25:55 Troubleshooting Cortex-Debug issues
27:10 SUCCESS!!!
27:49 Recapitulation
29:00 BONUS: how to integrate MSYS into VSCode
33:35 Done

List of software:
- Visual Studio Code, the most use development IDE in the world, with lots of extensions.
- GCC for ARM embedded system, free and open source.
- GDB, the free and open source GNU Debugger.
- OpenOCD, free and open source for open chip-debugger.

STM32 library and examples are provided by libopencm3, also free and open source:

Installation is demonstrated under Windows 10 and it may work the same way on Windows 11. Please let me know in the comment section if you would like to see me doing it, step-by-step, on Windows 11.

Please comment, like, and subscribe if you enjoy watching this video.
Рекомендации по теме
Комментарии
Автор

Great tutorial! Thank you for making this.

NewGuardHacker
Автор

you the man what the hell I was looking for this
Please make for window 11 step by step

s.h
Автор

Every thing perfect and debug and compile no errors thank you so much again for the clear instructions, I’m facing a code problem not sure if any experience it or maybe I’m doing some wrong since I’m only used to the Arduino environment,
I am try to change modify the blink code just to see if will change and there is no changes at all still debug the prior original code ! I even comment out every thing in while loop and still running the old code and I can see still stepping in the comment out code this is insane and never seen this ! I google it and watch other videos and I asked no hope, thought I’ll post here so please help on this or any one know let me know what I’m doing wrong, I even modified the code from the blink original file and still running the old code.
Thank you 🙏

s.h
Автор

Great Tutorial. Thank you, man. what if we add Google test to that? It would be great if you make a tutorial for that! :)

mojtaba.zamani
Автор

Hi I have problems like "the editor could not be opened because the file was not found". How can this be solved? Thanks for the answer

djoonkdjoonk
Автор

Man... Do you know powershell or wsl ??? What is the point to use windows if you preferd Linux shell ?

badwolf
Автор

Is there a reason you chose the zip file instead of running the executable for the GNU ARM Toolchain?

matt_f_all_steams
Автор

how we can configure stlink to flash from command line

salmantechnologies
Автор

Hi,
Does this cortex-debug extension work for cortex R connections as well?

AjayKumar-duuu
Автор

Thank you for this -- super helpful tutorial! Question: I noticed you installed the Makefile Tools extension, but it isn't able to invoke the MSYS2 make utility. Did I miss something?

ThomasHerron-fu
Автор

Excuse me if you find my question stupid, but I'm not quite familiar with the subject matter: Why going thru all this process of installation to debug the STM32s when you can use the readily available STM32Cubeide? Isn't it much simpler/faster....or there is any drawback with using that software?

keen
Автор

,very helpful. Please give a tutorial about the difference between using vsc and stm32ide. Or other ide tools.thanks.

ausandroid
Автор

I understand the STM32 chips support SWD (in addition to JTAG), and that STM32CubeIde+StLinkv3 allows you to stream trace data via the optional SWV(TDO) pin...

but can the same be done with a J-Link-Edu/Mini debugger and Visual Studio Code + Openocd? Or via Eclipse?

bennguyen
Автор

Hi, I changed the files and executed as shown in the video and its showing the error "Could not start GDB process, does the program exist in the filesystem? Error: spawn ENOENT" .Tried changing the armtoolchainpath in the cortex-debug but the error is still there.

AravindKumar-jwpb
Автор

Not sure as no GitHub of the result. …

dng
Автор

hi i have problems like "GDB executable "arm-none-eabi-gdb.exe" was not found.
Please configure or "cortex-debug.gdbPath" correctly." please help me
thank a ton

PhạmVănTân-ko
Автор

hi i get a problem like this "File not found "executable": please help me. thanks a ton!

tanphamvan
welcome to shbcf.ru