Hello, Codespaces
This repository contains an application that prints "Hello, Codespaces!" and a counter value via semihosting output on
an Arm FVP simulation model
(Cortex-M3).
A codespace is a development environment
that's hosted in the cloud. Each codespace you create is hosted by GitHub in a Docker container, running on a virtual
machine. Regardless of your local operating system, your codespace will run in a Linux environment. You can connect to
your codespaces from your browser, from Visual Studio Code, or by using GitHub CLI.
Quick Start
- Click on Use this Template (in the top right corner) and select Create a new Repository.
- Enter a name for the new repository and click on Create repository. The new repository opens in your browser.
- Click on the drop down next to <> Code and select Codespaces.
- Click on Create codespace on main.
Note
The first time you create the Codespace will take a while as it installs the tools as described in the
devcontainer.json file.
During the process, you will see a pop up like this:

Click on Allow For Current Workspace. This will install the tools specified in the
vcpkg-configuration.json file automatically into your codespace.
Licensing
Arm tools require a valid license. When the installation finishes, you will see a pop up in the bottom right corner:

Click on Manage Arm license to select from the available options. For evaluation purposes, you can use the Arm
Keil MDK-Community edition:

For commercial projects, please obtain a license from your
local distributor or our
eStore
Note
If you missed the pop up, you can activate a license by clicking on the
notification in the status bar.
Build and Run
The project is configured for execution on an Arm Cortex-M3 FVP. Using a model removes the requirement for a physical
hardware board. This enables software testing directly on GitHub repositories.
- Open the
CMSIS view.
- If the current target set context avh in the status bar shows a red background, click on the three dots and
select Refresh (reload packs, update RTE). This will trigger a project update with the arm tool license
you have added previously.
- Click on
Build solution to start the build process. The build should finish
without errors or warnings.
- Click on
Load & Run application to run the image on the simulation model. The
Terminal shows the output:
* Executing task: FVP_MPS2_Cortex-M3 -f fvp-config.txt -a out/hello/avh/debug/hello.axf
Hello, Codespaces! 0
Hello, Codespaces! 1
Hello, Codespaces! 2
Hello, Codespaces! 3
Hello, Codespaces! 4
Hello, Codespaces! 5
Hello, Codespaces! 6
Hello, Codespaces! 7
Hello, Codespaces! 8
Hello, Codespaces! 9
Simulation complete โ shutting down via semihosting.
Info: /OSCI/SystemC: Simulation stopped by user.
Run manually
Instead of using the
Load & Run application command in the CMSIS view, you can
run the model manually. In a Terminal, run:
FVP_MPS2_Cortex-M3 -f fvp-config.txt -a out/hello/avh/debug/hello.axf
Repository Structure
๐ฆ
โฃ ๐ .devcontainer Development container control files
โ ๐ devcontainer.json Installs the required VS Code extensions
โฃ ๐ .vscode VS Code specific settings files
โ ๐ tasks.json Load & run commands to start the Arm FVP model
โฃ ๐ hello Project files
โฃ ๐ RTE Run-time environment related files
โฃ ๐ hello.cproject.yml Project file in CMSIS solution format
โ ๐ main.c C code
โฃ ๐ images Images for this README.md file
โฃ ๐ .gitignore List of files not to be committed to Git
โฃ ๐ fvp-config.txt Arm FVP configuration file
โฃ ๐ hello_codespaces.csolution.yml CMSIS Solution file
โฃ ๐ LICENSE Apache 2.0 license file
โฃ ๐ README.md This file
โ ๐ vcpkg-configuration.json Tools configuration file