The Getting Started Guide include the configuration required to build and debug your application locally within VS Code.
Local Debugging assumes you have already run through one of the existing Getting Started Guides and have already cloned the repository and installed the required prerequisites.
-
Download and unzip the latest OpenOCD and add its
bin
folder to your environment path. -
Install the relevant driver for the devkits on chip debugger:
Manufacturer Devkit Driver Microchip ATSAME54-XPRO None required MXCHIP AZ3166 STLink NXP MIMXRT1050-EVKB JLink NXP MIMXRT1060-EVK JLink STM BL475E-IOT01 STLink STM BL4S5I-IOT01 STLink
-
Install Visual Studio Code.
-
Launch Visual Studio Code and install the following extensions:
- Required
- Recommended
-
Launch VSCode, and open the workspace in the directory for the target devkit.
For example the STM32L4 devkit workspace is
STMicroelectronics/STM32L4_L4+/STM32L4plus.code-workspace
. -
Press
F7
to build the applicationChoose the
ARM GCC Cortex
CMake kit if prompted. -
Press
F5
to start debugging the application.The application will be flashed to the devKit and execution will break at main().
-
Press
F5
to resume execution. -
Use a serial monitor such as Termite to monitoring the device's output.