Creating a Linker Command File
Linker Command Files (.cmd)
The linker concatenates each section from all input files, allocating memory to each section based
on its length and location as specified by the MEMORY and SECTIONS commands in the linker
command file.
Linking
Linking
Linker
Linker
Link.
Link.
cmd
cmd
.map
.map
.
.
obj
obj
.out
.out
Memory description
How to place s/w into h/w
Memory description
Memory description
How to place s/w into h/w
How to place s/w into h/w
Memory-Map Description
Describe the memory configuration of your target system to the linker. Without this specification,
the linker might place code or data into memory that doesn’t exist.
The format is: Name: origin = 0x????, length = 0x????
For example, if you placed a 2K EPROM starting at memory location zero, it would read:
MEMORY
{
EPROM: origin = 0x0000 , length = 0x0800
}
You define each memory segment using the above format. If you added a RAM and an ABT646
transceiver, it might look like:
MEMORY
{
EPROM: origin = 0x0000 , length = 0x0800
RAM: origin = 0x1000 , length = 0x02000
ABT646: origin = 0x8000 , length = 0x00001
}
2 - 12 C28x - Programming Development Environment