User`s manual
40 rabbit.com The Rabbit BIOS
6.3 Internally-Defined Macros
Some macros used in the BIOS are defined internally by Dynamic C before the BIOS is compiled. They
are defined using tests done in the bootstrap loading, or by reading variables set in the GUI or set by the
CLC (command line compiler).
See the Dynamic C User’s Manual for other internally-defined macros.
6.4 Modifying the BIOS
The BIOS that is supplied with Dynamic C may be modified or replaced. Prudence demands that any
changes made to this important piece of software be done one step at a time in order to more easily detect
and isolate any problems that may arise.
RabbitBios.c is still used, but is more of a wrapper file that brings in some configuration and defini-
tion files, checks a few error conditions and then, before starting compilation of the application, selects
which BIOS file to activate. The default BIOS is \Lib\Rabbit4000\BIOSLIB\StdBios.c.
Table 6-1 Partial List of Compiler-Defined Macros
Macro Name Macro Description
_BOARD_TYPE_
This is read from the System ID block or defaulted to 0x100
(the BL1810 JackRabbit board) if no System ID block is
present. This can be used for conditional compilation based
on board type.
CC_VER
Gives the Dynamic C version in hex, i.e., version 10.21 is
0x0A21.
_CPU_ID_
This macro identifies the CPU type, e.g., R4000 is the
Rabbit 4000 microprocessor.
_FLASH_, _RAM_
Used for conditional compilation of the BIOS to distinguish
between compiling to RAM and compiling to flash. These
are set in the Compiler tab in the Options | Project Options
dialog.
_RAM_SIZE_, _FLASH_SIZE_
Used to set the MMU registers and code and data sizes
available to the compiler. The values of these macros
represent the number of 0x1000 blocks of memory
available.
__SEPARATE_INST_DATA__
Flag for identifying whether separate I&D space is enabled
or disabled.
FLASH_COMPILE, RAM_COMPILE,
FAST_RAM_COMPILE
Used to determine compile mode in code.