Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 2.41 KB

debugging-local.md

File metadata and controls

48 lines (33 loc) · 2.41 KB

Local Debugging with Visual Studio Code

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.

Install Prerequisities

Install Device Drivers

  1. Download and unzip the latest OpenOCD and add its bin folder to your environment path.

  2. 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

  1. Install Visual Studio Code.

  2. Launch Visual Studio Code and install the following extensions:

Start Debugging

  1. 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.

  2. Press F7 to build the application

    Choose the ARM GCC Cortex CMake kit if prompted.

  3. Press F5 to start debugging the application.

    The application will be flashed to the devKit and execution will break at main().

  4. Press F5 to resume execution.

  5. Use a serial monitor such as Termite to monitoring the device's output.