1/* 2 * Copyright (c) 2021 DENX Software Engineering GmbH 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7#include <zephyr/linker/iterable_sections.h> 8 9/** 10 * @file 11 * @brief Linker command/script file 12 * 13 * This is the linker script for ip_k66f board to allow ethernet 14 * interfaces placement. 15 */ 16 17/* 18 * Explicit placement of the ethernet interfaces 19 * 20 * eth0 is the "master" port for the DSA switch and hence shall be 21 * placed on the index (position) 1 (as net_if_get_by_index() uses 22 * internally '_net_if_list_start[index - 1]' linker generated symbol). 23 * 24 * lan{123} shall be placed afterwards (sorted) so the order will be 25 * correctly preserved. 26 * 27 * If ip_k66f have had eth1 interface - it shall be placed afterwards 28 * 29 * The last entry with `._net_if.static.*` is to accommodate ethernet 30 * interfaces created in tests/samples - like e.g. _net_if.static.eth_test) 31 * in tests/net/vlan/src/main.c 32 */ 33 34#define NETWORK_RAM_SECTIONS \ 35SECTION_DATA_PROLOGUE(net_if_area,,SUBALIGN(4)) \ 36{ \ 37 _net_if_list_start = .; \ 38 KEEP(*(._net_if.static.dts*)); \ 39 KEEP(*(SORT_BY_NAME(._net_if.static.dsa_slave*))); \ 40 KEEP(*(SORT_BY_NAME(._net_if.static.*))); \ 41 _net_if_list_end = .; \ 42} GROUP_DATA_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) \ 43ITERABLE_SECTION_RAM(net_if_dev, 4) \ 44ITERABLE_SECTION_RAM(net_l2, 4) \ 45ITERABLE_SECTION_RAM(eth_bridge, 4) 46 47#include <zephyr/arch/arm/cortex_m/scripts/linker.ld> 48