eCos Support for the CSB337 Board — Overview


This document covers the Cogent CSB337 single board computer based on the Atmel AT91RM9200. The CSB337 contains the AT91RM9200 processor, 32Mb of SDRAM, 8MB of flash memory, an Intel LXT971 PHY and external connections for two serial channels, ethernet and the various other peripherals supported by the AT91RM9200. The CSB337 is usually plugged into a breakout board such as a Cogent CSB300 or CSB300CF.

For typical eCos development, a RedBoot image is programmed into the flash memory, and the board will boot 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.

Supported Hardware

The flash memory consists of 64 blocks of 128k bytes each. In a typical setup, the first flash block is used for the ROMRAM RedBoot image. The topmost block is used to manage the flash and hold RedBoot fconfig values. The remaining 60 blocks between 0x60020000 and 0x607DFFFF can be used by application code.

There is a serial driver CYGPKG_IO_SERIAL_ARM_AT91 which supports both the Debug Unit and USART serial devices. These devices can be used by RedBoot for communication with the host. If either of these devices 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 CSB337 target.

There is an ethernet driver CYGPKG_DEVS_ETH_ARM_AT91RM9200 for the on-chip ethernet device. A second package CYGPKG_DEVS_ETH_ARM_CSB337 is responsible for configuring this generic driver to the CSB337 hardware. These drivers are also loaded automatically when configuring for the CSB337 target.

The on-chip TWI device is not supported. Instead there is a bit-banged I²C bus using GPIO pins PA25 and PA26, with one attached device: a DS1307 battery-backed wallclock. The bus is supported by the CYGPKG_IO_I2C package and some platform-specific support. The platform HAL provides a cyg_i2c_bus structure hal_csb337_i2c_bus, and one cyg_i2c_device structure cyg_i2c_wallclock_ds1307. The wallclock is used mainly by the DS1307 device driver, but it also provides 56 bytes of non-volatile storage which can be used by the application. Any unused I²C functionality will be eliminated at link-time.

CYGPKG_DEVICES_WALLCLOCK_DALLAS_DS1307 provides support for the DS1307 clock. This will be inactive unless the generic wallclock support CYGPKG_IO_WALLCLOCK is loaded. Some templates load this automatically, otherwise it must be loaded explicitly. The wallclock is not normally accessed directly. Instead it provides support for the standard C library time-related routines such as time and asctime, and can be updated by an eCos-specific function cyg_libc_time_settime.

eCos manages the on-chip interrupt controller. Timer counter 0 is used to implement the eCos system clock and the microsecond delay function. Other on-chip devices (Caches, PIO, UARTs, EMAC) are initialized only as far as is necessary for eCos to run. Other devices (SPI, MCI etc.) are not touched.


The CSB337 port is intended to work with GNU tools configured for an arm-eabi target. The original port was undertaken using arm-elf-gcc version 3.2.1, arm-elf-gdb version 5.3, and binutils version 2.13.1.