VSCode Cortex-Debug Launch Configurations

From EdWiki

Revision as of 08:55, 27 December 2019 by Jshankar (Talk | contribs) (Created page with "__NOTOC__ == VSCode Cortex-Debug Launch Configurations == [ Cortex-Debug] is an extension for Visual Studio Code to streamline your...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

VSCode Cortex-Debug Launch Configurations

Cortex-Debug is an extension for Visual Studio Code to streamline your debug process when working with ARM Cortex-M microcontrollers. This document covers writing launch configurations (launch.json).

OpenOCD GDB Server ("servertype": "openocd")

To the right is an example of a basic launch configuration using the OpenOCD GDB server.

In this configuration the device parameter is not required - but can be supplied to allow auto-selecting an appropriate SVD file if possible.

There is one OpenOCD specific parameter that must be supplied. The configFiles property takes an arrays of strings that are used to load openocd configuration files. These can either be a files in the openocd search path (like in this example), or a full path to your own configuration file. If you are using OpenOCD supplied files you typically will have either one file from the board section, or a file from the interface section and a file from the target section.

    "version": "0.2.0",
    "configurations": [
	    "name": "Debug (OpenOCD)",
	    "cwd": "${workspaceRoot}",
	    "executable": "./add.elf",
            "request": "launch",
	    "type": "cortex-debug",
	    "servertype": "openocd",
            "device": "TM4C123GH6PM",
	    "configFiles": [