This project prints "Hello World" and a counter value via the UART output. It is configured for Arm Virtual Hardware, but other target hardware that provides a CMSIS Driver:USART can be easily added.
retarget.csolution.yml
The project is generated using the CMSIS-Toolbox and is defined in csolution
format:
retarget.csolution.yml
lists the required packs and defines the hardware target and build-types (along with the compiler).retarget.cproject.yml
defines the source files and the software components.Arm Keil Studio Pack Extensions for VS Code include all required tools and interfaces to build the csolution
projects.
- See Arm Keil Studio for VS Code Extensions User Guide for more information about using the Keil Studio extensions.
When the project is opened in VS Code with Arm Keil Studio Extensions installed one must first ensure that the build tools are configured. The Arm Tools Environment Manager
should handle this automatically and create vcpkg-configuration.json
with all the necessary tools listed. Right-click anywhere in the workspace and select "Configure Arm Tools Environment" to modify tools configuration. See Arm Tools Environment Manager Overview for available functionality.
To build a project using Keil Studio extensions open CMSIS view, open "Manage Solution Settings" view and verify that "Active Target", "Active Projects" and "Build Type" are selected. Since there is only one option in each category they should all be automatically selected.
You can execute the build by selecting "Build" from the CMSIS view.
CMSIS-Toolbox provides cbuild command-line tool that builds csolution
projects.
The retarget.csolution.yml
solution files defines Debug
build-type and VHT_CM3
target-type. To build this configuration using Arm Compiler 6 toolchain execute the following command:
Note
- During the build process required packs may be downloaded (
--pack
flag).
By default the project does not specify the toolchain and one can build the project by specifying the AC6, GCC, CLANG or IAR toolchain.
The project is configured for execution on Arm Virtual Hardware which removes the requirement for a physical hardware board.
To execute application image on Arm Virtual Hardware use below command:
Note
- For GCC and CLANG, the application image file has extension
.elf
and extension.out
for IAR.
This command will execute the simulation model and in the default terminal window you should see the following output:
The simulation model will automatically terminate after the above output.