summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/app.lds36
-rw-r--r--firmware/gdb.lds51
-rw-r--r--firmware/player.lds41
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 @@
1ENTRY(start) 1ENTRY(start)
2OUTPUT_FORMAT(elf32-sh) 2OUTPUT_FORMAT(elf32-sh)
3INPUT(crt0.o) 3INPUT(crt0.o)
4
5MEMORY
6{
7 DRAM : ORIGIN = 0x09000000, LENGTH = 0x200000
8 IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000
9}
10
4SECTIONS 11SECTIONS
5{ 12{
6 .vectors 0x09000000 : 13 .vectors :
7 { 14 {
8 *(.resetvectors); 15 *(.resetvectors);
9 *(.vectors); 16 *(.vectors);
10 . = ALIGN(0x200); 17 . = ALIGN(0x200);
11 *(.init.text) 18 *(.init.text)
12 } 19 } > DRAM
13 20
14 .text : 21 .text :
15 { 22 {
16 *(.text) 23 *(.text)
17 } 24 } > DRAM
18 25
19 .data : 26 .data :
20 { 27 {
21 *(.data) 28 *(.data)
22 } 29 } > DRAM
23 30
24 .rodata : 31 .rodata :
25 { 32 {
26 *(.rodata) 33 *(.rodata)
27 } 34 } > DRAM
28 35
29 .bss : 36 .bss :
30 { 37 {
@@ -32,31 +39,40 @@ SECTIONS
32 *(.bss) 39 *(.bss)
33 *(COMMON) 40 *(COMMON)
34 _end = .; 41 _end = .;
35 } 42 } > DRAM
36 43
37 .stack : 44 .stack :
38 { 45 {
39 *(.stack) 46 *(.stack)
40 _stackbegin = .; 47 _stackbegin = .;
48 /* We put the copy of the .iram section here to save space */
49 _iramcopy = .;
41 . = 0x2000; 50 . = 0x2000;
42 _stackend = .; 51 _stackend = .;
43 } 52 } > DRAM
44 53
45 .heap : 54 .heap :
46 { 55 {
47 _poolstart = .; 56 _poolstart = .;
48 . = 0x20000; 57 . = 0x20000;
49 _poolend = .; 58 _poolend = .;
50 } 59 } > DRAM
51 60
52 .mp3buf : 61 .mp3buf :
53 { 62 {
54 _mp3buf = .; 63 _mp3buf = .;
55 } 64 } > DRAM
56 65
57 .mp3end 0x09200000 : 66 .mp3end 0x09200000 :
58 { 67 {
59 _mp3end = .; 68 _mp3end = .;
60 } 69 } > DRAM
61 70
71 .iram 0xf000000 : AT ( _end )
72 {
73 _iramstart = .;
74 *(.icode)
75 *(.idata)
76 _iramend = .;
77 } > IRAM
62} 78}
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 @@
1ENTRY(start) 1ENTRY(start)
2OUTPUT_FORMAT(elf32-sh) 2OUTPUT_FORMAT(elf32-sh)
3INPUT(crt0.o) 3INPUT(crt0.o)
4
5MEMORY
6{
7 DRAM : ORIGIN = 0x09010000, LENGTH = 0x1f0000
8 IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000
9}
10
4SECTIONS 11SECTIONS
5{ 12{
6 .vectors 0x09010000 : 13 .vectors :
7 { 14 {
8 *(.resetvectors); 15 *(.resetvectors);
9 *(.vectors); 16 *(.vectors);
10 . = ALIGN(0x200); 17 . = ALIGN(0x200);
11 *(.init.text) 18 *(.init.text)
12 } 19 } > DRAM
13 20
14 .text : 21 .text :
15 { 22 {
16 *(.text) 23 *(.text)
17 } 24 } > DRAM
18 25
19 .data : 26 .data :
20 { 27 {
21 *(.data) 28 *(.data)
22 } 29 } > DRAM
23 30
24 .rodata : 31 .rodata :
25 { 32 {
26 *(.rodata) 33 *(.rodata)
27 } 34 } > DRAM
28
29 .bss :
30 {
31 _edata = .;
32 *(.bss)
33 *(COMMON)
34 _end = .;
35 }
36 35
37 .stack : 36 .stack :
38 { 37 {
39 *(.stack) 38 *(.stack)
40 _stackbegin = .; 39 _stackbegin = .;
40 /* We put the copy of the .iram section here to save space */
41 _iramcopy = .;
41 . = 0x2000; 42 . = 0x2000;
42 _stackend = .; 43 _stackend = .;
43 } 44 } > DRAM
45
46 .bss :
47 {
48 _edata = .;
49 *(.bss)
50 *(COMMON)
51 _end = .;
52 } > DRAM
44 53
45 .heap : 54 .heap :
46 { 55 {
47 _poolstart = .; 56 _poolstart = .;
48 . = 0x20000; 57 . = 0x20000;
49 _poolend = .; 58 _poolend = .;
50 } 59 } > DRAM
51 60
52 .mp3buf : 61 .mp3buf :
53 { 62 {
54 _mp3buf = .; 63 _mp3buf = .;
55 } 64 } > DRAM
56 65
57 .mp3end 0x09200000 : 66 .mp3end 0x09200000 :
58 { 67 {
59 _mp3end = .; 68 _mp3end = .;
60 } 69 } > DRAM
70
71 .iram 0xf000000 : AT ( _iramcopy )
72 {
73 _iramstart = .;
74 *(.icode)
75 *(.idata)
76 _iramend = .;
77 } > IRAM
61} 78}
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 @@
1ENTRY(start) 1ENTRY(start)
2OUTPUT_FORMAT(elf32-sh) 2OUTPUT_FORMAT(elf32-sh)
3INPUT(crt0.o) 3INPUT(crt0.o)
4
5MEMORY
6{
7 DRAM : ORIGIN = 0x09000000, LENGTH = 0x200000
8 IRAM : ORIGIN = 0x0f000000, LENGTH = 0x1000
9}
10
4SECTIONS 11SECTIONS
5{ 12{
6 .vectors 0x09000000 : 13 .vectors :
7 { 14 {
8 *(.resetvectors); 15 *(.resetvectors);
9 *(.vectors); 16 *(.vectors);
10 . = ALIGN(0x200); 17 . = ALIGN(0x200);
11 *(.init.text) 18 *(.init.text)
12 } 19 } > DRAM
13 20
14 .text : 21 .text :
15 { 22 {
16 *(.text) 23 *(.text)
17 } 24 } > DRAM
18 25
19 .data : 26 .data :
20 { 27 {
21 *(.data) 28 *(.data)
22 } 29 } > DRAM
23 30
24 .rodata : 31 .rodata :
25 { 32 {
26 *(.rodata) 33 *(.rodata)
27 } 34 } > DRAM
28 35
29 .bss : 36 .bss :
30 { 37 {
@@ -32,35 +39,45 @@ SECTIONS
32 *(.bss) 39 *(.bss)
33 *(COMMON) 40 *(COMMON)
34 _end = .; 41 _end = .;
35 } 42 } > DRAM
36 43
37 .stack : 44 .stack :
38 { 45 {
39 *(.stack) 46 *(.stack)
40 _stackbegin = .; 47 _stackbegin = .;
48 /* We put the copy of the .iram section here to save space */
49 _iramcopy = .;
41 . = 0x2000; 50 . = 0x2000;
42 _stackend = .; 51 _stackend = .;
43 } 52 } > DRAM
44 53
45 .heap : 54 .heap :
46 { 55 {
47 _poolstart = .; 56 _poolstart = .;
48 . = 0x20000; 57 . = 0x20000;
49 _poolend = .; 58 _poolend = .;
50 } 59 } > DRAM
51 60
52 .mp3buf : 61 .mp3buf :
53 { 62 {
54 _mp3buf = .; 63 _mp3buf = .;
55 } 64 } > DRAM
56 65
57 .mp3end 0x09200000 : 66 .mp3end 0x09200000 :
58 { 67 {
59 _mp3end = .; 68 _mp3end = .;
60 } 69 } > DRAM
61 70
62 .pad 0x0900C800 : 71 .pad 0x0900C800 :
63 { 72 {
64 LONG(0); 73 LONG(0);
65 } 74 } > DRAM
75
76 .iram 0xf000000 : AT ( _end )
77 {
78 _iramstart = .;
79 *(.icode)
80 *(.idata)
81 _iramend = .;
82 } > IRAM
66} 83}