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 <sylvio.alves@espressif.com>
This commit is contained in:
Sylvio Alves 2023-09-26 07:53:18 -03:00 committed by Johan Hedberg
commit 4b5331ba45
5 changed files with 5 additions and 10 deletions

View file

@ -197,6 +197,7 @@ SECTIONS
#include <zephyr/linker/common-rom/common-rom-bt.ld> #include <zephyr/linker/common-rom/common-rom-bt.ld>
#include <zephyr/linker/common-rom/common-rom-debug.ld> #include <zephyr/linker/common-rom/common-rom-debug.ld>
#include <zephyr/linker/common-rom/common-rom-misc.ld> #include <zephyr/linker/common-rom/common-rom-misc.ld>
#include <snippets-sections.ld>
/* Create an explicit section at the end of all the data that shall be mapped into drom. /* Create an explicit section at the end of all the data that shall be mapped into drom.
* This is used to calculate the size of the _image_drom_size variable */ * This is used to calculate the size of the _image_drom_size variable */
@ -311,8 +312,6 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
} GROUP_LINK_IN(RAMABLE_REGION) } GROUP_LINK_IN(RAMABLE_REGION)
#include <snippets-sections.ld>
.dram0.data : .dram0.data :
{ {
. = ALIGN(4); . = ALIGN(4);

View file

@ -221,6 +221,7 @@ SECTIONS
#include <zephyr/linker/common-rom/common-rom-bt.ld> #include <zephyr/linker/common-rom/common-rom-bt.ld>
#include <zephyr/linker/common-rom/common-rom-debug.ld> #include <zephyr/linker/common-rom/common-rom-debug.ld>
#include <zephyr/linker/common-rom/common-rom-misc.ld> #include <zephyr/linker/common-rom/common-rom-misc.ld>
#include <snippets-sections.ld>
/* Create an explicit section at the end of all the data that shall be mapped into drom. /* Create an explicit section at the end of all the data that shall be mapped into drom.
* This is used to calculate the size of the _image_drom_size variable */ * This is used to calculate the size of the _image_drom_size variable */
@ -234,8 +235,6 @@ SECTIONS
_image_dram_size = LOADADDR(.dram0.end) + SIZEOF(.dram0.end) - _image_dram_start; _image_dram_size = LOADADDR(.dram0.end) + SIZEOF(.dram0.end) - _image_dram_start;
_image_dram_vaddr = ADDR(.dram0.data); _image_dram_vaddr = ADDR(.dram0.data);
#include <snippets-sections.ld>
.dram0.data : .dram0.data :
{ {
__data_start = ABSOLUTE(.); __data_start = ABSOLUTE(.);

View file

@ -212,6 +212,7 @@ SECTIONS
#include <zephyr/linker/common-rom/common-rom-bt.ld> #include <zephyr/linker/common-rom/common-rom-bt.ld>
#include <zephyr/linker/common-rom/common-rom-debug.ld> #include <zephyr/linker/common-rom/common-rom-debug.ld>
#include <zephyr/linker/common-rom/common-rom-misc.ld> #include <zephyr/linker/common-rom/common-rom-misc.ld>
#include <snippets-sections.ld>
/* Create an explicit section at the end of all the data that shall be mapped into drom. /* Create an explicit section at the end of all the data that shall be mapped into drom.
* This is used to calculate the size of the _image_drom_size variable */ * This is used to calculate the size of the _image_drom_size variable */
@ -225,8 +226,6 @@ SECTIONS
_image_dram_size = LOADADDR(.dram0.end) + SIZEOF(.dram0.end) - _image_dram_start; _image_dram_size = LOADADDR(.dram0.end) + SIZEOF(.dram0.end) - _image_dram_start;
_image_dram_vaddr = ADDR(.dram0.data); _image_dram_vaddr = ADDR(.dram0.data);
#include <snippets-sections.ld>
.dram0.data : .dram0.data :
{ {
__data_start = ABSOLUTE(.); __data_start = ABSOLUTE(.);

View file

@ -192,6 +192,7 @@ SECTIONS
#include <zephyr/linker/common-rom/common-rom-net.ld> #include <zephyr/linker/common-rom/common-rom-net.ld>
#include <zephyr/linker/common-rom/common-rom-debug.ld> #include <zephyr/linker/common-rom/common-rom-debug.ld>
#include <zephyr/linker/common-rom/common-rom-misc.ld> #include <zephyr/linker/common-rom/common-rom-misc.ld>
#include <snippets-sections.ld>
/* Create an explicit section at the end of all the data that shall be mapped into drom. /* Create an explicit section at the end of all the data that shall be mapped into drom.
* This is used to calculate the size of the _image_drom_size variable */ * This is used to calculate the size of the _image_drom_size variable */
@ -363,8 +364,6 @@ SECTIONS
. = ALIGN(8); . = ALIGN(8);
} GROUP_LINK_IN(RAMABLE_REGION) } GROUP_LINK_IN(RAMABLE_REGION)
#include <snippets-sections.ld>
.dram0.data : .dram0.data :
{ {
. = ALIGN (8); . = ALIGN (8);

View file

@ -229,6 +229,7 @@ SECTIONS
#include <zephyr/linker/common-rom/common-rom-bt.ld> #include <zephyr/linker/common-rom/common-rom-bt.ld>
#include <zephyr/linker/common-rom/common-rom-debug.ld> #include <zephyr/linker/common-rom/common-rom-debug.ld>
#include <zephyr/linker/common-rom/common-rom-misc.ld> #include <zephyr/linker/common-rom/common-rom-misc.ld>
#include <snippets-sections.ld>
/* Create an explicit section at the end of all the data that shall be mapped into drom. /* Create an explicit section at the end of all the data that shall be mapped into drom.
* This is used to calculate the size of the _image_drom_size variable */ * This is used to calculate the size of the _image_drom_size variable */
@ -426,8 +427,6 @@ SECTIONS
. = ALIGN(8) ; . = ALIGN(8) ;
} GROUP_LINK_IN(RAMABLE_REGION) } GROUP_LINK_IN(RAMABLE_REGION)
#include <snippets-sections.ld>
.dram0.data : .dram0.data :
{ {
. = ALIGN (8); . = ALIGN (8);