SLAU131Y October 2004 – June 2021
The ROMS directive in A ROMS Directive Example shows how 16K bytes of 16-bit memory could be partitioned for two 8K-byte 8-bit EPROMs. Figure 13-5 illustrates the input and output files.
infile.out
--image
--memwidth 16
ROMS
{
EPROM1: org = 0x4000, len = 0x2000, romwidth = 8
files = { rom4000.b0, rom4000.b1}
EPROM2: org = 0x6000, len = 0x2000, romwidth = 8,
fill = 0xFF00,
files = { rom6000.b0, rom6000.b1}
}
The map file (specified with the --map option) is advantageous when you use the ROMS directive with multiple ranges. The map file shows each range, its parameters, names of associated output files, and a list of contents (section names and fill values) broken down by address. Map File Output From Showing Memory Ranges is a segment of the map file resulting from the example in A ROMS Directive Example.
-----------------------------------------------------
4000..5fff Page=0 Width=8 "EPROM1"
-----------------------------------------------------
OUTPUT FILES: rom4000.b0 [b0..b7]
rom4000.b1 [b8..b15]
CONTENTS: 4000..487f .text
4880..5b7f FILL = 0000
5b80..5fff .data
-----------------------------------------------------
6000..7fff Page=0 Width=8 "EPROM2"
-----------------------------------------------------
OUTPUT FILES: rom6000.b0 [b0..b7]
rom6000.b1 [b8..b15]
CONTENTS: 6000..633f .data
6340..66ff FILL = ff00
6700..7c7f .table
7c80..7fff FILL = ff00
EPROM1 defines the address range from 0x4000 through 0x5FFF with the following sections:
This section ... | Has this range ... | |
---|---|---|
.text | 0x4000 through 0x487F | |
.data | 0x5B80 through 0x5FFF |
The rest of the range is filled with 0h (the default fill value), converted into two output files:
EPROM2 defines the address range from 0x6000 through 0x7FFF with the following sections:
This section ... | Has this range ... | |
---|---|---|
.data | 0x6000 through 0x633F | |
.table | 0x6700 through 0x7C7F |
The rest of the range is filled with 0xFF00 (from the specified fill value). The data from this range is converted into two output files: