Navigation

VS Code IDE setup

You need to install the following extensions:

  • CMake

  • CMake Tools

  • Clang-Format

  • Cortex-Debug

  • C/C++

  • C/C++ Extension Pack

  • C/C++ Themes

  • XML Format

To build and debug with VS Code you need to set up *.json configuration files in the .vscode directory for auto build:

settings.json
 {
     "cmake.setBuildTypeOnMultiConfig": true,
     "cmake.configureSettings": {
         "BOARD": "cube",
         "CLI_PORT": "TELEM2",
         "CLI_BAUDRATE": "57600"
     },
     "cortex-debug.armToolchainPath": "/usr/bin",
     "cortex-debug.openocdPath": "/usr/local/bin/openocd",
     "cortex-debug.gdbPath": "/usr/bin/gdb-multiarch",
 }

Note

Refer to Build and debug reference for your actual cmake.configureSettings parameters.

Note

Don’t forget to call make atomics xmlinline before building in order to keep generated source files up to date.