2005-11-27 23:55:13 +00:00
|
|
|
OUTPUT_FORMAT(elf32-sh)
|
|
|
|
|
|
|
|
#define DRAMORIG 0x09000000
|
|
|
|
#define DRAMSIZE (MEMORYSIZE * 0x00100000)
|
|
|
|
#define IRAMORIG 0x0f000000
|
|
|
|
#define IRAMSIZE 0x00001000
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
2008-11-07 00:22:15 +00:00
|
|
|
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
|
|
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
2005-11-27 23:55:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
2008-11-07 00:22:15 +00:00
|
|
|
.vectors :
|
|
|
|
{
|
|
|
|
_loadaddress = .;
|
|
|
|
_dramend = . + DRAMSIZE;
|
|
|
|
*(.vectors)
|
|
|
|
. = ALIGN(0x200);
|
|
|
|
} > DRAM
|
2005-11-27 23:55:13 +00:00
|
|
|
|
2008-11-07 00:22:15 +00:00
|
|
|
.text :
|
|
|
|
{
|
|
|
|
*(.start)
|
|
|
|
*(.text)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
2005-11-27 23:55:13 +00:00
|
|
|
|
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(.rodata*)
|
|
|
|
*(.rodata.str1.1)
|
|
|
|
*(.rodata.str1.4)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
2008-11-07 00:22:15 +00:00
|
|
|
.data :
|
|
|
|
{
|
|
|
|
*(.data)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
_iramcopy = .;
|
|
|
|
} > DRAM
|
2005-11-27 23:55:13 +00:00
|
|
|
|
2008-11-07 00:22:15 +00:00
|
|
|
.iram IRAMORIG : AT ( _iramcopy )
|
|
|
|
{
|
|
|
|
_iramstart = .;
|
|
|
|
*(.icode)
|
|
|
|
*(.idata)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
_iramend = .;
|
|
|
|
} > IRAM
|
2005-11-27 23:55:13 +00:00
|
|
|
|
2008-11-07 00:22:15 +00:00
|
|
|
.stack :
|
|
|
|
{
|
|
|
|
_stackbegin = .;
|
|
|
|
*(.stack)
|
2005-11-27 23:55:13 +00:00
|
|
|
. += 0x0800;
|
2008-11-07 00:22:15 +00:00
|
|
|
_stackend = .;
|
|
|
|
} > IRAM
|
2005-11-27 23:55:13 +00:00
|
|
|
|
2008-11-07 00:22:15 +00:00
|
|
|
.bss :
|
|
|
|
{
|
|
|
|
_edata = .;
|
|
|
|
*(.bss)
|
2008-11-07 00:15:53 +00:00
|
|
|
*(COMMON)
|
2008-11-07 00:22:15 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
_end = .;
|
|
|
|
} > DRAM
|
2005-11-27 23:55:13 +00:00
|
|
|
}
|