linker: Create sections from zephyr,memory-region nodes
Currently when a node has a 'zephyr,memory-region' compatible and a 'zephyr,memory-region' string property, a new memory region is created in the linker script. Having a memory region without a section to place variables in could be not that useful. With this patch we extend the memory-region mechanism to also create sections. The user can then place variables in the sections as usual by using for example the GCC attributes. Signed-off-by: Carlo Caione <ccaione@baylibre.com>
This commit is contained in:
parent
67ba9900f0
commit
bc72fb67b1
6 changed files with 92 additions and 0 deletions
|
@ -195,3 +195,8 @@ zephyr_linker_section_configure(SECTION .data ANY FLAGS "+RW")
|
|||
zephyr_linker_section_configure(SECTION .bss ANY FLAGS "+ZI")
|
||||
|
||||
include(${COMMON_ZEPHYR_LINKER_DIR}/debug-sections.cmake)
|
||||
|
||||
dt_comp_path(paths COMPATIBLE "zephyr,memory-region")
|
||||
foreach(path IN LISTS paths)
|
||||
zephyr_linker_dts_section(PATH ${path})
|
||||
endforeach()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue