arm64: linker: create region and section from zephyr,memory-region
In arm64 linker script, create a memory region and section for each device tree node with compatible string "zephyr,memory-region". Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
This commit is contained in:
parent
be307f8ad9
commit
abf90d4ad7
3 changed files with 4 additions and 22 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include <zephyr/linker/sections.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
|
||||
#include <zephyr/linker/devicetree_regions.h>
|
||||
#include <zephyr/linker/linker-defs.h>
|
||||
#include <zephyr/linker/linker-tool.h>
|
||||
|
||||
|
|
@ -66,6 +67,7 @@ MEMORY
|
|||
{
|
||||
FLASH (rx) : ORIGIN = ROM_ADDR, LENGTH = ROM_SIZE
|
||||
RAM (wx) : ORIGIN = RAM_ADDR, LENGTH = RAM_SIZE
|
||||
LINKER_DT_REGIONS()
|
||||
/* Used by and documented in include/linker/intlist.ld */
|
||||
IDT_LIST (wx) : ORIGIN = 0xFFFF8000, LENGTH = 32K
|
||||
}
|
||||
|
|
@ -333,6 +335,8 @@ SECTIONS
|
|||
|
||||
/DISCARD/ : { *(.note.GNU-stack) }
|
||||
|
||||
/* Sections generated from 'zephyr,memory-region' nodes */
|
||||
LINKER_DT_SECTIONS()
|
||||
|
||||
/* Must be last in romable region */
|
||||
SECTION_PROLOGUE(.last_section,,)
|
||||
|
|
|
|||
|
|
@ -5,19 +5,8 @@
|
|||
|
||||
#include <zephyr/linker/sections.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
#include <zephyr/linker/devicetree_regions.h>
|
||||
|
||||
#include <zephyr/linker/linker-defs.h>
|
||||
#include <zephyr/linker/linker-tool.h>
|
||||
|
||||
MEMORY
|
||||
{
|
||||
LINKER_DT_REGIONS()
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
LINKER_DT_SECTIONS()
|
||||
}
|
||||
|
||||
#include <zephyr/arch/arm64/scripts/linker.ld>
|
||||
|
|
|
|||
|
|
@ -6,19 +6,8 @@
|
|||
|
||||
#include <zephyr/linker/sections.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
#include <zephyr/linker/devicetree_regions.h>
|
||||
|
||||
#include <zephyr/linker/linker-defs.h>
|
||||
#include <zephyr/linker/linker-tool.h>
|
||||
|
||||
MEMORY
|
||||
{
|
||||
LINKER_DT_REGIONS()
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
LINKER_DT_SECTIONS()
|
||||
}
|
||||
|
||||
#include <zephyr/arch/arm64/scripts/linker.ld>
|
||||
|
|
|
|||
Loading…
Reference in a new issue