diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2007-01-08 18:21:12 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2007-01-08 18:21:12 +0000 |
commit | b1af4e6cc8f5b0657348d206224f03ab5e44f1e9 (patch) | |
tree | b2d6fafceb4f2e2758c351aef8aecf07536c3d16 /firmware | |
parent | dc040f0c8a1a11c72cb74d80d8cb7477b5b31374 (diff) | |
download | rockbox-b1af4e6cc8f5b0657348d206224f03ab5e44f1e9.tar.gz rockbox-b1af4e6cc8f5b0657348d206224f03ab5e44f1e9.zip |
Enable ROM file generation for H120/H140.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11947 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/rom.lds | 70 |
1 files changed, 53 insertions, 17 deletions
diff --git a/firmware/rom.lds b/firmware/rom.lds index 29e72d70c0..0967c6b88a 100644 --- a/firmware/rom.lds +++ b/firmware/rom.lds | |||
@@ -1,38 +1,39 @@ | |||
1 | #include "config.h" | 1 | #include "config.h" |
2 | 2 | ||
3 | ENTRY(start) | 3 | ENTRY(start) |
4 | |||
4 | #ifdef CPU_COLDFIRE | 5 | #ifdef CPU_COLDFIRE |
5 | OUTPUT_FORMAT(elf32-m68k) | 6 | OUTPUT_FORMAT(elf32-m68k) |
6 | #else | ||
7 | OUTPUT_FORMAT(elf32-sh) | ||
8 | #endif | ||
9 | #ifdef CPU_COLDFIRE | ||
10 | INPUT(target/coldfire/crt0.o) | 7 | INPUT(target/coldfire/crt0.o) |
11 | #elif defined(CPU_PP) | 8 | #elif defined(CPU_PP) |
9 | OUTPUT_FORMAT(elf32-littlearm) | ||
12 | INPUT(target/arm/crt0-pp.o) | 10 | INPUT(target/arm/crt0-pp.o) |
13 | #elif defined(CPU_ARM) | 11 | #elif defined(CPU_ARM) |
12 | OUTPUT_FORMAT(elf32-littlearm) | ||
14 | INPUT(target/arm/crt0.o) | 13 | INPUT(target/arm/crt0.o) |
15 | #elif CONFIG_CPU == SH7034 | 14 | #elif CONFIG_CPU == SH7034 |
15 | OUTPUT_FORMAT(elf32-sh) | ||
16 | INPUT(target/sh/crt0.o) | 16 | INPUT(target/sh/crt0.o) |
17 | #else | 17 | #else |
18 | OUTPUT_FORMAT(elf32-sh) | ||
18 | INPUT(crt0.o) | 19 | INPUT(crt0.o) |
19 | #endif | 20 | #endif |
20 | 21 | ||
21 | 22 | ||
22 | #if MEMORYSIZE >= 32 | 23 | #if MEMORYSIZE >= 32 |
23 | #define PLUGINSIZE 0xC0000 | 24 | #define PLUGINSIZE PLUGIN_BUFFER_SIZE |
24 | #else | 25 | #else |
25 | #define PLUGINSIZE 0x8000 | 26 | #define PLUGINSIZE 0x8000 |
26 | #endif | 27 | #endif |
27 | 28 | ||
28 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE | ||
29 | 29 | ||
30 | #ifdef IRIVER_H100 | 30 | #ifdef IRIVER_H100_SERIES |
31 | #define CODECSIZE CODEC_SIZE | ||
31 | #define DRAMORIG 0x31000000 | 32 | #define DRAMORIG 0x31000000 |
32 | #define IRAMORIG 0x10000000 | 33 | #define IRAMORIG 0x10000000 |
33 | #define IRAMSIZE 0x18000 | 34 | #define IRAMSIZE 0xc000 |
34 | #define FLASHORIG 0x001f0000 | 35 | #define FLASHORIG 0x00100028 |
35 | #define FLASHSIZE 2M | 36 | #define FLASHSIZE 0x000eff80 |
36 | #else | 37 | #else |
37 | #define DRAMORIG 0x09000000 | 38 | #define DRAMORIG 0x09000000 |
38 | #define IRAMORIG 0x0f000000 | 39 | #define IRAMORIG 0x0f000000 |
@@ -41,7 +42,18 @@ INPUT(crt0.o) | |||
41 | #define FLASHSIZE 256K - ROM_START | 42 | #define FLASHSIZE 256K - ROM_START |
42 | #endif | 43 | #endif |
43 | 44 | ||
44 | #define ENDADDR (DRAMORIG + DRAMSIZE) | 45 | #ifdef CODECSIZE |
46 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE - CODECSIZE | ||
47 | /* Where the codec buffer ends, and the plugin buffer starts */ | ||
48 | #define ENDADDR (ENDAUDIOADDR + CODECSIZE) | ||
49 | #else | ||
50 | #define DRAMSIZE (MEMORYSIZE * 0x100000) - PLUGINSIZE | ||
51 | /* Where the audio buffer ends, and the plugin buffer starts */ | ||
52 | #define ENDADDR ENDAUDIOADDR | ||
53 | #endif | ||
54 | |||
55 | /* End of the audio buffer, where the codec/plugin buffer starts */ | ||
56 | #define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) | ||
45 | 57 | ||
46 | MEMORY | 58 | MEMORY |
47 | { | 59 | { |
@@ -74,10 +86,15 @@ SECTIONS | |||
74 | . = ALIGN(0x200); | 86 | . = ALIGN(0x200); |
75 | *(.data) | 87 | *(.data) |
76 | . = ALIGN(0x4); | 88 | . = ALIGN(0x4); |
77 | _dataend = .; | 89 | _dataend = .; |
78 | . = ALIGN(0x10); /* Maintain proper alignment for .text section */ | 90 | . = ALIGN(0x10); /* Maintain proper alignment for .text section */ |
79 | } > DRAM | 91 | } > DRAM |
80 | 92 | ||
93 | /DISCARD/ : | ||
94 | { | ||
95 | *(.eh_frame) | ||
96 | } | ||
97 | |||
81 | /* TRICK ALERT! Newer versions of the linker don't allow output sections | 98 | /* TRICK ALERT! Newer versions of the linker don't allow output sections |
82 | to overlap even if one of them is empty, so advance the location pointer | 99 | to overlap even if one of them is empty, so advance the location pointer |
83 | "by hand" */ | 100 | "by hand" */ |
@@ -105,7 +122,7 @@ SECTIONS | |||
105 | *(.idata) | 122 | *(.idata) |
106 | _iramend = .; | 123 | _iramend = .; |
107 | } > IRAM | 124 | } > IRAM |
108 | 125 | ||
109 | .ibss (NOLOAD) : | 126 | .ibss (NOLOAD) : |
110 | { | 127 | { |
111 | _iedata = .; | 128 | _iedata = .; |
@@ -122,29 +139,48 @@ SECTIONS | |||
122 | . += 0x2000; | 139 | . += 0x2000; |
123 | _stackend = .; | 140 | _stackend = .; |
124 | stackend = .; | 141 | stackend = .; |
125 | } > DRAM | 142 | } > IRAM |
126 | 143 | ||
144 | #ifdef CPU_COLDFIRE | ||
145 | .bss ADDR(.data) + SIZEOF(.data) + SIZEOF(.iram): | ||
146 | #else | ||
127 | .bss : | 147 | .bss : |
148 | #endif | ||
128 | { | 149 | { |
129 | _edata = .; | 150 | _edata = .; |
130 | *(.bss) | 151 | *(.bss*) |
131 | *(COMMON) | 152 | *(COMMON) |
153 | . = ALIGN(0x4); | ||
132 | _end = .; | 154 | _end = .; |
133 | } > DRAM | 155 | } > DRAM |
134 | 156 | ||
135 | .audiobuf : | 157 | .audiobuf ALIGN(4): |
136 | { | 158 | { |
137 | . = ALIGN(0x4); | ||
138 | _audiobuffer = .; | 159 | _audiobuffer = .; |
160 | audiobuffer = .; | ||
139 | } > DRAM | 161 | } > DRAM |
140 | 162 | ||
163 | #ifdef CODECSIZE | ||
164 | .audiobufend ENDAUDIOADDR: | ||
165 | #else | ||
141 | .audiobufend ENDADDR: | 166 | .audiobufend ENDADDR: |
167 | #endif | ||
142 | { | 168 | { |
143 | _audiobufend = .; | 169 | _audiobufend = .; |
170 | audiobufend = .; | ||
144 | } > DRAM | 171 | } > DRAM |
145 | 172 | ||
173 | #ifdef CODECSIZE | ||
174 | .codec ENDAUDIOADDR: | ||
175 | { | ||
176 | codecbuf = .; | ||
177 | _codecbuf = .; | ||
178 | } | ||
179 | #endif | ||
180 | |||
146 | .plugin ENDADDR: | 181 | .plugin ENDADDR: |
147 | { | 182 | { |
148 | _pluginbuf = .; | 183 | _pluginbuf = .; |
184 | pluginbuf = .; | ||
149 | } | 185 | } |
150 | } | 186 | } |