User`s manual
Rabbit 4000 Designer’s Handbook rabbit.com 33
5.3.2.2 Compiling to Flash
For flash compiles, flash is mapped to banks 0 and 1. The address range depends on the size of the physi-
cal address space. For example, a 20-bit address space with 512 KB of flash would mean that flash is
mapped from 0x00000 to 0x7FFFF. Alternatively, a 22-bit address space (1 MB quadrants) with 1 MB of
flash would mean that the flash is mapped to 0x000000 to 0x0FFFFF in bank 0 and is repeated again in
bank 1 from 0x100000 to 0x1FFFFF. RAM is mapped to banks 2 and 3 (address range 0x80000 to
0xFFFFF for 20 bit, and 0x200000 to 0x3FFFFF for 24 bit, respectively).
Figure 5-5 Flash Compile Memory Mapping
The BIOS sets the MMIDR to 0x29 to enable the I&D space for flash compilation. Bit 5 of this register
enables the I&D split, bit 0 enables inversion of A16 for the data space base segment (i.e., the logical
Instruction
Data
Shared
0x00000
0x03000
0x0D000
0x10000
0x13000
Root Code
Xmem Code
Root Constants
Xmem Code
continued
RAM
Root Code
Root Data
Constants
Xmem
Stack
0xD000
0xE000
0xFFFF
0x0000
0x3000
0xCFFF
0xCFFF
0x3000
0x0000
Flash
Root Code
Root Code
0x80000
0x83000
0x8D000
Stack Space/
Watch Code
Root Data
Stacks, xalloc,
etc.
Register Settings
MECR = 0x0
MMIDR = 0x29
SEGSIZE = 0xD3
DATASEG = 0x0
0xFFFFF