forked from len0rd/rockbox
Make the linker complain if the bootloader isn't going to fit into IRAM on PP devices.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17298 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a1fa57fc01
commit
93b8a076ec
4 changed files with 57 additions and 26 deletions
|
@ -29,6 +29,12 @@ STARTUP(target/arm/crt0-pp-bl.o)
|
||||||
#define FLASHSIZE 2M
|
#define FLASHSIZE 2M
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
||||||
|
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = IRAMORIG;
|
. = IRAMORIG;
|
||||||
|
@ -36,26 +42,28 @@ SECTIONS
|
||||||
.text : {
|
.text : {
|
||||||
*(.init.text)
|
*(.init.text)
|
||||||
*(.text*)
|
*(.text*)
|
||||||
}
|
*(.glue_7)
|
||||||
|
*(.glue_7t)
|
||||||
|
} > IRAM
|
||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
*(.icode)
|
*(.icode)
|
||||||
*(.irodata)
|
*(.irodata)
|
||||||
*(.idata)
|
*(.idata)
|
||||||
*(.data*)
|
*(.data*)
|
||||||
*(.ncdata*);
|
*(.ncdata*)
|
||||||
|
*(.rodata*)
|
||||||
_dataend = . ;
|
_dataend = . ;
|
||||||
}
|
} > IRAM
|
||||||
|
|
||||||
.stack :
|
.stack : {
|
||||||
{
|
|
||||||
*(.stack)
|
*(.stack)
|
||||||
_stackbegin = .;
|
_stackbegin = .;
|
||||||
stackbegin = .;
|
stackbegin = .;
|
||||||
. += 0x2000;
|
. += 0x2000;
|
||||||
_stackend = .;
|
_stackend = .;
|
||||||
stackend = .;
|
stackend = .;
|
||||||
}
|
} > IRAM
|
||||||
|
|
||||||
/* The bss section is too large for IRAM - we just move it 16MB into the
|
/* The bss section is too large for IRAM - we just move it 16MB into the
|
||||||
DRAM */
|
DRAM */
|
||||||
|
@ -67,5 +75,5 @@ SECTIONS
|
||||||
*(.ibss);
|
*(.ibss);
|
||||||
*(.ncbss*);
|
*(.ncbss*);
|
||||||
_end = .;
|
_end = .;
|
||||||
}
|
} > DRAM
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,12 @@ STARTUP(target/arm/crt0-pp-bl.o)
|
||||||
#define FLASHORIG 0x001f0000
|
#define FLASHORIG 0x001f0000
|
||||||
#define FLASHSIZE 2M
|
#define FLASHSIZE 2M
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
||||||
|
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = IRAMORIG;
|
. = IRAMORIG;
|
||||||
|
@ -20,26 +26,28 @@ SECTIONS
|
||||||
.text : {
|
.text : {
|
||||||
*(.init.text)
|
*(.init.text)
|
||||||
*(.text*)
|
*(.text*)
|
||||||
}
|
*(.glue_7)
|
||||||
|
*(.glue_7t)
|
||||||
|
} > IRAM
|
||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
*(.icode)
|
*(.icode)
|
||||||
*(.irodata)
|
*(.irodata)
|
||||||
*(.idata)
|
*(.idata)
|
||||||
*(.data*)
|
*(.data*)
|
||||||
*(.ncdata*);
|
*(.ncdata*)
|
||||||
|
*(.rodata*)
|
||||||
_dataend = . ;
|
_dataend = . ;
|
||||||
}
|
} > IRAM
|
||||||
|
|
||||||
.stack :
|
.stack : {
|
||||||
{
|
|
||||||
*(.stack)
|
*(.stack)
|
||||||
_stackbegin = .;
|
_stackbegin = .;
|
||||||
stackbegin = .;
|
stackbegin = .;
|
||||||
. += 0x2000;
|
. += 0x2000;
|
||||||
_stackend = .;
|
_stackend = .;
|
||||||
stackend = .;
|
stackend = .;
|
||||||
}
|
} > IRAM
|
||||||
|
|
||||||
/* The bss section is too large for IRAM - we just move it 16MB into the
|
/* The bss section is too large for IRAM - we just move it 16MB into the
|
||||||
DRAM */
|
DRAM */
|
||||||
|
@ -51,5 +59,5 @@ SECTIONS
|
||||||
*(.ibss);
|
*(.ibss);
|
||||||
*(.ncbss*);
|
*(.ncbss*);
|
||||||
_end = .;
|
_end = .;
|
||||||
}
|
} > DRAM
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,12 @@ STARTUP(target/arm/crt0-pp-bl.o)
|
||||||
#define FLASHORIG 0x001f0000
|
#define FLASHORIG 0x001f0000
|
||||||
#define FLASHSIZE 2M
|
#define FLASHSIZE 2M
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
||||||
|
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = IRAMORIG;
|
. = IRAMORIG;
|
||||||
|
@ -20,7 +26,9 @@ SECTIONS
|
||||||
.text : {
|
.text : {
|
||||||
*(.init.text)
|
*(.init.text)
|
||||||
*(.text*)
|
*(.text*)
|
||||||
}
|
*(.glue_7)
|
||||||
|
*(.glue_7t)
|
||||||
|
} > IRAM
|
||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
*(.icode)
|
*(.icode)
|
||||||
|
@ -28,18 +36,18 @@ SECTIONS
|
||||||
*(.idata)
|
*(.idata)
|
||||||
*(.data*)
|
*(.data*)
|
||||||
*(.ncdata*)
|
*(.ncdata*)
|
||||||
|
*(.rodata*)
|
||||||
_dataend = . ;
|
_dataend = . ;
|
||||||
}
|
} > IRAM
|
||||||
|
|
||||||
.stack :
|
.stack : {
|
||||||
{
|
|
||||||
*(.stack)
|
*(.stack)
|
||||||
_stackbegin = .;
|
_stackbegin = .;
|
||||||
stackbegin = .;
|
stackbegin = .;
|
||||||
. += 0x2000;
|
. += 0x2000;
|
||||||
_stackend = .;
|
_stackend = .;
|
||||||
stackend = .;
|
stackend = .;
|
||||||
}
|
} > IRAM
|
||||||
|
|
||||||
/* The bss section is too large for IRAM - we just move it 16MB into the
|
/* The bss section is too large for IRAM - we just move it 16MB into the
|
||||||
DRAM */
|
DRAM */
|
||||||
|
@ -51,5 +59,5 @@ SECTIONS
|
||||||
*(.ibss);
|
*(.ibss);
|
||||||
*(.ncbss*);
|
*(.ncbss*);
|
||||||
_end = .;
|
_end = .;
|
||||||
}
|
} > DRAM
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,11 @@ STARTUP(target/arm/crt0-pp-bl.o)
|
||||||
#define FLASHORIG 0x001f0000
|
#define FLASHORIG 0x001f0000
|
||||||
#define FLASHSIZE 2M
|
#define FLASHSIZE 2M
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
||||||
|
IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
|
||||||
|
}
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
|
@ -23,7 +28,9 @@ SECTIONS
|
||||||
.text : {
|
.text : {
|
||||||
*(.init.text)
|
*(.init.text)
|
||||||
*(.text*)
|
*(.text*)
|
||||||
}
|
*(.glue_7)
|
||||||
|
*(.glue_7t)
|
||||||
|
} > IRAM
|
||||||
|
|
||||||
.data : {
|
.data : {
|
||||||
*(.icode)
|
*(.icode)
|
||||||
|
@ -31,18 +38,18 @@ SECTIONS
|
||||||
*(.idata)
|
*(.idata)
|
||||||
*(.data*)
|
*(.data*)
|
||||||
*(.ncdata*)
|
*(.ncdata*)
|
||||||
|
*(.rodata*)
|
||||||
_dataend = . ;
|
_dataend = . ;
|
||||||
}
|
} > IRAM
|
||||||
|
|
||||||
.stack :
|
.stack : {
|
||||||
{
|
|
||||||
*(.stack)
|
*(.stack)
|
||||||
_stackbegin = .;
|
_stackbegin = .;
|
||||||
stackbegin = .;
|
stackbegin = .;
|
||||||
. += 0x2000;
|
. += 0x2000;
|
||||||
_stackend = .;
|
_stackend = .;
|
||||||
stackend = .;
|
stackend = .;
|
||||||
}
|
} > IRAM
|
||||||
|
|
||||||
/* The bss section is too large for IRAM - we just move it 16MB into the
|
/* The bss section is too large for IRAM - we just move it 16MB into the
|
||||||
DRAM */
|
DRAM */
|
||||||
|
@ -54,5 +61,5 @@ SECTIONS
|
||||||
*(.ibss);
|
*(.ibss);
|
||||||
*(.ncbss*);
|
*(.ncbss*);
|
||||||
_end = .;
|
_end = .;
|
||||||
}
|
} > DRAM
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue