-
Notifications
You must be signed in to change notification settings - Fork 240
Home
Cortex-Debug is an extension to add debugging capabilities for ARM Cortex-M devices to Visual Studio Code.
Please read the Overview page to understand this extension and the debugging process better. Especially important for advanced/custom use cases.
There are dozens of options that are more suitable for global or workspace settings. Please don't jump to configuring your launch.json
before reviewing these settings. These are not settings you put in the launch.json
file. They are settings for this extension and are inherited by your launch.json configurations. There are two key settings we need for the tool to even function
-
cortex-debug.armToolchainPath
- there are many versions of this for customization for each OS. This is the directory that contains all the GNU toolchain executables. There are many, and currently, we rely ongdb
,objdump
, andnm
. Maybe different in the future. *Note: This does not have to be ARM specific, it can be anything but we are historically built for a 32-bit ARM embedded device` -
cortex-debug.armToolchainPrefix
- Historically, the prefix wasarm-none-eabi
and this is our default. But that has been changing and there are far too many distributions with custom builds/prefixes, so you may have to customize this.
If we cannot find the tools to find and run the GNU tools, then debugging is not possible. There are a LOT of customizations possible but following the above will simplify your getting started.
Please review all of the other settings and this list will evolve. It is a place to look to see if you a setting that is a bit more global than one launch configuration.
- Segger J-Link GDB Server (https://www.segger.com/) (https://wiki.segger.com/J-Link_Visual_Studio_Code). Make sure you use the JLinkGDBServerCL.exe or JLinkGDBServerCLexe and not the GUI versions
- STMicroelectronic's ST-LINK GDB server supplied as part of the STM32CubeIDE (https://www.st.com/resource/en/user_manual/dm00613038-stm32cubeide-stlink-gdb-server-stmicroelectronics.pdf)
- PE-Micro GDB Server (http://www.pemicro.com)
- Texane's St-Link Utils (https://github.com/stlink-org/stlink)
- Black Magic Probe Embedded GDB server (https://github.com/blacksphere/blackmagic/wiki)
- PyOCD (https://github.com/mbedmicro/pyOCD)
- OpenOCD (Note: Please use the latest version, 0.11.0 when writing this, prebuilt binaries for Windows)
- Many vendors (ST, Cypress/Infineon) ship their own modified versions of OpenOCD. You must use their version to be fully compatible with their devices
- QEMU Emulated Environment
- Renode Emulated Environment (https://renode.io)