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 <zephyr/devicetree.h>
12
13/*
14 * SRAM base address and size
15 *
16 */
17#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_sram), reg) && \
18    (DT_REG_SIZE(DT_CHOSEN(zephyr_sram)) > 0)
19#define SRAM_START		DT_REG_ADDR(DT_CHOSEN(zephyr_sram))
20#define SRAM_SIZE		DT_REG_SIZE(DT_CHOSEN(zephyr_sram))
21#endif
22
23#if DT_NODE_HAS_PROP(DT_CHOSEN(zephyr_flash), reg) && \
24    (DT_REG_SIZE(DT_CHOSEN(zephyr_flash)) > 0)
25#define FLASH_START		DT_REG_ADDR(DT_CHOSEN(zephyr_flash))
26#define FLASH_SIZE		DT_REG_SIZE(DT_CHOSEN(zephyr_flash))
27#endif
28
29/* Instruction Closely Coupled Memory (ICCM) base address and size */
30#if DT_NODE_HAS_PROP(DT_INST(0, arc_iccm), reg) && \
31    (DT_REG_SIZE(DT_INST(0, arc_iccm)) > 0)
32#define ICCM_START		DT_REG_ADDR(DT_INST(0, arc_iccm))
33#define ICCM_SIZE		DT_REG_SIZE(DT_INST(0, arc_iccm))
34#endif
35
36/*
37 * DCCM base address and size. DCCM is the data memory.
38 */
39#if DT_NODE_HAS_PROP(DT_INST(0, arc_dccm), reg) && \
40    (DT_REG_SIZE(DT_INST(0, arc_dccm)) > 0)
41#define DCCM_START		DT_REG_ADDR(DT_INST(0, arc_dccm))
42#define DCCM_SIZE		DT_REG_SIZE(DT_INST(0, arc_dccm))
43#endif
44
45#include <zephyr/arch/arc/v2/xy_mem.ld>
46#include <zephyr/arch/arc/v2/linker.ld>
47