diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2002-08-01 08:12:17 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2002-08-01 08:12:17 +0000 |
commit | 909df0a1391929dd551f96a8f7c97e1b106a7f9f (patch) | |
tree | d521eec399288e1716630ca2cd88630bc2100e51 /firmware | |
parent | b605b2ec2dca75161584778ad58807046dd33cd7 (diff) | |
download | rockbox-909df0a1391929dd551f96a8f7c97e1b106a7f9f.tar.gz rockbox-909df0a1391929dd551f96a8f7c97e1b106a7f9f.zip |
No allows code and data in internal RAM
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1497 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/app.lds | 36 | ||||
-rw-r--r-- | firmware/gdb.lds | 51 | ||||
-rw-r--r-- | firmware/player.lds | 41 |
3 files changed, 89 insertions, 39 deletions
diff --git a/firmware/app.lds b/firmware/app.lds index e052efea32..a514c46937 100644 --- a/firmware/app.lds +++ b/firmware/app.lds @@ -1,30 +1,37 @@ ENTRY(start) OUTPUT_FORMAT(elf32-sh) INPUT(crt0.o) + +MEMORY +{ + DRAM : ORIGIN = 0x09000000, LENGTH = 0x200000 + IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000 +} + SECTIONS { - .vectors 0x09000000 : + .vectors : { *(.resetvectors); *(.vectors); . = ALIGN(0x200); *(.init.text) - } + } > DRAM .text : { *(.text) - } + } > DRAM .data : { *(.data) - } + } > DRAM .rodata : { *(.rodata) - } + } > DRAM .bss : { @@ -32,31 +39,40 @@ SECTIONS *(.bss) *(COMMON) _end = .; - } + } > DRAM .stack : { *(.stack) _stackbegin = .; + /* We put the copy of the .iram section here to save space */ + _iramcopy = .; . = 0x2000; _stackend = .; - } + } > DRAM .heap : { _poolstart = .; . = 0x20000; _poolend = .; - } + } > DRAM .mp3buf : { _mp3buf = .; - } + } > DRAM .mp3end 0x09200000 : { _mp3end = .; - } + } > DRAM + .iram 0xf000000 : AT ( _end ) + { + _iramstart = .; + *(.icode) + *(.idata) + _iramend = .; + } > IRAM } diff --git a/firmware/gdb.lds b/firmware/gdb.lds index b9552fef61..badb7856fc 100644 --- a/firmware/gdb.lds +++ b/firmware/gdb.lds @@ -1,61 +1,78 @@ ENTRY(start) OUTPUT_FORMAT(elf32-sh) INPUT(crt0.o) + +MEMORY +{ + DRAM : ORIGIN = 0x09010000, LENGTH = 0x1f0000 + IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000 +} + SECTIONS { - .vectors 0x09010000 : + .vectors : { *(.resetvectors); *(.vectors); . = ALIGN(0x200); *(.init.text) - } + } > DRAM .text : { *(.text) - } + } > DRAM .data : { *(.data) - } + } > DRAM .rodata : { *(.rodata) - } - - .bss : - { - _edata = .; - *(.bss) - *(COMMON) - _end = .; - } + } > DRAM .stack : { *(.stack) _stackbegin = .; + /* We put the copy of the .iram section here to save space */ + _iramcopy = .; . = 0x2000; _stackend = .; - } + } > DRAM + + .bss : + { + _edata = .; + *(.bss) + *(COMMON) + _end = .; + } > DRAM .heap : { _poolstart = .; . = 0x20000; _poolend = .; - } + } > DRAM .mp3buf : { _mp3buf = .; - } + } > DRAM .mp3end 0x09200000 : { _mp3end = .; - } + } > DRAM + + .iram 0xf000000 : AT ( _iramcopy ) + { + _iramstart = .; + *(.icode) + *(.idata) + _iramend = .; + } > IRAM } diff --git a/firmware/player.lds b/firmware/player.lds index b46621879c..bb20c2bb25 100644 --- a/firmware/player.lds +++ b/firmware/player.lds @@ -1,30 +1,37 @@ ENTRY(start) OUTPUT_FORMAT(elf32-sh) INPUT(crt0.o) + +MEMORY +{ + DRAM : ORIGIN = 0x09000000, LENGTH = 0x200000 + IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000 +} + SECTIONS { - .vectors 0x09000000 : + .vectors : { *(.resetvectors); *(.vectors); . = ALIGN(0x200); *(.init.text) - } + } > DRAM .text : { *(.text) - } + } > DRAM .data : { *(.data) - } + } > DRAM .rodata : { *(.rodata) - } + } > DRAM .bss : { @@ -32,35 +39,45 @@ SECTIONS *(.bss) *(COMMON) _end = .; - } + } > DRAM .stack : { *(.stack) _stackbegin = .; + /* We put the copy of the .iram section here to save space */ + _iramcopy = .; . = 0x2000; _stackend = .; - } + } > DRAM .heap : { _poolstart = .; . = 0x20000; _poolend = .; - } + } > DRAM .mp3buf : { _mp3buf = .; - } + } > DRAM .mp3end 0x09200000 : { _mp3end = .; - } + } > DRAM .pad 0x0900C800 : { - LONG(0); - } + LONG(0); + } > DRAM + + .iram 0xf000000 : AT ( _end ) + { + _iramstart = .; + *(.icode) + *(.idata) + _iramend = .; + } > IRAM } |