基于32位ColdFire构建嵌入式系统书本原程序.rar
源代码在线查看: linker.lcf
MEMORY
{
flash (RX) : ORIGIN = 0x00000000, LENGTH = 0x00002000 /*8K */
fdata (RX) : ORIGIN = 0x00002000, LENGTH = 0x0003E000 /*248K*/
tdata (RX) : ORIGIN = 0x00007000, LENGTH = 0x0002E000 /*248K*/
vectorram(RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000400 /*1K */
sram (RWX) : ORIGIN = 0x20000400, LENGTH = 0x00007C00 /*31K */
ipsbar (RWX) : ORIGIN = 0x40000000, LENGTH = 0x0
}
SECTIONS
{
.ipsbar : {} > ipsbar
.fdata : {} > fdata
.tdata :
{
} > tdata
.flash :
{
. = ALIGN(0x10);
vectors.s (.text)
. = ALIGN(0x10);
*(.text)
. = ALIGN(0x10);
*(.rodata)
___DATA_ROM = .;
} > flash
.data : AT(___DATA_ROM)
{
___DATA_RAM = . ;
*(.exception)
. = ALIGN(0x10);
*(.data)
. = ALIGN (0x10);
___DATA_END = .;
*(.sdata)
. = ALIGN (0x10);
} > sram
.bss :
{
. = ALIGN(0x10);
__START_SBSS = .;
*(.sbss)
*(SCOMMON)
__END_SBSS = .;
. = ALIGN(0x10);
__START_BSS = .;
*(.bss)
*(COMMON)
__END_BSS = .;
___BSS_START = __START_SBSS;
___BSS_END = __END_BSS;
. = ALIGN(0x10);
} >> sram
___FLASH = ADDR(.flash);
___FLASH_SIZE = 0x00040000;
___VECTOR_RAM = 0x20000000;
___SRAM = 0x20000000;
___SRAM_SIZE = 0x00008000;
___IPSBAR = ADDR(.ipsbar);
___SP_INIT = ___SRAM + ___SRAM_SIZE;
__SP_INIT = ___SP_INIT;
}