Setup — Preparing the Malta board for eCos Development
In a typical development environment, the Malta board boots from flash into the RedBoot ROM monitor. eCos applications are configured for RAM startup and then downloaded and run on the board via the debugger mipsisa32-elf-gdb. Preparing the board therefore usually involves programming a suitable RedBoot image into flash memory.
The following RedBoot configurations are supported:
|RAM||RedBoot running from RAM, usually loaded by another version of RedBoot|
|ROM||RedBoot running from ROM|
For serial communications, all versions run with 8 bits, no parity, and 1 stop bit at 38400 baud. RedBoot also supports ethernet communication and flash management.
Installing RedBoot is a matter of downloading a new binary image and overwriting the existing Boot monitor ROM image.
RedBoot is installed using the code download facility built into the Malta board. See the Malta User manual for details.
Quick Download Instructions
Here are quick start instructions for downloading the prebuilt RedBoot image.
- Locate the prebuilt files in the bin directory:
Make sure switch S5-1 is ON. Reset the board and verify that
the LED display reads
- Make sure your parallel port is connected between the 1284 port of the Malta board and the parallel port of your host system.
deleteall.flfile to the parallel port to erase previous images:
cat deleteall.fl >/dev/lp0
When this is complete, the LED display should read
Send the RedBoot image to the board:
cat redboot_ROM.fl >/dev/lp0
When this is complete, the LED display should show the last address programmed. This will be something like:
- Connect a serial cable between one of the Malta board serial ports and a serial port on your host. Use a terminal emulator to monitor the serial port (HyperTerminal on Windows or minicom on Linux).
Change switch S5-1 to OFF and reset the board. The LED display should read
RedBootand something similar to the following should be output on the serial port:
No devices on IDE controller 0 No devices on IDE controller 1 ... waiting for BOOTP information Ethernet eth0: MAC address 00:d0:a0:00:01:cb IP: 10.0.0.203/255.255.255.0, Gateway: 10.0.0.3 Default server: 10.0.0.1, DNS server IP: 10.0.0.1 RedBoot(tm) bootstrap and debug environment [ROM] Non-certified release, version UNKNOWN - built 15:01:37, Oct 20 2004 Platform: Malta (MIPS32 4Kc) Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. Copyright (C) 2003, 2004, eCosCentric Limited RAM: 0x80000400-0x82000000, [0x8000cc40-0x81ed1000] available FLASH: 0xbe000000 - 0xbe400000, 32 blocks of 0x00020000 bytes each. RedBoot>
- Run the RedBoot fis init and fconfig commands to initialize the flash.
Malta Download Format
In order to download RedBoot to the Malta board, it must be converted to the Malta download format.
The Atlas/Malta Developer's Kit CD contains an srecconv.pl utility which requires Perl. This utility is part
on the Dev Kit CD. The path in the expanded tarball is
yamon/bin/tools. To use
srecconv to convert the S-record file:
cp redboot_ROM.srec redboot_ROM.rec$
srecconv.pl -ES L -A 29 redboot_ROM
The resulting file is named
Should it prove necessary to rebuild a RedBoot binary, this is done most conveniently at the command line. The steps needed to rebuild the the ROM version of RedBoot for the Malta are:
$ mkdir redboot_malta_rom $ cd redboot_malta_rom $ ecosconfig new malta redboot $ ecosconfig import $ECOS_REPOSITORY/hal/mips/malta/current/misc/redboot_ROM.ecm $ ecosconfig resolve $ ecosconfig tree $ make
At the end of the build the
install/bin subdirectory should contain
redboot.srec. This can then be converted
into the download format by using the
srecconv program as described above.
The exec command which allows the loading and execution of Linux kernels, is supported for this architecture. The exec parameters used for MIPS boards are:
- Location to store command line and environment passed to kernel
- Wait time in seconds before starting kernel
- Parameters passed to kernel
- Kernel entry point, defaulting to the entry point of the last image loaded
Linux kernels on MIPS platforms expect the entry point to be called with arguments in the registers equivalent to a C call with prototype:
void Linux(int argc, char **argv, char **envp);
RedBoot will place the appropriate data at the offset specified by the
-b parameter, or by default at address 0x80080000, and will set the
arguments accordingly when calling into the kernel.
The default entry point, if no image with explicit entry point has been loaded and none is specified, is 0x80000750.
The Malta platform HAL does not affect the implementation of other parts of the eCos HAL specification. The MIPS32 variant HAL, and the MIPS architectural HAL documentation should be consulted for further details.
|2022-09-14||eCosPro Non-Commercial Public License|