Commit 86c7ef76 authored by Martin Horauer's avatar Martin Horauer
Browse files


parent 92948eed
# About
The following guide describes the steps to build and run the mbed applications
targeting the XMC 4500 Relax Kit board from Infineon.
The `mbed-os` folder contains the MBED platform with various drivers for the
XMC platform. At the moment this is kept in a separate repository from the
main mbed project hosted on github at[].
The example applications are obtained from[] and are
structured in folders named like `APP_XXX`.
## Import the project
$ git clone
$ cd XMC_MBED/
# Step-by-Step Building/Flashing/Debugging
## Compile a project
Navigate into the project folder and build it using:
mbed compile -m XMC_4500_RELAX_KIT -t GCC_ARM -N main
mbed creates a BUILD directory where you can find the executable (`*.bin`, `*.elf`, `*.hex` ...).
When using MS-Windows delete the existing Unix symbolic-link `mbed-os` and
replace it with a Windows symbolic link using `mklink /D mbed-os ..\mbed-os`.
## Flash the application to the Relax-Kit
Use the JLink tools to flash the application hexfile to the Relax-Kit.
$ JLinkExe -device XMC4500-1024 -if SWD -speed 4000 -autoconnect 1
J-Link> loadfile BUILD/XMC_4500_RELAX_KIT/GCC_ARM/main.hex
J-Link> r
J-Link> g
## Debugging
To the debug the application 4 steps in sequence are necessary.
(1) You will need to create the executable with DEBUg symbols. To that end add
`--profile mbed-os/tools/profiles/debug.json` to the build command.
mbed compile -m XMC_4500_RELAX_KIT -t GCC_ARM -N main --profile mbed-os/tools/profiles/debug.json
(2) Start the `JLinkGDEBServer`, e.g.:
JLinkGDBServer -Device XMC4500-1024 -if SWD
(3) In order to log messages printed to `stdout` we connect to port 2333 via
telnet 2333
(4) We launch the debugger and control the debug session:
arm-none-eabi-gdb -q BUILD/XMC_4500_RELAX_KIT/GCC_ARM/main.elf
(gdb) target remote :2331
(gdb) monitor reset
(gdb) load
(gdb) monitor reset
(gdb) b main
(gdb) c
# Makefile Building/Flashing/Debugging
Using the prepared `Makefile` one can invoke trhe following actions in a more
convenient way:
make # build the application with debug symbols
make debug # -"-
make release # debug a release version of the project
make flash # flash the application
make debug # debug the application
make erase # erase the program memory
make doc # invoke doxygen
make clean # clean the project
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment