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>
This commit is contained in:
Youssef Zini 2025-04-22 14:38:47 +02:00 committed by Benjamin Cabé
commit c7d8e03ccf
2 changed files with 23 additions and 0 deletions

View file

@ -5,3 +5,5 @@
zephyr_include_directories(${ZEPHYR_BASE}/drivers)
zephyr_include_directories(.)
set(SOC_LINKER_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/linker.ld CACHE INTERNAL "")

View file

@ -0,0 +1,21 @@
/* linker.ld - Linker command/script file */
/*
* Copyright (C) 2025 Savoir-faire Linux, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
#define rom_start .isr_vectors
#include <zephyr/arch/arm/cortex_m/scripts/linker.ld>
SECTIONS
{
/* Standard Zephyr relocation section */
#include <zephyr/linker/rel-sections.ld>
#ifdef CONFIG_LLEXT
#include <zephyr/linker/llext-sections.ld>
#endif
}