This repository contains an application that runs in simulation on an Arm Fixed Virtual Platform (Arm FVP) model. The application prints "Hello World" and a counter value in the Terminal output window using semihosting.
- Install Keil Studio for VS Code from the VS Code marketplace.
- Clone this Git repository into a VS Code workspace.
- The related tools and software packs are downloaded and installed. Review progress with View - Output - CMSIS Solution.
- In the CMSIS view, use the Action buttons to build and run the example in simulation.
Note
Other Arm Tools will be installed via vcpkg. These are:
- Models: Arm Virtual Hardware for Cortex-M based on FastModels
- Toolchain: Arm Compiler for Embedded
- Debugger: Arm Debugger
The project is written in
CSolution Project Format:
- The
get_started.csolution.ymlfile lists and defines the required packs, target and build types, as welll as projects. - The
hello/hello.cproject.ymlfile defines components and source files. - The
vcpkg-configuration.jsonfile orchestrates the installation of all required tools locally or in the cloud.
The example is using the Arm Compiler for Embedded as the build toolchain. It is prepared to run on the Arm GNU Toolchain and the Arm Toolchain for Embedded as well. If you want to use one of these, do the following:
- Add the compiler in the
vcpkg-configuration.jsonfile. - Change the
compiler:setting at the end of theget_started.csolution.ymlfile.
In the CMSIS view, use the build button (hammer icon) to build the solution. In the background,
cbuild will be run:
Execute: cbuild /Users/user/vscode-get-started/get_started.csolution.yml --rebuild --active Corstone-300-FVP --packs
+-----------------------------------------------------
(1/1) Cleaning context: "hello.debug+Corstone-300-FVP"
+-----------------------------------------------------
(1/1) Building context: "hello.debug+Corstone-300-FVP"
Using AC6 V6.24.0 compiler, from: '/Users/user/.vcpkg/artifacts/2139c4c6/compilers.arm.armclang/6.24.0/bin/'
Building CMake target 'hello.debug+Corstone-300-FVP'
[1/20] Building C object CMakeFiles/Group_Source.dir/Users/user/vscode-get-started/hello/main.o
[2/20] Building C object CMakeFiles/ARM_CMSIS_OS_Tick_SysTick_1_0_5.dir/Users/user/.cache/arm/packs/ARM/CMSIS/6.1.0/CMSIS/RTOS2/Source/os_systick.o
[3/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_memory.o
[4/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_delay.o
[5/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_lib.o
[6/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_evr.o
[7/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_kernel.o
[8/20] Building ASM object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/GCC/irq_armv8mml.o
[9/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_evflags.o
[10/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_mempool.o
[11/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_mutex.o
[12/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_msgqueue.o
[13/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/vscode-get-started/hello/RTE/CMSIS/RTX_Config.o
[14/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_semaphore.o
[15/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_system.o
[16/20] Building C object CMakeFiles/ARM_Device_Startup_C_Startup_2_0_0.dir/Users/user/vscode-get-started/hello/RTE/Device/SSE-300-MPS3/system_SSE300MPS3.o
[17/20] Building C object CMakeFiles/ARM_Device_Startup_C_Startup_2_0_0.dir/Users/user/vscode-get-started/hello/RTE/Device/SSE-300-MPS3/startup_SSE300MPS3.o
[18/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_timer.o
[19/20] Building C object CMakeFiles/ARM_CMSIS_RTOS2_Keil_RTX5_Source_5_9_0.dir/Users/user/.cache/arm/packs/ARM/CMSIS-RTX/5.9.0/Source/rtx_thread.o
[20/20] Linking C executable /Users/user/vscode-get-started/out/hello/Corstone-300-FVP/debug/hello.axf
Program Size: Code=14030 RO-data=974 RW-data=188 ZI-data=29312
+------------------------------------------------------------
Build summary: 1 succeeded, 0 failed - Time Elapsed: 00:00:02
+============================================================
Completed: cbuild succeed with exit code 0
Build completeThe project is configured for execution on the Corstone-300 Arm FVP running an Arm Cortex-M55 processor. This model is available free-of-charge and removes the requirement for a physical hardware board. It can be used with the MDK-Community edition.
In the CMSIS view, press the Load & Run application button (the play icon). In the background, the following will be run:
* Executing task: FVP_Corstone_SSE-300 -f fvp-config.txt --simlimit 60 -a out/hello/Corstone-300-FVP/debug/hello.axf
Info: FVP_MPS3_Corstone_SSE_300: telnetterminal0: Listening for serial connection on port 5000
Info: FVP_MPS3_Corstone_SSE_300: telnetterminal1: Listening for serial connection on port 5001
Info: FVP_MPS3_Corstone_SSE_300: telnetterminal2: Listening for serial connection on port 5002
Info: FVP_MPS3_Corstone_SSE_300: telnetterminal5: Listening for serial connection on port 5003
Hello World 0
Hello World 1
Hello World 2
Hello World 3
Hello World 4
Hello World 5
Hello World 6
Hello World 7
Hello World 8
Hello World 9
Hello World 10
Hello World 11
...
Info: Simulation is stopping. Reason: Simulated time has been exceeded.
Info: /OSCI/SystemC: Simulation stopped by user.This repository is prepared to run in GitHub Codespaces, your development environment in the cloud. This eliminated the necessity to install any tools on your local machine.
To start your Codespace through your browser, click on <> Code, switch to the Codespaces tab and select
Create Codespace on main. A new window opens and your environment will be set up. Allow a couple of minutes to
finish. If you reopen the Codespace later, it will be much faster.
Use the Codespace in the same way as you have done in the Quick Start chapter.