Fix Pirelli DP-L10 linker script
This commit is contained in:
parent
c5d613dc6a
commit
7f3ec50b97
@ -78,17 +78,18 @@ Loading NuttX
|
|||||||
Memory Map
|
Memory Map
|
||||||
=========
|
=========
|
||||||
|
|
||||||
Calypso has 256KB of internal SRAM (0x800000-0x83ffff). Only this internal SRAM
|
Calypso has 256KB of internal SRAM (0x800000-0x83ffff, although some of
|
||||||
is used by these configurations. The internal SRAM is broken up into three
|
this is, I believe, actually ROM). Only this internal SRAM is used by
|
||||||
logic banks.
|
these configurations. The internal SRAM is broken up into two logical
|
||||||
|
banks.
|
||||||
|
|
||||||
LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000
|
LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000
|
||||||
TRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00010000
|
HRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00020000
|
||||||
IRAM (rw) : ORIGIN = 0x00830000, LENGTH = 0x00010000
|
IRAM (rw) : ORIGIN = 0x00830000, LENGTH = 0x00010000
|
||||||
|
|
||||||
Code can be loaded by the bootloader only into TRAM and, hence, is restricted
|
Code can be loaded by the CalypsoBootloader only into HRAM beginning at
|
||||||
to 64KB. The additional 64KB if IRAM may be used for uninitialized data and
|
address 0x00820000 and, hence, is restricted to 128KB (including then
|
||||||
for the NuttX heap only.
|
non-loaded sections: uninitialized data and for the NuttX heap).
|
||||||
|
|
||||||
JTAG and Alternative Serial Console
|
JTAG and Alternative Serial Console
|
||||||
===================================
|
===================================
|
||||||
|
@ -1,23 +1,27 @@
|
|||||||
/*
|
/*
|
||||||
* Linker script for running from internal SRAM on Compal phones
|
* Linker script for running from internal SRAM on Pirelli DP-L10 phones
|
||||||
*
|
*
|
||||||
* This script is tailored specifically to the requirements imposed
|
* This script is tailored specifically to the requirements imposed
|
||||||
* on us by the Compal bootloader.
|
* on us by the CalypsoRomloader in the Pirelli rom.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
||||||
OUTPUT_ARCH(arm)
|
OUTPUT_ARCH(arm)
|
||||||
ENTRY(__start)
|
ENTRY(__start)
|
||||||
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
/* 0x800000-0x83ffff */
|
/* 0x00800000-0x0082000: Low RAM. Used only for exception vectors */
|
||||||
/* compal-loaded binary: our text, initialized data */
|
|
||||||
LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000
|
LRAM (rw) : ORIGIN = 0x00800000, LENGTH = 0x00020000
|
||||||
TRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00010000
|
|
||||||
/* compal-loaded binary: our unitialized data, stacks, heap */
|
/* 0x00820000-0x0084000: High RAM. The CalypsoRomloader loads binary to
|
||||||
IRAM (rw) : ORIGIN = 0x00830000, LENGTH = 0x00010000
|
* address 0x00820000 */
|
||||||
|
|
||||||
|
HRAM (rw) : ORIGIN = 0x00820000, LENGTH = 0x00020000
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = 0x800000;
|
. = 0x800000;
|
||||||
@ -34,7 +38,7 @@ SECTIONS
|
|||||||
PROVIDE(__start = .);
|
PROVIDE(__start = .);
|
||||||
KEEP(*(.text.start))
|
KEEP(*(.text.start))
|
||||||
*(.text.start)
|
*(.text.start)
|
||||||
} > TRAM
|
} > HRAM
|
||||||
|
|
||||||
/* exception vectors from 0x80001c to 0x800034 */
|
/* exception vectors from 0x80001c to 0x800034 */
|
||||||
.text.exceptions 0x80001c : AT (LOADADDR(.text.start) + SIZEOF(.text.start)) {
|
.text.exceptions 0x80001c : AT (LOADADDR(.text.start) + SIZEOF(.text.start)) {
|
||||||
@ -55,7 +59,7 @@ SECTIONS
|
|||||||
/* gcc voodoo */
|
/* gcc voodoo */
|
||||||
*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
|
*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
} > TRAM
|
} > HRAM
|
||||||
PROVIDE(_text_start = LOADADDR(.text));
|
PROVIDE(_text_start = LOADADDR(.text));
|
||||||
PROVIDE(_text_end = LOADADDR(.text) + SIZEOF(.text));
|
PROVIDE(_text_end = LOADADDR(.text) + SIZEOF(.text));
|
||||||
|
|
||||||
@ -67,7 +71,7 @@ SECTIONS
|
|||||||
KEEP(*(SORT(.ctors)))
|
KEEP(*(SORT(.ctors)))
|
||||||
/* end of list */
|
/* end of list */
|
||||||
LONG(0)
|
LONG(0)
|
||||||
} > TRAM
|
} > HRAM
|
||||||
PROVIDE(_ctor_start = LOADADDR(.ctors));
|
PROVIDE(_ctor_start = LOADADDR(.ctors));
|
||||||
PROVIDE(_ctor_end = LOADADDR(.ctors) + SIZEOF(.ctors));
|
PROVIDE(_ctor_end = LOADADDR(.ctors) + SIZEOF(.ctors));
|
||||||
|
|
||||||
@ -79,7 +83,7 @@ SECTIONS
|
|||||||
KEEP(*(SORT(.dtors)))
|
KEEP(*(SORT(.dtors)))
|
||||||
/* end of list */
|
/* end of list */
|
||||||
LONG(0)
|
LONG(0)
|
||||||
} > TRAM
|
} > HRAM
|
||||||
PROVIDE(_dtor_start = LOADADDR(.dtors));
|
PROVIDE(_dtor_start = LOADADDR(.dtors));
|
||||||
PROVIDE(_dtor_end = LOADADDR(.dtors) + SIZEOF(.dtors));
|
PROVIDE(_dtor_end = LOADADDR(.dtors) + SIZEOF(.dtors));
|
||||||
|
|
||||||
@ -87,7 +91,7 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.rodata : {
|
.rodata : {
|
||||||
*(.rodata*)
|
*(.rodata*)
|
||||||
} > TRAM
|
} > HRAM
|
||||||
PROVIDE(_rodata_start = LOADADDR(.rodata));
|
PROVIDE(_rodata_start = LOADADDR(.rodata));
|
||||||
PROVIDE(_rodata_end = LOADADDR(.rodata) + SIZEOF(.rodata));
|
PROVIDE(_rodata_end = LOADADDR(.rodata) + SIZEOF(.rodata));
|
||||||
|
|
||||||
@ -95,7 +99,7 @@ SECTIONS
|
|||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
.data : {
|
.data : {
|
||||||
*(.data)
|
*(.data)
|
||||||
} > TRAM
|
} > HRAM
|
||||||
PROVIDE(_data_start = LOADADDR(.data));
|
PROVIDE(_data_start = LOADADDR(.data));
|
||||||
PROVIDE(_data_end = LOADADDR(.data) + SIZEOF(.data));
|
PROVIDE(_data_end = LOADADDR(.data) + SIZEOF(.data));
|
||||||
|
|
||||||
@ -104,7 +108,7 @@ SECTIONS
|
|||||||
.got : {
|
.got : {
|
||||||
*(.got)
|
*(.got)
|
||||||
*(.got.plt) *(.igot.plt) *(.got) *(.igot)
|
*(.got.plt) *(.igot.plt) *(.got) *(.igot)
|
||||||
} > TRAM
|
} > HRAM
|
||||||
PROVIDE(_got_start = LOADADDR(.got));
|
PROVIDE(_got_start = LOADADDR(.got));
|
||||||
PROVIDE(_got_end = LOADADDR(.got) + SIZEOF(.got));
|
PROVIDE(_got_end = LOADADDR(.got) + SIZEOF(.got));
|
||||||
|
|
||||||
@ -115,7 +119,7 @@ SECTIONS
|
|||||||
_sbss = ABSOLUTE(.);
|
_sbss = ABSOLUTE(.);
|
||||||
*(.bss)
|
*(.bss)
|
||||||
_ebss = ABSOLUTE(.);
|
_ebss = ABSOLUTE(.);
|
||||||
} > IRAM
|
} > HRAM
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__bss_end = .;
|
__bss_end = .;
|
||||||
PROVIDE(_bss_start = __bss_start);
|
PROVIDE(_bss_start = __bss_start);
|
||||||
|
Loading…
Reference in New Issue
Block a user