This is a story about how I transformed Visual Studio Code to an IDE for embedded projects, that can work with STM32 CubeMX generated Makefile, OpenOCD and all the goodies that VS Code offers.
- I like Visual Studio Code. I think it is an amazing editor. I also like STM32CubeMX for generating basic initialization code.
- I wanted to pimp-up old project and I hit Keil code size restriction.
- I certanly don’t wish to spend the rest of my life configuring Eclipse settings to blink an LED.
I also like Python. So, I created a set of scripts that can parse CubeMX generated Makefile and VS Code ‘c_cpp_properties.json’ file and do some magic, which is better described on GitHub.
The result is a VS Code which can build, compile, download, reset, … CPU and has no limitations. After the initial, relatively quick setup, a simple “Run task > Update workspace” is needed to update VS Code files and coding can continue.
And the best thing?
You can still use STM32CubeMX without any restrictions (regenerate, rebuild files, …). You can add custom files and folders, C/ASM defines. You can enjoy VS Code Intellisense and all other available extensions while coding.
Compile, build project and check all compiler flags in special file. Debug embedded code. See CPU and core registers. Map your own shortcuts to tasks. Develop C and Python project in the same IDE.
And the best of all: customize it, because it is free and open source. Implement custom tasks, launch configurations, settings, … Explore the docs, guide and example on our GitHub and share if you like.