1/*
2 * Copyright (c) 2018 Synopsys, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/**
8 * @brief Linker script for the Synopsys ARC IoT Development Kit
9 */
10
11#include <devicetree.h>
12#include <autoconf.h>
13
14/*
15 * SRAM base address and size
16 *
17 */
18#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_sram), reg) && \
19    (DT_REG_SIZE(DT_CHOSEN(zephyr_sram)) > 0)
20#define SRAM_START		DT_REG_ADDR(DT_CHOSEN(zephyr_sram))
21#define SRAM_SIZE		DT_REG_SIZE(DT_CHOSEN(zephyr_sram))
22#endif
23
24#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_flash), reg) && \
25    (DT_REG_SIZE(DT_CHOSEN(zephyr_flash)) > 0)
26#define FLASH_START		DT_REG_ADDR(DT_CHOSEN(zephyr_flash))
27#define FLASH_SIZE		DT_REG_SIZE(DT_CHOSEN(zephyr_flash))
28#endif
29
30/* Instruction Closely Coupled Memory (ICCM) base address and size */
31#if DT_NODE_HAS_PROP(DT_INST(0, arc_iccm), reg) && \
32    (DT_REG_SIZE(DT_INST(0, arc_iccm)) > 0)
33#define ICCM_START		DT_REG_ADDR(DT_INST(0, arc_iccm))
34#define ICCM_SIZE		DT_REG_SIZE(DT_INST(0, arc_iccm))
35#endif
36
37/*
38 * DCCM base address and size. DCCM is the data memory.
39 */
40#if DT_NODE_HAS_PROP(DT_INST(0, arc_dccm), reg) && \
41    (DT_REG_SIZE(DT_INST(0, arc_dccm)) > 0)
42#define DCCM_START		DT_REG_ADDR(DT_INST(0, arc_dccm))
43#define DCCM_SIZE		DT_REG_SIZE(DT_INST(0, arc_dccm))
44#endif
45
46#include <arch/arc/v2/linker.ld>
47