comparison Common/CPU1-F429.ld @ 391:27c56f1b1856 ImproveBluetooth

Move Constants and libm to start of firmware ROM block: This changes closes a not used memory gap between the vector table and the definition of the firmware version location. As result the overall image is about ~50k smaller
author ideenmodellierer
date Tue, 26 Nov 2019 18:02:48 +0100
parents a984d87a1ec0
children 3508e6dc4f22
comparison
equal deleted inserted replaced
387:0dbb74be972f 391:27c56f1b1856
96 /****************************************************************************/ 96 /****************************************************************************/
97 /*************************** Code and Data Sections *************************/ 97 /*************************** Code and Data Sections *************************/
98 SECTIONS 98 SECTIONS
99 { 99 {
100 /******************* NVIC reset and interupt vectors **********************/ 100 /******************* NVIC reset and interupt vectors **********************/
101
101 .isr_vector 0x08040000 : 102 .isr_vector 0x08040000 :
102 { 103 {
103 . = ALIGN(4); 104 . = ALIGN(4);
104 KEEP( *(.isr_vector) ) 105 KEEP( *(.isr_vector) )
105 KEEP(*(.init)) 106 KEEP(*(.init))
106 } >ROM 107 } >ROM
107 108
108 109
109 /* PROVIDE( firmware_FirmwareData = . );*/ 110 .StdLibs 0x08040200:
111 {
112 . = ALIGN(4);
113 *libm.a:*(*)
114 } >ROM
115
116 .rodata :
117 {
118 . = ALIGN(4);
119 *(.rodata) /* .rodata sections (constants, strings, etc.) */
120 *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
121 . = ALIGN(4);
122 } >ROM
123
124 /********************** Constant data into ROM memory *********************/
125
126
127 .ARM.extab : {
128 . = ALIGN(4);
129 *(.ARM.extab* .gnu.linkonce.armextab.*)
130 . = ALIGN(4);
131 } >ROM
132
133 .ARM : {
134 . = ALIGN(4);
135 __exidx_start = .;
136 *(.ARM.exidx*)
137 __exidx_end = .;
138 . = ALIGN(4);
139 } >ROM
140
141 .preinit_array :
142 {
143 . = ALIGN(4);
144 PROVIDE_HIDDEN( __preinit_array_start = . );
145 KEEP( *(.preinit_array*) )
146 PROVIDE_HIDDEN( __preinit_array_end = . );
147 . = ALIGN(4);
148 } >ROM
149
150 .init_array :
151 {
152 . = ALIGN(4);
153 PROVIDE_HIDDEN( __init_array_start = . );
154 KEEP( *(SORT(.init_array.*)) )
155 KEEP( *(.init_array*) )
156 PROVIDE_HIDDEN( __init_array_end = . );
157 . = ALIGN(4);
158 } >ROM
159
160 .fini_array :
161 {
162 . = ALIGN(4);
163 PROVIDE_HIDDEN( __fini_array_start = . );
164 KEEP( *(SORT(.fini_array.*)) )
165 KEEP( *(.fini_array*) )
166 PROVIDE_HIDDEN( __fini_array_end = . );
167 . = ALIGN(4);
168 } >ROM
169
170 /************* The program code and other data into ROM memory ************/
171
172
110 .firmware_FirmwareData 0x08050000 : { 173 .firmware_FirmwareData 0x08050000 : {
111 KEEP( *(.firmware_firmware_data) ) 174 KEEP( *(.firmware_firmware_data) )
112 } >ROM 175 } >ROM
113 176
114 .font_firmware_data 0x08132000 : { 177 .font_firmware_data 0x08132000 : {
115 KEEP( *(.font_firmware_data) ) 178 KEEP( *(.font_firmware_data) )
116 179
117 } >UPPER 180 } >UPPER
181
118 182
119 .text 0x08054000 : 183 .text 0x08054000 :
120 { 184 {
121 . = ALIGN(4); 185 . = ALIGN(4);
122 *(.text) /* .text sections (code) */ 186 *(.text) /* .text sections (code) */
127 . = ALIGN(4); 191 . = ALIGN(4);
128 _etext = .; /* define a global symbols at end of code */ 192 _etext = .; /* define a global symbols at end of code */
129 } >ROM 193 } >ROM
130 194
131 195
132 /********************** Constant data into ROM memory *********************/ 196
133 .rodata :
134 {
135 . = ALIGN(4);
136 *(.rodata) /* .rodata sections (constants, strings, etc.) */
137 *(.rodata*) /* .rodata* sections (constants, strings, etc.) */
138 . = ALIGN(4);
139 } >ROM
140
141 .ARM.extab : {
142 . = ALIGN(4);
143 *(.ARM.extab* .gnu.linkonce.armextab.*)
144 . = ALIGN(4);
145 } >ROM
146
147 .ARM : {
148 . = ALIGN(4);
149 __exidx_start = .;
150 *(.ARM.exidx*)
151 __exidx_end = .;
152 . = ALIGN(4);
153 } >ROM
154
155 .preinit_array :
156 {
157 . = ALIGN(4);
158 PROVIDE_HIDDEN( __preinit_array_start = . );
159 KEEP( *(.preinit_array*) )
160 PROVIDE_HIDDEN( __preinit_array_end = . );
161 . = ALIGN(4);
162 } >ROM
163
164 .init_array :
165 {
166 . = ALIGN(4);
167 PROVIDE_HIDDEN( __init_array_start = . );
168 KEEP( *(SORT(.init_array.*)) )
169 KEEP( *(.init_array*) )
170 PROVIDE_HIDDEN( __init_array_end = . );
171 . = ALIGN(4);
172 } >ROM
173
174 .fini_array :
175 {
176 . = ALIGN(4);
177 PROVIDE_HIDDEN( __fini_array_start = . );
178 KEEP( *(SORT(.fini_array.*)) )
179 KEEP( *(.fini_array*) )
180 PROVIDE_HIDDEN( __fini_array_end = . );
181 . = ALIGN(4);
182 } >ROM
183
184 /************* The program code and other data into ROM memory ************/
185
186 197
187 198
188 199
189 /************* Data and Structures at absolute address in ROM *************/ 200 /************* Data and Structures at absolute address in ROM *************/
190 201