summaryrefslogtreecommitdiff
path: root/firmware/rom.lds
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/rom.lds')
-rw-r--r--firmware/rom.lds19
1 files changed, 19 insertions, 0 deletions
diff --git a/firmware/rom.lds b/firmware/rom.lds
index e0ce0b1728..abfa311839 100644
--- a/firmware/rom.lds
+++ b/firmware/rom.lds
@@ -54,13 +54,20 @@ STARTUP(crt0.o)
54 54
55/* End of the audio buffer, where the codec/plugin buffer starts */ 55/* End of the audio buffer, where the codec/plugin buffer starts */
56#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE) 56#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
57#define CODECORIG ENDAUDIOADDR
58
59/* .init is copied to codec buffer */
60#define INITORIG CODECORIG
61#define INITSIZE CODECSIZE
57 62
58MEMORY 63MEMORY
59{ 64{
60 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE 65 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
61 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE 66 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
62 FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE 67 FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE
68 INIT : ORIGIN = INITORIG, LENGTH = INITSIZE
63} 69}
70
64SECTIONS 71SECTIONS
65{ 72{
66 .flashheader : 73 .flashheader :
@@ -101,6 +108,7 @@ SECTIONS
101 .text LOADADDR(.data) + SIZEOF(.data) : 108 .text LOADADDR(.data) + SIZEOF(.data) :
102 { 109 {
103 *(.init.text) 110 *(.init.text)
111 KEEP(*(.startup*));
104 *(.text*) 112 *(.text*)
105 . = ALIGN(0x4); 113 . = ALIGN(0x4);
106 } > FLASH 114 } > FLASH
@@ -123,6 +131,17 @@ SECTIONS
123 _iramend = .; 131 _iramend = .;
124 } > IRAM 132 } > IRAM
125 133
134#ifdef HAVE_INIT_ATTR
135 .init INITORIG : AT ( _iramcopy + SIZEOF(.iram) )
136 {
137 _initstart = .;
138 *(.init*)
139 *(.initdata*)
140 _initend = .;
141 } > INIT
142 _initcopy = LOADADDR(.init);
143#endif
144
126 .ibss (NOLOAD) : 145 .ibss (NOLOAD) :
127 { 146 {
128 _iedata = .; 147 _iedata = .;