Configuration — Platform-specific Configuration Options
The SDK7780 platform HAL package is loaded automatically when eCos is
configured for an
sdk7780 target. It should
never be necessary to load this package explicitly. Unloading the
package should only happen as a side effect of switching target
The SDK7780 platform HAL package supports two separate startup types:
- This is the startup type which is normally used during application development. The board has RedBoot programmed into flash at location 0x80000000/0xA0000000 and boots from that location. sh-elf-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 location 0x80000000/0xA0000000. The application will be self-contained with no dependencies on services provided by other software. eCos startup code will perform all necessary hardware initialization.
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 serial port COM 0 will be claimed for HAL diagnostics.
The SDK7780 board contains 128M bytes of Flash, in two banks of two Spansion S29GL256M parts in parallel. Each part consists of 512 blocks of 64KB each, but since two parts are used in parallel they are viewed as 512 blocks of 128KB each. Flash bank A is not touched by eCos, so effectively the board is viewed as having a single 64MB bank of flash.
These are AMD 29xxxxx compatible parts, and as such the
CYGPKG_DEVS_FLASH_AMD_AM29XXXXX_V2 package contains
all the code necessary to support these parts. The SDK7780 platform
HAL contains definitions that customize the driver to the SDK7780
The SDK7780 board contains an SMSC LAN91C111 ethernet device.
CYGPKG_DEVS_ETH_SMSC_LAN91CXX package contains all the
code necessary to support this part and the
CYGPKG_DEVS_ETH_SH_SDK7780 package contains
definitions that customize the driver to the SDK7780 board.
The ethernet will automatically auto-negotiate 10Mbps or 100Mbps operation with its link peer, as well as full duplex or half duplex mode.
The driver usually reads the MAC address (ESA) from the EEPROM connected to the MAC. Alternatively an address can be set in the CDL configuration in the component CYGSEM_DEVS_ETH_SH_SDK7780_ETH0_SET_ESA within the SDK7780 ethernet driver; or an address can be set in the Flash configuration of RedBoot using the fconfig command. If both are set, the Flash configuration is used in preference.
The SDK7780 board is fitted with four 3V PCI slots, which are accessed
via the PCIC funtional unit on the SH7780. eCos supports PCI devices
inserted in these slots and if the PCI library is selected in the eCos
configuration, a driver will usually call
cyg_pci_init() which will automatically configure
memory and I/O base address registers, as well as any interrupts the
The CPU is able to access the PCI memory space through the memory window at 0xb0000000, and the PCI I/O space through the memory window at 0xFE200000. PCI bus master devices may access system memory (usually for DMA), at windows starting at address 0x0 in both memory and I/O PCI spaces.
Note that the PCI INTD line is on a pin shared with the CTS line for SCIF0. If this interrupt is to be used, SW4-8 must be set to OFF.
SCIF Serial Driver
The SDK7780 board uses the SH7780 internal SCIF serial support Two
serial ports are available: SCIF0 which is mapped to virtual vector
channel 0 in the HAL diagnostic driver or
/dev/ser0" in the interrupt-driven driver; and
SCIF1 which is mapped to virtual vector channel 1 and
/dev/ser1". Only SCIF0 supports modem control
signals such as those used for hardware flow control, and SW4-8 must
be set to ON for CTS to be routed to the DB9 connector.
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 SDK7780 board uses the SH7780 internal RTC support. The
CYGPKG_DEVICES_WALLCLOCK_SH3 package contains all the
code necessary to support this device. This driver is not active until the
generic wallclock device support package,
CYGPKG_IO_WALLCLOCK, is included in the configuration.
The SDK7780 board uses the SH7780 internal watchdog support. The
CYGPKG_DEVICES_WATCHDOG_SH_SH4A package contains all the
code necessary to support this device. Within that package the
configuration option controls the watchdog timeout, and by default will
force a reset of the board upon timeout. This driver is not active until the
generic watchdog device support package,
CYGPKG_IO_WATCHDOG, is included in the configuration.
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 are two flags specific to this port:
The sh-elf-gcc compiler supports many
variants of the SH architecture, from the SH2 onwards.
-moption should be used to select the specific variant in use, and with current tools
-m4is the correct option for the SH7780.
|2018-06-19||eCosPro Non-Commercial Public License|