📄 lab11a_c5409_ovly0.mem
字号:
/* generic TMS320C5409 with OVLY = 0
Use this description if the board selection is not yet known,
or as a starting point for creating a custom board description
When making memory alterations:
1. Take care to declare Read/Write/eXecute/Initializable (RWXI)
properties correctly! THIS IS *REAL* IMPORTANT!
2. The visual linker defines "Initializable" as persistent memory
(i.e. FLASH, ROM). Use "Write" only if you keep variables
(as opposed to code & constants) in the region at run-time.
3. Never give a region eXecute capabilities if it is declared
in a data space. Regions that may hold code MUST be declared
in code space. They may be shared with a data space
using the SHARED_ADDRESSES directive of the .mem file.
4. Currently, there is no visual interface to create a
SHARED_ADDRESSES directive. This must be done by hand in the
.mem file using a text editor.
If you start with an existing .mem file, you probably do not
need to alter the SHARED_ADDRESSES directive unless you have new
devices that swap in and out of memory (usually at boot time).
5. If writing the .mem file by hand, declare the primary code space
1st, the primary data space 2nd and the primary IO space 3rd.
Others may follow in any order.
6. Its best if SPACE names contain one of the following substrings:
{"prog", "code", "data", "io"}. The visual linker looks for
these strings (case-insensitive) to help determine semantics for
the SPACE.
7. An annoying warning is avoided if read-only region names contain
"rom" or "ROM"
8. An annoying warning is avoided if non-readable non-writeable
(not allocatable) region names contain "reserved" or "RESERVED"
*/
MEMORY C5409_ovly0
(FAMILY = c54x) {
/* MP=1, OVLY=0 */
SPACE program_memory PAGE 0
(OVERLAY = program_memory,
SWAP_IN = "DEBUG_Global(""old_PMST"") = PMST;"
"PMST = (PMST | 0x40) & 0xFFDF; /* MP=1 OVLY=0 */",
SWAP_OUT = "PMST = DEBUG_Global(""old_PMST"");",
IS_SWAPPED_IN= "((PMST & 0x40) == 0x40) && /* MP ==1 */"
"((PMST & 0x20) == 0x00) /* OVLY==0 */") :
EPROM (RWXI): o= 0xF000 e= 0xFF7F /* offchip RAM */
vectors(RWX ): o= 0xFF80 e= 0xFFFF /* external interrupt vectors */
/* DROM=0 */
SPACE data_memory PAGE 1
(OVERLAY = data_memory,
SWAP_IN = "DEBUG_Global(""old_PMST"" ) = PMST;"
"PMST = PMST & 0xFFF7; /* DROM=0 */",
SWAP_OUT = "PMST = DEBUG_Global(""old_PMST"" );",
IS_SWAPPED_IN= "((PMST & 0x08) == 0x00) /* DROM==0 */") :
regs (RW ): o= 0x0000 e= 0x005F /* Memory-mapped registers */
scratch(RW ): o= 0x0060 e= 0x007F /* Scratch-pad DARAM */
/* On-chip Dual Access RAM, divided into 4 8K blocks: */
/* 80-1FFF, 2000-3FFF, 4000-5FFF, 6000-7FFF */
DARAM (RW ): o= 0x0080 e= 0x7FFF
SPACE IO_memory PAGE 2 :
}
/* Table of address ranges vs. sets of spaces that share them. */
/* For each entry in the table, */
/* if a region's parent appears in the space set */
/* and the region is fully contained in the address range, */
/* then the region is shared with the other spaces of the set. */
SHARED_ADDRESSES C5409_ovly0 {
o= 0x00000 e= 0x00BFFF {program_memory}
o= 0x10000 e= 0x7FFFFF {program_memory}
o= 0x00000 e= 0x00BFFF {data_memory}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -