Skip to content

Commit 15c2b2a

Browse files
committed
stm32cube: stm32n6: Allow building a chainloaded secure application
When building a chain-loaded secure application, build and call system_stm32n6_s.c file. Similarly to what is done on system_stm32n6xx_fsbl.c, remove CMSE_NS_ENTRY modifier as Secure FW has no entry funcs. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 468e5ad commit 15c2b2a

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

stm32cube/stm32n6xx/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# Copyright (c) 2025 STMicroelectronics
22
#
33
# SPDX-License-Identifier: Apache-2.0
4-
5-
zephyr_library_sources(soc/system_stm32n6xx_fsbl.c)
4+
if(CONFIG_BOOTLOADER_MCUBOOT)
5+
zephyr_include_directories(soc)
6+
zephyr_include_directories(soc/Templates)
7+
zephyr_library_sources(soc/system_stm32n6xx_s.c)
8+
else()
9+
zephyr_library_sources(soc/system_stm32n6xx_fsbl.c)
10+
endif()
611
zephyr_library_sources(drivers/src/stm32n6xx_hal.c)
712
zephyr_library_sources(drivers/src/stm32n6xx_hal_rcc.c)
813
zephyr_library_sources(drivers/src/stm32n6xx_hal_rcc_ex.c)

stm32cube/stm32n6xx/README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Patch List:
5252
which we don't need right now.
5353
Impacted files:
5454
-soc/system_stm32n6xx_fsbl.c
55+
-soc/system_stm32n6xx_s.c
5556

5657
*Fix SDIO initialization failure when skipping card identification sequence
5758
Fixes an issue in the STM32HN6 SDIO driver where HAL_SDIO_Init() fails if

stm32cube/stm32n6xx/soc/system_stm32n6xx_s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ void SystemCoreClockUpdate(void)
425425
* other parameters.
426426
* @retval SystemCoreClock value
427427
*/
428-
CMSE_NS_ENTRY uint32_t SECURE_SystemCoreClockUpdate(void)
428+
uint32_t SECURE_SystemCoreClockUpdate(void)
429429
{
430430
SystemCoreClockUpdate();
431431

0 commit comments

Comments
 (0)