Configuration — Platform-specific Configuration Options
The KB920x platform HAL package is loaded automatically when eCos is
configured for a
targets. It should never be
necessary to load this package explicitly. Unloading the package
should only happen as a side effect of switching target hardware.
The KB920x platform HAL package supports four separate startup types:
- This is the startup type which is normally used during application development. The board has RedBoot programmed into flash and boots into that initially. arm-eabi-gdb is then used to load a RAM startup application into memory and debug it. It is assumed that the hardware has already been initialized by RedBoot. By default the application will use the eCos virtual vectors mechanism to obtain certain services from RedBoot, including diagnostic output.
- This startup type can be used for finished applications which will be programmed into flash at physical address 0x10000000. The application will be self-contained with no dependencies on services provided by other software. eCos startup code will perform all necessary hardware initialization.
- This startup type can be used for finished applications which will be programmed into flash at physical location 0x10000000. However, when it starts up the application will first copy itself to RAM at 0x00000000 and then run from there. RAM is generally faster than flash memory, so the program will run more quickly than a ROM-startup application. The application will be self-contained with no dependencies on services provided by other software. eCos startup code will perform all necessary hardware initialization.
This startup type is used for applications that are downloaded via the KwikByte bootloader directly to RAM. The application is loaded into SDRAM at location 0x20000000 and started by executing from that address. The application will be self-contained with no dependencies on services provided by other software. eCos startup code will perform limited hardware initialization since it is assumed that the machine has been set up already by the bootloader.
This configuration is primarily present as a result of the development process. It has some limitations with regard to functionality since the MMU is not enabled and no exception vectors are installed at location zero, hence no interrupts can be handled.
RedBoot and Virtual Vectors
If the application is intended to act as a ROM monitor, providing
services for other applications, then the configuration option
CYGSEM_HAL_ROM_MONITOR should be set. Typically
this option is set only when building RedBoot.
If the application is supposed to make use of services provided by a
ROM monitor, via the eCos virtual vector mechanism, then the
should be set. By default this option is enabled when building for a
RAM startup, disabled otherwise. It can be manually disabled for a RAM
startup, making the application self-contained, as a testing step
before switching to ROM startup.
If the application does not rely on a ROM monitor for diagnostic services then the serial port will be claimed for HAL diagnostics.
The KB9200 and KB9201 boards contain a 2Mb AMD Am29LV017D flash device.
CYGPKG_DEVS_FLASH_AMD_AM29XXXXX package contains all the
code necessary to support this part and the
CYGPKG_DEVS_FLASH_KB9200 package contains
definitions that customize the driver to the KB9200 board.
The KB9202 board contains a 16Mb Intel StrataFLASH 28F128J3 flash device.
CYGPKG_DEVS_FLASH_STRATA_V2 package contains all the
code necessary to support this part and the platform HAL contains
definitions that customize the driver to the KB9202 board.
The KB920x boards use the AT91RM9200's internal EMAC ethernet device attached to
an external Intel LXT971 PHY.
package contains all the code necessary to support this device and the
CYGPKG_DEVS_ETH_ARM_KB9200 package contains
definitions that customize the driver to the KB920x boards.
By default, the system clock interrupts once every 10ms, corresponding
to a 100Hz clock. This can be changed by the configuration option
CYGNUM_HAL_RTC_DENOMINATOR which corresponds to the
clock frequency. Other clock-related settings are recalculated
automatically if the denominator is changed.
The platform HAL defines the default compiler and linker flags for all packages, although it is possible to override these on a per-package basis. Most of the flags used are the same as for other architectures supported by eCos. There is just one flag specific to this port:
The arm-eabi-gcc compiler supports many
variants of the ARM architecture.
-moption should be used to select the specific variant in use, and with current tools
-mcpu=arm9is the correct option for the ARM920T CPU in the AT91RM9200.
- The arm-eabi-gcc compiler will compile C++ and C++ files into the Thumb instruction set when this option is used.
- This option allows programs to be created that mix ARM and Thumb instruction sets. Without this option, some memory can be saved. This option should be used if -mthumb is used.
|2018-07-27||eCosPro Non-Commercial Public License|