eCos Support for the Atmel AT91SAM9263 Evaluation Kit — Overview
This document covers the configuration and usage of eCos and RedBoot on the Atmel AT91SAM9263 Evaluation Kit. The AT91SAM9263 Evaluation Kit contains the AT91SAM9263 microprocessor, 64Mbytes of SDRAM, 4MBytes of PSRAM, 256Mbytes of NAND flash memory, an Atmel serial EEPROM, a Davicom DM9161A PHY, one SD/MMC/DataFlash socket and a SD/MMC socket, a DAC, external connections for two serial channels (one debug channel and one flow controlled), ethernet, USB host/device, and the various other peripherals supported by the AT91SAM9263. eCos support for the many devices and peripherals on the boards and the AT91SAM9263 is described below.
For typical eCos development, a RedBoot image is programmed onto a dataflash card in the SD/MMC/DataFlash socket, 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.
This documentation is expected to be read in conjunction with the SAM9 processor HAL documentation and further device support and subsystems are described and documented there.
Booting is from a DataFlash card in the SD/MMC/DataFlash socket. In a typical setup, the first 32K bytes are reserved for the second-level bootstrap, AT91Bootstrap. The following 164736 bytes are reserved for the use of the ROM RedBoot image (The odd size aligns the end of the RedBoot area to a block boundary). The topmost block is used to manage the flash and the next block down holds RedBoot fconfig values. The remaining blocks can be used by application code.
There is a serial driver
which supports both the Debug Unit and USART serial devices. The debug
serial port at J14 and flow controlled
port at J18 (connected to USART channel 0) can be used by RedBoot for
communication with the host. If any 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 AT91SAM9263EK target.
There is an ethernet driver
CYGPKG_DEVS_ETH_ARM_AT91 for the on-chip ethernet
device. The platform HAL package is responsible for configuring this
generic driver to the hardware. This driver is also loaded
automatically when configuring for the AT91SAM9263EK board.
There is a watchdog driver
CYGPKG_DEVICES_WATCHDOG_ARM_AT91WDTC. This driver is
also loaded automatically when configuring for the board.
There is a driver for the on-chip real-time timer controller (RTTC) at
CYGPKG_DEVICES_WALLCLOCK_ARM_AT91RTTC. This driver is
also loaded automatically when configuring for the target.
The SAM9 processor HAL contains a driver for the Two-Wire Interface (TWI) controller on the AT91SAM9263. This type of bus is also known as I²C®. Further documentation may be found in the SAM9 processor HAL documentation.
There is a driver for the MultiMedia Card
Interface (MCI) at
This driver is loaded automatically when configuring
for the SAM9263-EK target and allows use of MMC and Secure Digital
(SD) flash storage cards within eCos, exported as block
devices. Further documentation may be found within that package. The
driver can be configured to use either the
SD/MMC/DataFlash socket at J19 or the SD/MMC socket at J10. By default
it uses J10, leaving J9 for the bootstrap Dataflash.
The platform HAL provides definitions
to allow access to devices on the SPI bus. The HAL provides
information to the more general AT91 SPI driver
CYGPKG_DEVS_SPI_ARM_AT91) which in turn provides
the underlying implementation for the SPI API layer in the
CYGPKG_IO_SPI package. All these packages are
automatically loaded when configuring for the board.
Furthermore, the platform HAL package contains support for SPI dataflash
cards. The HAL support integrates with the
CYGPKG_DEVS_FLASH_ATMEL_DATAFLASH package as well as
the above SPI packages. That package is automatically loaded when
configuring for the target. Dataflash media is then accessed
as a Flash device, using the Flash I/O API within the
CYGPKG_IO_FLASH package, if that package is loaded
in the configuration.
It is also possible to configure the HAL to access MMC cards in SPI mode, instead of using the MCI interface.
The on-board NAND interface is supported. At the time of writing, this has been tested with the Micron MT29F2G08 part fitted to kit BOM revision 007 and later.
Revision 007 of this board has a known issue with accessing the NAND flash device. Refer to section 1.5, "NAND Flash Access Issue", of the Rev.B User Guide (Atmel document no. 6341) for more details. During testing with a rev 007 board, eCosCentric found it necessary to tie the CS line as per that document in order to ensure reliable access to the device.
In general, devices (Caches, PIO, UARTs, EMAC) are initialized only as far as is necessary for eCos to run. Other devices (RTC, I²C, SPI, MCI etc.) are not touched unless the appropriate driver is loaded, although in some cases, the HAL boot sequence will set up the appropriate PIO configuration.
The AT91SAM9263-EK support is intended to work with GNU tools configured for an arm-eabi target. The original port was undertaken using arm-elf-gcc version 3.4.4, arm-elf-gdb version 6.3, and binutils version 2.15.
|2018-07-06||eCosPro Non-Commercial Public License|