This tutorial shows how to use the Advanced Mbed Project Subsystem to develop mbed-based projects using the latest version of mbed without converting them to Visual C++ projects. Before you begin, install VisualGDB 5.4 or later.
- Start Visual Studio and open the Advanced Mbed Project Wizard:
- Select “Create a new ‘Blinking LED’ project”. Mbed projects are built using the Python-based mbed-cli tools. If your system does not have a Python environment, or the environment doesn’t have the mbed-cli tools installed, VisualGDB can automatically download the necessary tools for you:If VisualGDB prompts for the location of the Git binary, please download and install one from the official Git distribution.
- Once all tools have been installed, click “Next”:VisualGDB will clone the blinky example from github using the mbed tools. As each mbed project must include a copy of the mbed framework itself, checking it out may take a few minutes.
- Mbed projects require the GNU ARM toolchain maintained by ARM itself. Install the latest version of the toolchain and select it on the Toolchain page. Then pick your mbed target from the list:
- Connect your board to your computer via USB and let VisualGDB automatically detect the settings. If the device name cannot be automatically detected from the board name, simply select it in the “Debugged device” field manually:
- Press “Finish” to create the project. VisualGDB will query the detailed project structure from the mbed-cli tools and will show it in Solution Explorer. Unlike the regular mbed projects that reuse the VC++ project subsystem to build the project, the advanced mbed projects are built directly using the mbed tools and any changes you make in Solution Explorer will be automatically be recognized by those tools. Build the project by pressing Ctrl-Shift-B:
- Set a breakpoint in main() and start debugging the project:
- Right-click on the project in Solution Explorer and select “VisualGDB Project Properties”. You can use the Mbed Project page to change the toolchain, configure source directories and preprocessor macros, or to edit the advanced mbed configuration variables:VisualGDB will automatically create or edit the mbed configuration files for you and the mbed build tools will pick up the changes even if you build the project outside VisualGDB