scripts: gen_dts_cmake: emit properties for /aliases
This enables cmake extensions that can look up the path for any devicetree alias, or check if the alias is missing, etc. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
b65b49bef6
commit
17ae4fe05a
|
@ -88,6 +88,13 @@ def main():
|
|||
path = chosen_nodes[node].path
|
||||
cmake_props.append(f'"DT_CHOSEN|{node}" "{path}"')
|
||||
|
||||
# The separate loop over edt.nodes here is meant to keep
|
||||
# all of the alias-related properties in one place.
|
||||
for node in edt.nodes:
|
||||
path = node.path
|
||||
for alias in node.aliases:
|
||||
cmake_props.append(f'"DT_ALIAS|{alias}" "{path}"')
|
||||
|
||||
for node in edt.nodes:
|
||||
cmake_props.append(f'"DT_NODE|{node.path}" TRUE')
|
||||
|
||||
|
|
Loading…
Reference in New Issue