This repository contains a minimal example for compiling, flashing, and debugging source code for the Infineon XMC1100 microcontroller using VS Code under Linux. The project was migrated from DAVE IDE and is set up to work with the ARM GCC toolchain and the J-Link GDB Debugger.
Before using this repository, ensure you have installed the following dependencies:
-
ARM GCC Toolchain
- Install via package manager:
sudo apt install gcc-arm-none-eabi
- Alternatively, download from Arm Developer
- Install via package manager:
-
J-Link Debugger (Segger J-Link Software & Driver Package)
- Download from Segger
- Install following the instructions for Linux
-
VS Code
- Install from VS Code official website
- Required Extensions:
- C/C++ (by Microsoft)
- Cortex-Debug (for debugging with J-Link)
-
CMake & Ninja
- Install via package manager:
sudo apt install cmake ninja-build
- Install via package manager:
├── .vscode/ # VS Code settings and tasks
├──────── cmake-kits.json
├──────── launch.json # Debugger configuration for Cortex-Debug
├──────── settings.json # CMake Config
├──────── tasks.json # Build/Clean/JlinkGDBExe
├── main.c # Aplication Entry
├── Dave/Generated # DaveIDE Generated Sources
├── build/ # Build directory
├── CMakeLists.txt # CMake build system (if used)
├── Makefile # Makefile for building the project
├── linker_script.ld # Linkerscript for XMCxxxx series
├── build.sh # clean build shell script
└── README.md # This file
git clone <repository-url>
cd <repository-folder>
Using the script:
./build.sh
Step by Step:
rm -rf build/
cmake -B build -GNinja
nincmake --build buildja
- Open the project in VS Code.
- Configure the debugger in
.vscode/launch.json
:{ "configurations": [ { "name": "Debug XMC1100 (J-Link SWD)", "type": "cortex-debug", "request": "launch", "servertype": "jlink", "device": "XMC1100", "interface": "swd", "runToEntryPoint": "main", "cwd": "${workspaceFolder}", "executable": "${workspaceFolder}/build/XMC1100_Project.elf", "serverArgs": [ "-if", "SWD", "-speed", "1000" ], "svdFile": "${workspaceFolder}/XMC1100.svd", "postLaunchCommands": [ "monitor reset halt", "load", "monitor reset", "break main", "continue" ], "showDevDebugOutput": "raw" } ] }
- Start debugging via Run → Start Debugging or press
F5
.
- Ensure that
JLinkGDBServer
is running before debugging, see.vscode/tasks.json
- The project is configured for a migrated DAVE IDE setup. If you need to adjust paths, check the
Makefile
,CMakeLists.txt
, and.vscode/
settings.
Just use it if you need it.
Feel free to submit issues or pull requests to improve this repository.