Skip to content

Commit c7d8e03

Browse files
youssefz24kartben
authored andcommitted
soc: linker.ld: add linker script for stm32mp2x
Add a linker script for the stm32mp2x soc series. It includes the standard arm cortex-m linker and adds standard zephyr relocation sections. Replace the rom_start section name with .isr_vectors in the linker script. This is necessary for the zephyr firmware to be started by the remote proc driver which expects the section containing the vector table to be named .isr_vectors. Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
1 parent e3953f1 commit c7d8e03

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

soc/st/stm32/stm32mp2x/m33/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@
55
zephyr_include_directories(${ZEPHYR_BASE}/drivers)
66

77
zephyr_include_directories(.)
8+
9+
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")

soc/st/stm32/stm32mp2x/m33/linker.ld

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* linker.ld - Linker command/script file */
2+
3+
/*
4+
* Copyright (C) 2025 Savoir-faire Linux, Inc.
5+
*
6+
* SPDX-License-Identifier: Apache-2.0
7+
*/
8+
9+
#define rom_start .isr_vectors
10+
11+
#include <zephyr/arch/arm/cortex_m/scripts/linker.ld>
12+
13+
SECTIONS
14+
{
15+
/* Standard Zephyr relocation section */
16+
#include <zephyr/linker/rel-sections.ld>
17+
18+
#ifdef CONFIG_LLEXT
19+
#include <zephyr/linker/llext-sections.ld>
20+
#endif
21+
}

0 commit comments

Comments
 (0)