Run an example system and hello world software

To verify the that the Fast Models license setup and installation are correct, let’s work through a simple bare-metal software application “hello world” with a simple Fast Models Virtual Platform.

Follow these steps:

  1. Download the Fast Models hello world examples from the Arm Developer Solutions Repository.
  2. Use git from the command line or use another git client:
    git clone

    Navigate to the system and directory of an example. Example systems are provided for Cortex-M, Cortex-R, and Cortex-A.

  3. Start System Canvas. System Canvas is the GUI tool that is supplied with Fast Models. Using System Canvas, you can build and edit platforms in either a schematic or text editor:
    • For Linux: Run sgcanvas from the terminal.
    • For Windows: Open System Canvas from the Arm section of the Start menu.
  4. Open the example project using File > Load Project and navigate to the .sgproj file for the Cortex-M, Cortex-R, or Cortex-A example.
  5. Make sure that the Select Active Project Configuration pull-down has the correct operating system and compiler.
  6. Click Build to compile the system. The resulting executable is in a directory which is specific to an operating system and a compiler, and is based on the selected project configuration. In the configuration subdirectory look for isim_system on Linux ad isim_system.exe on Windows.
  7. Run a command-line simulation in a Linux terminal or Windows Command Prompt, by passing the hello world software to the simulation:
    • For Linux: isim_system -a ../software/hello.axf
    • For Windows: isim_system.exe -a ../software/hello.axf
    The included run_windows.cmd and scripts are included to automatically run the simulation using the above syntax. Either method works.

    The model for the PL011 UART displays the output and the hello world message will appear.
  8. Click Ctrl-C to exit the simulation.

Follow these steps to use a debugger to control the hello world software:

  1. Start the simulation again with -S to enable connection from a debugger which supports Component Architecture Debug Interface (CADI). CADI is the debug API that is linked into Fast Models during the project build step. The simulation waits for a debugger to connect before starting execution.
    • For Linux: isim_system -a ../software/hello.axf -S
    • For Windows: isim_system.exe -a ../software/hello.axf -S

    Any debugger with CADI support can be used to connect, control the software execution, and inspect the CPU and software.

    Arm debuggers with CADI support are:
    • Model Debugger
    • Arm DS
    • uVision
    In this guide, we will work with Model Debugger, which is included in Fast Models.
  2. Start Model Debugger:
    • For Linux: Run modeldebugger from the terminal.
    • For Windows: Open Model Debugger from the Arm section of the Start menu.
  3. Use the File > Connect to Model menu item to open a dialog box which selects the running simulation to connect to.
  4. Click OK and select the hello.axf when prompted.
  5. Use the debugger controls to step, run, and examine instructions, registers, and memory.

    System Canvas can launch the simulation directly and connect Model Debugger. Refer to the Fast Models User Guide for more information.
  6. Select the correct example for the Cortex-M, Cortex-R, or Cortex-A core, depending on the licenses that are available. If a license for the default CPU is not available, the system can be changed to use a similar CPU which is available. Because the simple hello world program assumes very little about the underlying hardware, or use any special hardware features, the following cores can be substituted in their category:

    Armv7-A Armv8-A Armv6-M/v7-M/v8-M
    Cortex-A72 Cortex-M7
    * Cortex-A32 is Armv8-A but in this case works with code compiled for Armv7-A. This is because the Armv8-A code assumes 64-bit compatibility.
  7. Drag the core that you want to work with from the component list onto the canvas. Connect the new core to the same ports as the initial core.
  8. Delete the initial core, and recompile the model. Refer to the System Canvas Tutorial for more information.
Previous Next