Skip to content

Commit 4b5331b

Browse files
sylvioalvesjhedberg
authored andcommitted
linker: esp32: move snippets-section within rom boundary
This will guarantee that application snippets will be placed into ROM section properly. Signed-off-by: Sylvio Alves <[email protected]>
1 parent ac67f24 commit 4b5331b

File tree

5 files changed

+5
-10
lines changed

5 files changed

+5
-10
lines changed

soc/riscv/espressif_esp32/esp32c3/default.ld

+1-2
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ SECTIONS
197197
#include <zephyr/linker/common-rom/common-rom-bt.ld>
198198
#include <zephyr/linker/common-rom/common-rom-debug.ld>
199199
#include <zephyr/linker/common-rom/common-rom-misc.ld>
200+
#include <snippets-sections.ld>
200201

201202
/* Create an explicit section at the end of all the data that shall be mapped into drom.
202203
* This is used to calculate the size of the _image_drom_size variable */
@@ -311,8 +312,6 @@ SECTIONS
311312
. = ALIGN(4);
312313
} GROUP_LINK_IN(RAMABLE_REGION)
313314

314-
#include <snippets-sections.ld>
315-
316315
.dram0.data :
317316
{
318317
. = ALIGN(4);

soc/xtensa/espressif_esp32/esp32/default.ld

+1-2
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ SECTIONS
221221
#include <zephyr/linker/common-rom/common-rom-bt.ld>
222222
#include <zephyr/linker/common-rom/common-rom-debug.ld>
223223
#include <zephyr/linker/common-rom/common-rom-misc.ld>
224+
#include <snippets-sections.ld>
224225

225226
/* Create an explicit section at the end of all the data that shall be mapped into drom.
226227
* This is used to calculate the size of the _image_drom_size variable */
@@ -234,8 +235,6 @@ SECTIONS
234235
_image_dram_size = LOADADDR(.dram0.end) + SIZEOF(.dram0.end) - _image_dram_start;
235236
_image_dram_vaddr = ADDR(.dram0.data);
236237

237-
#include <snippets-sections.ld>
238-
239238
.dram0.data :
240239
{
241240
__data_start = ABSOLUTE(.);

soc/xtensa/espressif_esp32/esp32_net/linker.ld

+1-2
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ SECTIONS
212212
#include <zephyr/linker/common-rom/common-rom-bt.ld>
213213
#include <zephyr/linker/common-rom/common-rom-debug.ld>
214214
#include <zephyr/linker/common-rom/common-rom-misc.ld>
215+
#include <snippets-sections.ld>
215216

216217
/* Create an explicit section at the end of all the data that shall be mapped into drom.
217218
* This is used to calculate the size of the _image_drom_size variable */
@@ -225,8 +226,6 @@ SECTIONS
225226
_image_dram_size = LOADADDR(.dram0.end) + SIZEOF(.dram0.end) - _image_dram_start;
226227
_image_dram_vaddr = ADDR(.dram0.data);
227228

228-
#include <snippets-sections.ld>
229-
230229
.dram0.data :
231230
{
232231
__data_start = ABSOLUTE(.);

soc/xtensa/espressif_esp32/esp32s2/default.ld

+1-2
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ SECTIONS
192192
#include <zephyr/linker/common-rom/common-rom-net.ld>
193193
#include <zephyr/linker/common-rom/common-rom-debug.ld>
194194
#include <zephyr/linker/common-rom/common-rom-misc.ld>
195+
#include <snippets-sections.ld>
195196

196197
/* Create an explicit section at the end of all the data that shall be mapped into drom.
197198
* This is used to calculate the size of the _image_drom_size variable */
@@ -363,8 +364,6 @@ SECTIONS
363364
. = ALIGN(8);
364365
} GROUP_LINK_IN(RAMABLE_REGION)
365366

366-
#include <snippets-sections.ld>
367-
368367
.dram0.data :
369368
{
370369
. = ALIGN (8);

soc/xtensa/espressif_esp32/esp32s3/default.ld

+1-2
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ SECTIONS
229229
#include <zephyr/linker/common-rom/common-rom-bt.ld>
230230
#include <zephyr/linker/common-rom/common-rom-debug.ld>
231231
#include <zephyr/linker/common-rom/common-rom-misc.ld>
232+
#include <snippets-sections.ld>
232233

233234
/* Create an explicit section at the end of all the data that shall be mapped into drom.
234235
* This is used to calculate the size of the _image_drom_size variable */
@@ -426,8 +427,6 @@ SECTIONS
426427
. = ALIGN(8) ;
427428
} GROUP_LINK_IN(RAMABLE_REGION)
428429

429-
#include <snippets-sections.ld>
430-
431430
.dram0.data :
432431
{
433432
. = ALIGN (8);

0 commit comments

Comments
 (0)