This document covers the configuration and usage of eCos and RedBoot on the Altera Cyclone V SoC Development kit. This board is fitted with an SX variant of the Cyclone V family of FPGAs and it therefore referred to in this document and the configuration system as a Cyclone V SX, or cyclone5_sx, to differentiate it from other Cyclone V SoC development boards.
In addition to the Cyclone V FPGA, the board contains 1GiB SDRAM main memory, a 1Gib (128GiB) SPI NOR flash, a micro-SD card socket, a USB bridge connected to UART0, Ethernet sockets for both the HPS and FPGA Ethernet interfaces, plus a variety of connectors for other interfaces plus resources devoted to the FPGA. The extent of eCos support for the devices and peripherals on the board and the CPU is described below.
For typical eCos development, a RedBoot image is programmed into the SPI NOR flash memory, and the board will load this image from reset. RedBoot provides gdb stub functionality so it is then possible to download and debug stand-alone and eCos applications via the gdb debugger. This can happen over either a serial line or over Ethernet.
Support for SMP operation of the two Cortex-A9 CPUs on the Cyclone V SoC is available, although debugging support is restricted to use of an external JTAG debugger. There is no SMP support in RedBoot.
This documentation is expected to be read in conjunction with the Altera HPS processor HAL documentation and further device support and subsystems are described and documented there.
The SPI NOR flash consists of 2048 blocks of 64Ki bytes each. In a typical setup, the first 4 blocks are reserved for the second-level bootstrap, the preloader. The 10 blocks from block 6 are reserved for the use of the ROM RedBoot image. The topmost block is used to manage the flash and also holds RedBoot fconfig values. The remaining blocks can be used by application code.
Serial support is through the
CYGPKG_IO_SERIAL_GENERIC_16X5X generic driver
package which is modified by the
CYGPKG_IO_SERIAL_ARM_ALTERA_HPS driver package
for the HPS. These packages can support all the serial
devices on the HPS. However, this board only has UART0
connected to an external connector which this HAL indicates by
interface. This serial channel is used by RedBoot for
communication with the host. If this device is needed by the
application, either directly or via the serial driver, then it
cannot also be used for RedBoot communication. Another
communication channel such as Ethernet should be used instead. The
serial driver package is loaded automatically when configuring for
the cyclone5-sx target.
There is an Ethernet driver
CYGPKG_DEVS_ETH_DWC_GMAC for the on-chip
Ethernet device. A separate package,
CYGPKG_DEVS_ETH_CYCLONE5_SX configures this
generic driver to the hardware. This driver is also loaded
automatically when configuring for the
There is a watchdog driver
driver is also loaded automatically when configuring for the
There is a driver for the DS1339C real-time clock (RTC) at
which it is compatible. This driver is also loaded automatically
when configuring for the target and when I2C support is included.
The platform HAL provides definitions to enable access to flash
devices on the SPI bus. The HAL enables the QSPI driver
CYGPKG_DEVS_FLASH_QSPI) which in turn provides
the underlying implementation for access to the Micron N25Q00AA
SPI NOR flash. The QSPI support integrates with the
CYGPKG_DEVS_FLASH_SPI_M25PXX package. These
packages are automatically loaded when configuring for the
target. This driver is capable of supporting the JFFS2 filesystem,
although at reduced performance compared with a parallel flash
In general, devices (Caches, GPIO, UARTs) are initialized only as far as is necessary for eCos to run. Other devices (RTC, SPI, MMC/SD etc.) are not touched unless the appropriate driver is loaded, although in some cases, the HAL boot sequence will set up the appropriate power control and pin multiplexing 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.4.5, arm-eabi-gdb version 7.2, and binutils version 2.20.