eCos Support for ARM Virtual Machines — Overview


This document covers the configuration and usage of eCos and RedBoot on ARM Aarch32 Virtual Machines running under a variety of hypervizors. It supports Virtual Machines using a limited number of real device emulations as well as some VirtIO based devices. This package contains things that are common to all VM targets. An additional package is needed to customize support for a specific hypervizor. At present virtual machines running under QEMU and Xvisor are supported by these packages.

eCos applications are typically developed using the host-based gdb debugger, communicating with a "gdb stub" built-in to either RedBoot or the hypervisor. For RedBoot-based development, the VM is set up to boot into RedBoot either from a ROM image or from an image inserted into RAM from the hypervisor. RedBoot incorporates a gdb stub that enables eCos applications to be downloaded and debugged either via a serial line or over Ethernet. When running under QEMU, such applications may also be debugged using QEMU's GDB stub interface.

Support for SMP operation is available, although debugging support is limited. There is no SMP debug support in RedBoot. The emulated virtual GIC supports up to eight CPUs, eCos is therefore limited to a maximum of eight CPUs..

Finished eCos ROM startup applications can be deployed directly by a hypervisor, copying its image into a VM and booting the VM.

This documentation is expected to be read in conjunction with the ARM architecture HAL documentation and the hypervisor specific packages.

Supported Hardware

eCos currently runs in single processor or multi-processor modes on an ARM Aarch32 Virtual Machine. The following devices are currently supported by this and other generic packages.

Generic Interrupt Controller
The ARM GIC is used to handle interrupts. The GIC needs to be memory-mapped. The mapping of interrupt vectors is handled by a hypervisor specific package.
Generic Timer
The ARM architecture Generic Timer is used to supply the system timer. eCos used the virtual counter and timer in order to insulate it from hypervisor scheduling. The timer is accessed through the CP15 register set.
Emulated UART
ARM PL011 UART macrocell. Most ARM hypervisors support an emulation of this device and drivers are available in RedBoot and eCos to support it.
VirtIO Console
Support for the VirtIO console device class is present in both RedBoot and eCos.
Ethernet access is via a VirtIO NET device. The hypervisor is then responsible for routing packets to other VMs or an external network connection.
Support is present for using a VirtIO RPMSG interface. This supports the RPMSG subsystem library to present a standard RPMSG API to user applications.

In general, devices are initialized only as far as is necessary for eCos to run. Other devices are not touched unless the appropriate driver is loaded. Further devices may be supported by the hypervisor specific HAL package and additional device drivers.


The board support is intended to work with GNU tools configured for an arm-eabi target. The original port was undertaken using arm-eabi-gcc version 7.3.0, arm-eabi-gdb version 8.1, and binutils version 2.30.