linker: devicetree_regions: Add support memory region flag setting
Add `zephyr,memory-region-flags` for supporting memory region flags setting. For example, when the below node is in the devicetree, ``` test_sram: sram@20010000 { compatible = "zephyr,memory-region", "mmio-sram"; reg = < 0x20010000 0x1000 >; zephyr,memory-region = "FOOBAR"; zephyr,memory-region-flags = "rw"; }; ``` We get the following line in MEMORY section of linker script. ``` FOOBAR (rw) : ORIGIN = (0x20010000), LENGTH = (0x1000) ``` Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
parent
96f2b2f4bb
commit
624e051372
4 changed files with 112 additions and 29 deletions
|
@ -41,10 +41,9 @@ zephyr_linker_memory(NAME FLASH FLAGS rx START ${FLASH_ADDR} SIZE ${FLASH_SIZ
|
|||
zephyr_linker_memory(NAME RAM FLAGS wx START ${RAM_ADDR} SIZE ${RAM_SIZE})
|
||||
zephyr_linker_memory(NAME IDT_LIST FLAGS wx START ${IDT_ADDR} SIZE 2K)
|
||||
|
||||
# Only use 'rw' as FLAGS. It's not used anyway.
|
||||
dt_comp_path(paths COMPATIBLE "zephyr,memory-region")
|
||||
foreach(path IN LISTS paths)
|
||||
zephyr_linker_dts_memory(PATH ${path} FLAGS rw)
|
||||
zephyr_linker_dts_memory(PATH ${path})
|
||||
endforeach()
|
||||
|
||||
if(CONFIG_XIP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue