User`s manual

Rabbit 4000 Designer’s Handbook rabbit.com 37
6. The Rabbit BIOS
When Dynamic C compiles a users program to a target board, the BIOS (Basic Input/Output System) is
compiled first as an integral part of the users program. The BIOS comprises files that contain the code
needed by the user program to interface with Dynamic C and the Rabbit hardware. The BIOS may also
contain a software interface to the users particular hardware. Certain drivers in the Dynamic C library
suite require BIOS routines to perform tasks that are hardware-dependent.
The BIOS also:
Takes care of microprocessor system initialization, such as the setup of memory.
Provides the communications services required by Dynamic C for downloading code and performing
debugging services such as setting breakpoints or examining data variables.
Provides flash drivers.
The file RabbitBIOS.c is a wrapper that permits a choice of which BIOS to compile. A more modular
design has been implemented by moving many of the configuration macros to separate configuration
libraries. The main BIOS file (Stdbios.c) and the multiple configuration libraries are located in
LIB\Rabbit4000\BIOSLIB.
Dynamic C 10.21 introduces a change in the BIOS files: Origin declarations have been redesigned. One of
the most dramatic results of the redesign is the ability to define relative relationships between origins dur-
ing the setup of memory. This eliminates many of the macro definitions that were necessary before.
The supplied BIOS allows Dynamic C to boot up on any Rabbit-based system that follows the basic design
rules needed to support Dynamic C. The BIOS requires either a 128 KB RAM or both a flash device and a
32 KB or larger RAM for it to be possible to compile and run Dynamic C programs. If the user uses a flash
memory from the list of flash memories that are already supported by the BIOS, the task will be simpli-
fied. A list of supported flash devices is listed in Technical Note 226, available online at:
rabbit.com/docs/app_tech_notes.shtml
If the flash device is not already supported, the user will have to write a driver to perform the write opera-
tion on the flash memory. This is not difficult provided that a system with 128 KB of RAM and the flash
memory to be used are available for testing.
An existing BIOS can be used as a skeleton to create a new BIOS. Frequently it will only be necessary to
change #define statements at the beginning of the file. In this case it is unnecessary for the designer to
understand or work out the details of the memory setup and other processor initialization tasks. Refer to
the Dynamic C Users Manual for details on creating a user-defined BIOS.