This document explains how to build and debug Arm Mbed OS applications using Keil uVision 5. Due to the linker limits, this does not work in the free version of uVision. If you do not have a uVision license, you can use Eclipse, Visual Studio Code or any other IDE that supports debugging through GDB. For more info, please see Setting up a local debug toolchain.
Exporting a project
To export your project to uVision, you can use either the Online Compiler or Mbed CLI.
Note: Store the project on your local hard drive. uVision does not support building from a network share.
- Right click on your project.
- Select Export Program....
- Under 'Export toolchain', select Keil uVision 5.
- Click Export, and unpack at a convenient location.
Exporting using the Arm Mbed Online Compiler
Arm Mbed CLI
In your project folder, run:
# replace K64F with your target board $ mbed export -i uvision6 -m K64F
Starting a debug session
The exported project contains a
.uvprojx file. Double click on this file to open the project in uVision. uVision 5 does not support nested folders in the tree, so find your application source code by looking for a folder with the same name as your project.
Debugging an Mbed OS 5 program in uVision 5
To build your project and start a debug session:
- Click Project > Build Target.
- When building succeeds, click Debug > Start/Stop Debug Session.
- If uVision does not connect to your development board, go to Project > Options for Target > Debug, and make sure 'CMSIS-DAP Debugger' is selected.
CMSIS-DAP Debugger options
For more information on the CMSIS-DAP Debugger driver in uVision, see the uVision documentation.