1/*
2 * Copyright (c) 2019 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
24/* Instruction Closely Coupled Memory (ICCM) base address and size */
25#if DT_NODE_HAS_PROP(DT_INST(0, arc_iccm), reg) && \
26    (DT_REG_SIZE(DT_INST(0, arc_iccm)) > 0)
27#define ICCM_START		DT_REG_ADDR(DT_INST(0, arc_iccm))
28#define ICCM_SIZE		DT_REG_SIZE(DT_INST(0, arc_iccm))
29#endif
30
31/*
32 * DCCM base address and size. DCCM is the data memory.
33 */
34/* Data Closely Coupled Memory (DCCM) base address and size */
35#if DT_NODE_HAS_PROP(DT_INST(0, arc_dccm), reg) && \
36    (DT_REG_SIZE(DT_INST(0, arc_dccm)) > 0)
37#define DCCM_START		DT_REG_ADDR(DT_INST(0, arc_dccm))
38#define DCCM_SIZE		DT_REG_SIZE(DT_INST(0, arc_dccm))
39#endif
40
41#include <zephyr/arch/arc/v2/xy_mem.ld>
42#include <zephyr/arch/arc/v2/linker.ld>
43