When developing for micro controller, we use a lot of compile-time defines passed to the compiler with the "-Dxxxx" syntax. I would like to configure vscode such that it knows that certain defines will be provided and such that it highlights code properly corresponding to those info.
How would I do that ?
I am assuming you have C/C++ extension installed.
1 - Open Command Palette by Ctrl + Shift + P or View -> Command Palette...
2 - Select
C/C++: Edit Configurations (UI)
3 - Scroll down to
Defines
section, where you can add your defines/macros.Also, In this tab you can tell vscode about your compiler options such as, the compiler arguments, the language standard you are using, include paths, etc.