Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
devicetree_regions.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021, Commonwealth Scientific and Industrial Research
3 * Organisation (CSIRO) ABN 41 687 119 230.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Generate memory regions from devicetree nodes.
8 */
9
10/* Declare a memory region */
11#define _REGION_DECLARE(name, attr, node) name(attr) : \
12 ORIGIN = DT_REG_ADDR(node), \
13 LENGTH = DT_REG_SIZE(node)
14
28#define LINKER_DT_REGION_FROM_NODE(name, attr, node_id) \
29 COND_CODE_1(DT_NODE_HAS_STATUS(node_id, okay), \
30 (_REGION_DECLARE(name, attr, node_id)), \
31 ())