Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmake/extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3377,9 +3377,14 @@ function(zephyr_linker_dts_memory)

dt_reg_addr(addr PATH ${DTS_MEMORY_PATH})
dt_reg_size(size PATH ${DTS_MEMORY_PATH})
dt_prop(name PATH ${DTS_MEMORY_PATH} PROPERTY "memory-region")
if (NOT DEFINED name)
# Fallback to the node path
set(name ${DTS_MEMORY_PATH})
endif()
Comment on lines +3380 to +3383
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit, it's possible to do:

Suggested change
if (NOT DEFINED name)
# Fallback to the node path
set(name ${DTS_MEMORY_PATH})
endif()
set_ifndef(name ${DTS_MEMORY_PATH})

function(set_ifndef variable value)


zephyr_linker_memory(
NAME ${DTS_MEMORY_NAME}
NAME ${name}
START ${addr}
SIZE ${size}
FLAGS ${DTS_MEMORY_FLAGS}
Expand Down