Memory Configuration Files. freescale ColdFire v6.0
Annonce
Annonce
CF.book Page 211 Friday, July 8, 2005 8:59 AM
B
Memory Configuration Files
In your overall memory map there can be gaps or holes between physical memory devices. If the debugger tries a read or write to an address in such a hole, the system would issue an error message, and debugging might not even be possible.
To prevent such developments, use a memory configuration file (MCF). An MCF identifies valid memory address ranges to the debugger, and even specifies valid access types.
A sample memory configuration file is
\E68K_Support\Initialization_Files\MCF5485EVB.mem
of the
CodeWarrior installation directory.
This appendix consists of these sections:
Command Syntax
The syntax rules for commands in a memory configuration file are:
• The system ignores space characters and tabs.
• The system ignores character case in commands.
• Numbers may be in hexadecimal, decimal, or octal format:
– Hexadecimal values must start with 0x, as in 0x00002222, 0xA, or
0xCAfeBeaD
.
– Decimal values must start with a numeral 1 through 9, as in 7, 12, 526, or
823643
.
– Octal values must start with a zero, as in 0123, or 0456.
• Comments can be in standard C or C++ format.
ColdFire Architectures v6.0 - Targeting Manual 211
CF.book Page 212 Friday, July 8, 2005 8:59 AM
Memory Configuration Files
Command Explanations
Command Explanations
This section explains the commands you can use in a memory configuration file:
range
Specifies a memory range for reading or writing.
range <loAddr> <hiAddr> <sizeCode> <access>
Parameters
loAddr
Starting address of memory range.
hiAddr
Ending address of memory range.
sizeCode
Size, in bytes, for memory accesses by the debug monitor or emulator.
access
Read
, Write, or ReadWrite.
Example
These range commands specify three adjacent ranges: the first read-only, with 4byte access; the second write-only, with 2-byte access; and the third read/write, with 1-byte access.
range 0xFF000000 0xFF0000FF 4 Read range 0xFF000100 0xFF0001FF 2 Write range 0xFF000200 0xFFFFFFFF 1 ReadWrite
212 ColdFire Architectures v6.0 - Targeting Manual
CF.book Page 213 Friday, July 8, 2005 8:59 AM
Memory Configuration Files
Command Explanations
reserved
Reserves a range of memory, preventing reads or writes.
reserved <loAddr> <hiAddr>
Parameters
loAddr
Starting address of reserved memory range.
hiAddr
Ending address of reserved memory range.
Remarks
If the debugger tries to write to any address in the reserved range, no write takes place.
If the debugger tries to read from any address in the reserved range, the system fills the memory buffer with the reserved character. (Command reservedchar defines this reserved character.)
Example
This command prevents reads or writes in the range 0xFF00024 — 0xFF00002F: reserved 0xFF000024 0xFF00002F
reservedchar
Specifies a reserved character for the memory configuration file.
reservedchar <char>
Parameter
char
Any one-byte character.
Remarks
If an inappropriate read occurs, the debugger fills the memory buffer with this reserved character.
ColdFire Architectures v6.0 - Targeting Manual 213
CF.book Page 214 Friday, July 8, 2005 8:59 AM
Memory Configuration Files
Command Explanations
Example
reservedchar 0xBA
214 ColdFire Architectures v6.0 - Targeting Manual
Download
Annonce