SPRU513Z August 2001 – October 2023 SM320F28335-EP
The ROMS directive in #STDZ0791039 shows how 16K bytes of 16-bit memory could be partitioned for two 8K-byte 8-bit EPROMs. Figure 12-5 illustrates the input and output files.
infile.out
--image
--memwidth 16
ROMS
{
EPROM1: org = 0x00004000, len = 0x2000, romwidth = 8
files = { rom4000.b0, rom4000.b1}
EPROM2: org = 0x00006000, len = 0x2000, romwidth = 8,
fill = 0xFF00FF00,
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. #STDZ0794650 is a segment of the map file resulting from the example in #STDZ0791039.
-----------------------------------------------------
00004000..00005fff Page=0 Width=8 "EPROM1"
-----------------------------------------------------
OUTPUT FILES: rom4000.b0 [b0..b7]
rom4000.b1 [b8..b15]
CONTENTS: 00004000..0000487f .text
00004880..00005b7f FILL = 00000000
00005b80..00005fff .data
-----------------------------------------------------
00006000..00007fff Page=0 Width=8 "EPROM2"
-----------------------------------------------------
OUTPUT FILES: rom6000.b0 [b0..b7]
rom6000.b1 [b8..b15]
CONTENTS: 00006000..0000633f .data
00006340..000066ff FILL = ff00ff00
00006700..00007c7f .table
00007c80..00007fff FILL = ff00ff00
EPROM1 defines the address range from 0x00004000 through 0x00005FFF with the following sections:
This section ... | Has this range ... | |
---|---|---|
.text | 0x00004000 through 0x0000487F | |
.data | 0x00005B80 through 0x00005FFF |
The rest of the range is filled with 0h (the default fill value), converted into two output files:
EPROM2 defines the address range from 0x00006000 through 0x00007FFF with the following sections:
This section ... | Has this range ... | |
---|---|---|
.data | 0x00006000 through 0x0000633F | |
.table | 0x00006700 through 0x00007C7F |
The rest of the range is filled with 0xFF0 (from the specified fill value). The data from this range is converted into two output files: