Zephyr API Documentation
3.0.0
A Scalable Open Source RTOS
|
|
3.0.0 |
Go to the source code of this file.
Macros | |
#define | LINKER_DT_NODE_REGION_NAME(node_id) DT_PROP_OR(node_id, zephyr_memory_region, DT_NODE_PATH(node_id)) |
Get the linker memory-region name. More... | |
#define | LINKER_DT_REGION_FROM_NODE(node_id, attr) |
Generate a linker memory region from a devicetree node. More... | |
#define LINKER_DT_NODE_REGION_NAME | ( | node_id | ) | DT_PROP_OR(node_id, zephyr_memory_region, DT_NODE_PATH(node_id)) |
Get the linker memory-region name.
This attempts to use the zephyr,memory-region property, falling back to the node path if it doesn't exist.
Example devicetree fragment:
/ { soc { sram1: memory@2000000 { zephyr,memory-region = "MY_NAME"; }; sram2: memory@2001000 { ... }; }; };
Example usage:
LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(sram1)) // "MY_NAME" LINKER_DT_NODE_REGION_NAME(DT_NODELABEL(sram2)) // "/soc/memory@2001000"
node_id | node identifier |
#define LINKER_DT_REGION_FROM_NODE | ( | node_id, | |
attr | |||
) |
Generate a linker memory region from a devicetree node.
node_id | devicetree node identifier with a <reg> property defining region location and size |
attr | region attributes to use (rx, rw, ...) |