Get started example for use in Keil Studio
- Download & Install Microsoft Visual Studio Code for your operating system.
- Launch Visual Studio Code. From the 'View' menu open 'Extensions' (ctrl+shift+x). Search for "Keil Studio Pack" and select the install button.
- 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
- Specify the destination folder to clone to and select 'Open' when asked 'Would you like to open the cloned directory?'
- 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)
- 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).
- 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:
cpackget
for installing and uninstalling CMSIS-Packscsolution
for updating, validating and converting from the CMSIS Project Management YML input format to the CMSIS Build XMLcprj
format used bycbuildgen
.cbuildgen
cbuild
for an orchestrated build of one or moreconfigurations
of a csolution.
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