diff options
Diffstat (limited to 'firmware/target/arm/pp/boot-pp.lds')
-rw-r--r-- | firmware/target/arm/pp/boot-pp.lds | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/firmware/target/arm/pp/boot-pp.lds b/firmware/target/arm/pp/boot-pp.lds new file mode 100644 index 0000000000..602c3bf7ab --- /dev/null +++ b/firmware/target/arm/pp/boot-pp.lds | |||
@@ -0,0 +1,92 @@ | |||
1 | #include "config.h" | ||
2 | |||
3 | ENTRY(start) | ||
4 | OUTPUT_FORMAT(elf32-littlearm) | ||
5 | OUTPUT_ARCH(arm) | ||
6 | STARTUP(target/arm/pp/crt0-pp-bl.o) | ||
7 | |||
8 | #define DRAMSIZE (MEMORYSIZE * 0x100000) | ||
9 | |||
10 | #if CONFIG_CPU == PP6100 | ||
11 | #define DRAMORIG 0x10f00000 | ||
12 | #ifndef IRAMORIG | ||
13 | #define IRAMORIG 0x40000000 | ||
14 | #endif | ||
15 | #define IRAMSIZE 0x20000 | ||
16 | #define FLASHORIG 0x001f0000 | ||
17 | #define FLASHSIZE 2M | ||
18 | #if CONFIG_CPU == PP5020 | ||
19 | #define DRAMORIG 0x10000000 | ||
20 | #define IRAMORIG 0x40000000 | ||
21 | #define IRAMSIZE 0x18000 | ||
22 | #define FLASHORIG 0x001f0000 | ||
23 | #define FLASHSIZE 2M | ||
24 | #elif (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024) | ||
25 | #define DRAMORIG 0x10000000 | ||
26 | #ifndef IRAMORIG | ||
27 | #define IRAMORIG 0x40000000 | ||
28 | #endif | ||
29 | #define IRAMSIZE 0x20000 | ||
30 | #define FLASHORIG 0x001f0000 | ||
31 | #define FLASHSIZE 2M | ||
32 | #elif CONFIG_CPU == PP5002 | ||
33 | #define DRAMORIG 0x28000000 | ||
34 | #define IRAMORIG 0x40000000 | ||
35 | #define IRAMSIZE 0x18000 | ||
36 | #define FLASHORIG 0x001f0000 | ||
37 | #define FLASHSIZE 2M | ||
38 | #endif | ||
39 | |||
40 | MEMORY | ||
41 | { | ||
42 | DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE | ||
43 | IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE | ||
44 | } | ||
45 | |||
46 | SECTIONS | ||
47 | { | ||
48 | #ifdef SANSA_PP_ERASE | ||
49 | . = IRAMORIG+0x4000; | ||
50 | #else | ||
51 | . = IRAMORIG; | ||
52 | #endif | ||
53 | |||
54 | .text : { | ||
55 | *(.init.text) | ||
56 | *(.text*) | ||
57 | *(.glue_7) | ||
58 | *(.glue_7t) | ||
59 | } > IRAM | ||
60 | |||
61 | .data : { | ||
62 | *(.icode) | ||
63 | *(.irodata) | ||
64 | *(.idata) | ||
65 | *(.data*) | ||
66 | *(.ncdata*) | ||
67 | *(.rodata*) | ||
68 | _dataend = . ; | ||
69 | } > IRAM | ||
70 | |||
71 | .stack (NOLOAD) : { | ||
72 | *(.stack) | ||
73 | _stackbegin = .; | ||
74 | stackbegin = .; | ||
75 | . += 0x2000; | ||
76 | _stackend = .; | ||
77 | stackend = .; | ||
78 | } > IRAM | ||
79 | |||
80 | /* The bss section is too large for IRAM - we just move it 16MB into the | ||
81 | DRAM */ | ||
82 | |||
83 | . = DRAMORIG; | ||
84 | .bss . + (16*1024*1024) (NOLOAD) : { | ||
85 | _edata = .; | ||
86 | *(.bss*); | ||
87 | *(.ibss); | ||
88 | *(COMMON) | ||
89 | *(.ncbss*); | ||
90 | _end = .; | ||
91 | } > DRAM | ||
92 | } | ||