eCos Support for the Raspberry Pi Board Family — Overview


The eCosPro release for the Raspberry Pi family is free to use for non-commercial, educational and evaluation purposes. If you wish to use it within a commercial product then a license from eCosCentric is required. Please see the eCosPro license page for details.

This document covers the configuration and usage of eCos and RedBoot on the Raspberry Pi Family of Boards. eCos should be functional on all current members of the family and has been tested on the following variants: Pi Zero, Pi Zero W, Pi 1 Model B, Pi 2 Model B, Pi 3 Model B, Pi 3 Model B+, Pi Compute Module 1 and Pi Compute Module 3. These boards are fitted with one of three variants of the Broadcom BCM283X System-on-Chip devices.

In addition to the BCM283X, the board contains 256MiB to 1GiB of SDRAM main memory, an SD card socket, and an optional LAN951X or LAN7515 USB hub/Ethernet device. Variants of the RPi may have a CYW43438 WiFi/Bluetooth device, and may have an eMMC device in place of the SD socket. All have a GPIO header giving access to various IO pins, including GPIO, UART, SPI and I²C. For details of which devices are available on which board variants, see the Raspberry Pi Foundation website, or the Raspberry Pi Wikipedia page.

eCos applications can be developed either using a JTAG-based hardware debugger or by use of the RedBoot ROM monitor. eCos applications are deployed booting directly from the Raspberry Pi SD card, or in the case of the compute modules, from the eMMC.

For RedBoot-based development, the RedBoot image is programmed onto an SD card, or into eMMC, and the board boots directly into RedBoot from reset. RedBoot incorporates a gdb stub that enables eCos applications to be downloaded and debugged via the host-based gdb debugger. You can connect gdb to the board either via a serial line or over Ethernet. Note that applications that make use of USB-based peripherals (including Ethernet) are limited to the serial connection as the eCos USB functionality cannot be shared with RedBoot.

Support for SMP operation of the four CPUs in the RPi2 and RPi3 variants is available, although debugging support is restricted to use of an external JTAG debugger, such as the Lauterbach TRACE32. There is no SMP debug support in RedBoot.

This documentation is expected to be read in conjunction with the BCM283X variant HAL documentation and further device support and subsystems are described and documented there.

Note that the Raspberry Pi may be also be referred to using the abbreviation "RPi" within the documentation.

Supported Hardware

The following devices are currently supported by the Raspberry Pi port. These apply to all RPi boards unless stated otherwise.

Auxiliary mini UART only, RX and TX lines only connected to GPIO14 and GPIO15 on the GPIO header. Used by RedBoot for communication with the user and GDB. The PL011 UART1 is not currently supported and is reserved for future use with Bluetooth on those boards that are so equipped.
SPI0 device only. The auxiliary SPI1 and SPI2 devices are not supported. SPI0 is mapped to GPIO7 to GPIO11 on the GPIO header.
I2C1 using the BSC1 controller only. I2C1 uses the GPIO2 and GPIO3 pins on the GPIO header. BSC0 is reserved for use by the GPU, and BSC2 is dedicated to the HDMI interface.
USB host support is provided by the USB protocol stack and the Synopsys DWC host controller driver. The stack also provides support for the hub component of the LAN951X/LAN7515 device. The stack currently only provides Control and Bulk endpoint support, at High, Fast and Low speeds.
For those boards equipped with a LAN951X/LAN7515, the Ethernet driver provides support for both the BSD and LWIP protocol stacks.
A driver for the Broadcom SDHOST MMC/SD controller provides access to either cards in the SD socket or, in the compute modules, the eMMC device. The FAT filesystem package provides access to files on these devices.
A set of macros in the BCM283X variant HAL provide support for controlling all GPIO pins, including setting pin modes and selecting alternate functions. GPIO interrupts are decoded to provide a separate vector for each pin.
On booting RedBoot, and ROM startup eCos applications, the HAL sets a group of GPIO pins to their JTAG alternate functions. This allows an external JTAG debugger to connect and load an application for development. RedBoot also contains a JTAG command that allows the JTAG pin mappings to be changed at runtime.

In general, devices (Caches, GPIO, UARTs) are initialized only as far as is necessary for eCos to run. Other devices (I²C, SPI, MMC/SD etc.) are not touched unless the appropriate driver is loaded, although in some cases, the HAL boot sequence may set up the appropriate pin alternate configuration.


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 4.7.3, arm-eabi-gdb version 7.2, and binutils version 2.23.