Skip to content

Arm-Examples/keil-studio-get-started

Repository files navigation

keil-studio-get-started

CMSIS Compliance

Get started example for use in Keil Studio

How to setup your Development Environment using Keil Studio VSCode Extension:

  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 for this repo: https://github.com/Arm-Examples/keil-studio-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 by the 'Arm CMSIS csolution' extentsion for building the projects of the solution.
    • ctools: CMSIS-Toolbox
    • cmake
    • ninja
    • gcc: arm-none-eabi-gcc (GNU Arm Embedded Toolchain)
  6. By default the 'Arm CMSIS csolution' extension is configured to automatically convert *.csolution.[yml|yaml] files into a *.cprj file for each 'context' of the solution. If you do not see any *.cprj file side by side the 'hello.cproject.yml' you can right click on the 'get-started.csolution.yml' file in the 'Explorer' View and run 'convert'. The convert command may fail due to missing packs. In this case run the command 'CMSIS: Install required packs for the active solution' from the 'Command Palette' (ctrl-shift-p).
  7. 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 *.cprj file of the solution context (e.g. hello.debug+avh.cprj)

Note: Any terminal that is openened 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:

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 Keil MDK Professional Edition for Windows and removes the requirement for a physical hardware board.

./ $ VHT_MPS2_Cortex-M3 -f vht-config.txt -a ./out/hello/AVH/Debug/hello.elf

About

Get started example for use in Keil Studio

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •