
32-6
How to How to make ROM
Programmer’s Manual
Personal Portable System Manager
Programmer’s Manual
32-3
32.1.2
Chip Selects
For the M68328ADS development board, Chip-Select group A is used for ROM
and Chip-Select group B is used for RAM. Please refer to the MC68328
Integrated Processor User’s Manual, MC68328UM/AD, for details on chip select
programming.
32.1.3
Peripheral Devices
Initialization of the peripherals such as default interrupt vector, watchdog and LCD
controller. Please refer to the MC68328 Integrated Processor User’s Manual,
MC68328UM/AD, for details on chip select programming.
32.2
Linker Supplications File for ROM
The Linker Supplications File for ROM is different to that for RAM system. The
main difference being that some of the defined regions need to go into ROM
address, and some regions need to go into RAM address. In general, regions that
are Read-Only, such as constants, strings and code, go into ROM area; while
Read/Write regions, such as ram, stack and heap space go into RAM area.
The listing below shows an example of such SPC file.
Example 30-1 Linker Specification File Example for ROM
partition { overlay {
region {} rom_reset[addr=0x0];/* reset vector in ROM */
region {} rom_code[addr=0x400];/* start of bootstrap code */
region {} code[addr=0x1000];
region {} const;
region {} string;
DATA = $;
/* start of application code */
/* constant data */
/* constant strings */
/* pre-defined constants for
initialized variables */
/* LCD display width */
/* LCD display height */
/* LCD virtual width */
/* LCD virtual height */
/* system UART receive buffer size(in #bytes) */
LCDPHYSWIDTH = 320;
LCDPHYSHEIGHT = 240;
LCDVIRTWIDTH = 640;
LCDVIRTHEIGHT = 480;
UARTRCVBUF = 256;
} area2;
} ROM[addr=0x400000,size=0x100000];/* 1M byte ROM */
partition { overlay {
region {} data[addr=0x400];
region {} ram[roundsize=4];
region {} malloc[size=0x80000];/* malloc space */
region {} stack[size=0x4000];/* stack */
STKTOP = $;
} area1; } RAM[addr=0x0, size=0x100000];/* 1M byte RAM */
/* initialized on reset */
/* zeroed on reset */
/* SP reset value */
In this example, a system that has 1 MByte of ROM space mapped from address
location 0x400000 and 1 MByte of RAM memory mapped from address location
0x0 has the following characteristics:
The ROM area starts at base address 0x400000
The region rom_reset starts from offset 0x0 from the ROM base
address, which is 0x400000
The region rom_code starts from offset 0x400 from the ROM base
address, which is 0x400400
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.