Arm Cortex-M development and debugging environment inside a VSCode devcontainer.
- Arm GNU Toolchain Version 14.3rel1
- SEGGER J-Link Software Version 8.80
- xPack OpenOCD Version 0.12.0-7
- CMake Version 4.1.2
- VSCode Dev Containers extension
- usbipd-win (Windows and WSL parts installed!)
- Include this repo as .devcontainerin the root of your project
- Connect debug probe
- Select Dev Containers: Reopen in Container
For CMake projects:
- Upon prompt, select the Arm GNU Toolchain x.xCMake Kit.- The toolchain file is located at /opt/gcc-arm-none-eabi/gcc-arm-none-eabi.cmake.
- The CMake kit definition for VS Code is located at /opt/devcontainer/cmake-tools-kits.json.
 
- The toolchain file is located at 
- Run CMake: Configure
- Build using CMake: Build [F7]
Upon first run, an error message may appear in Line 1, Column 1. Try re-running CMake configuration, or run a build. If the file is a .h header file, it needs to be #include'd into a C module.
In order to use SEGGER and OpenOCD debug probes within the container, some udev rules need to be installed on the host machine. A setup script has been provided to aid with installation.
- 
Run setup-devcontainerinside the container
- 
Close the container, and re-open the work directory on your host 
- 
Run the install-rulesscript inside.vscode/setup/on your host machinecd .vscode/setup sudo ./install-rules
To access a serial port inside the devcontainer, use the cu command as shown below:
cu -l <serial port device> -s <baudrate>
e.g. "cu -l /dev/ttyACM0 -s 115200".
To close the connection, press RETURN/ESC/Ctrl-C, type "~." (tilde, dot) and wait for 3 seconds.
Use the setup-devcontainer script to download and install SEGGER Ozone and its dependencies:
setup-devcontainer --install-ozone
Launch it from a terminal tab using the ozone command.
If not stated otherwise, the contents of this project are licensed under The MIT License. The full license text is provided in the LICENSE file.
SPDX-License-Identifier: MIT