Quality RTOS & Embedded Software

Delta Over-the-Air Updates
December 2021 Releases:
Extended Maintenance Plan (EMP):
FreeRTOS 202111.00 Release:
FreeRTOS LTS libraries:

Installing and Starting the QEMU Emulator
for use with FreeRTOS demos applications

This page describes how to install QEMU for use with FreeRTOS demo applications that target the QEMU emulator, rather than physical chips.

Note: At the time of writing all demo projects that target QEMU were developed and tested on Windows hosts.

  1. Download and install QEMU - there is a separate download page for pre-built QEMU Windows executables.

  2. Build the demo application by following the instructions on the relevant demo specific documentation page, and note the name of the resultant executable. The rest of this page assumes the executable is called RTOSDemo.elf.

  3. Start QEMU using the following command:

    qemu-system-<TARGET_ARCHITECTURE> -kernel <PATH_TO>/RTOSDemo.elf -S -s -machine <TARGET_MACHINE>

    • replacing <TARGET_ARCHITECTURE> with your target's architecture, such as:

      qemu-system-arm ----> for ARM CPUs.
      qemu-system-riscv32 ----> for RISC-V CPUs.

    • replacing <PATH_TO> with the real path to the FreeRTOS image, assumed to be RTOSDemo.elf in the above example.

    • replacing <TARGET_MACHINE> with your target chip name as defined by QEMU. Use the "-machine help" command to list the chips supported by QEMU. For example:
      qemu-system-riscv32 -machine help
      results in the following output:

      Checking CPU name defined by QEMU

  4. Once running, QEMU will display a window as shown below. Leave the window open. At this point QEMU is waiting for a GDB connection - return to the demo specific documentation page for information on starting a debug session. Note: It is necessary to restart QEMU each time the RTOS executable is rebuilt.

    QEMU Emulator

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.