Home

Awesome

Visual Studio Code get started solution

This repository builds an ELF file that prints "GetStarted World" and a counter value via semihosting output on an Arm Virtual Hardware model (Cortex-M3).

How to setup your CMSIS Csolution CLI Environment

Refer to the installation guide of CMSIS-Toolbox.

How to setup your CMSIS Csolution Development Environment

  1. Download & Install Microsoft Visual Studio Code for your operating system.
  2. Launch Visual Studio Code. From the 'View' menu open 'Extensions' (ctrl+shift+x). Search for "Keil Studio Pack" and select the install button.
  3. From the 'View' menu open 'Source Control'. Select 'Clone Repository' and copy the url: https://github.com/Open-CMSIS-Pack/vscode-get-started into the input dialog
  4. Specify the destination folder to clone to and select 'Open' when asked 'Would you like to open the cloned directory?'
  5. Open the 'Explorer' view (ctrl-shift-e) and select the file 'vcpkg-configuration.json'. This file instructs Microsoft vcpkg to install the prerequisite artifacts required for building the solution and puts it into the PATH: cmake, ninja, cmsis-toolbox as well as arm-none-eabi-gcc.
  6. Open the 'CMSIS' view from the side bar and press the 'Build' button. The last line of the ninja build output will tell you where you can find the application elf file. Alternatively you can select 'Build' or 'Rebuild' from the context menu of the *.csolution.yml file of the solution context (e.g. get_started.csolution.yml) to build all contexts of the solution.

Note: Any terminal that is opened within VSCode after vcpkg got activated for the folder, will have all the above tools added to the path. This allows you to run tools from the CMSIS-Toolbox like:

Additional Tools

Project Structure

The project is written in the CMSIS-Toolbox Project Format:

Build Solution/Project

Use the cbuild command from CMSIS-Toolbox to generate and build one or all configurations of the solution:

Execute Project

The project is configured for execution on Arm Virtual Hardware (AVH) modelling an MPS2 board running an Arm Cortex-M3 processor. This model is part of the MDK Professional Edition and removes the requirement for a physical hardware board. It DOES NOT WORK with the MDK Community Edition.

Note: depending on the toolchain used the extension of the application file is either elf (GCC, Clang) or axf (AC6):

FVP_MPS2_Cortex-M3 -f fvp-config.txt -a out/hello/avh/debug/hello.axf