Skip to content

Commit d090f3c

Browse files
Anton-TFadeaarm
authored andcommitted
Build: Fix stm32wba65i_dk platform build issues
- Use `tfm_s_bin` target, aligning with changes in the GNUARM toolchain. - Updated logic for emulating `mcuboot_config.h` used by FWU partition. - Move `BL2` before `secure_fw` because FWU partition depends on MCUBoot. Signed-off-by: Anton Komlev <[email protected]> Change-Id: I4a2935d68df52e9194c21ab7cf20aeecc63c5bb2
1 parent fb722f5 commit d090f3c

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ include(${TFM_TOOLCHAIN_FILE})
3737

3838
project("Trusted Firmware M" VERSION ${TFM_VERSION} LANGUAGES C CXX ASM)
3939

40+
if(BL2)
41+
add_subdirectory(bl2)
42+
endif()
43+
4044
add_subdirectory(lib/backtrace)
4145
add_subdirectory(lib/ext)
4246
add_subdirectory(lib/fih)
@@ -45,11 +49,7 @@ add_subdirectory(lib/tfm_log_unpriv)
4549
add_subdirectory(lib/tfm_vprintf)
4650
add_subdirectory(tools)
4751
add_subdirectory(secure_fw)
48-
4952
add_subdirectory(interface)
50-
if(BL2)
51-
add_subdirectory(bl2)
52-
endif()
5353

5454
if(BL1 AND PLATFORM_DEFAULT_BL1)
5555
add_subdirectory(bl1/bl1_2)

platform/ext/target/stm/common/stm32wbaxx/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2020-2022, Arm Limited. All rights reserved.
2+
# SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
33
# Copyright (c) 2021-2024 STMicroelectronics. All rights reserved.
44
#
55
# SPDX-License-Identifier: BSD-3-Clause
@@ -95,12 +95,6 @@ target_sources(platform_s
9595
${STM_COMMON_DIR}/hal/Native_Driver/low_level_rng.c
9696
)
9797

98-
# To compile FWU support and test, should add mcuboot_config.h file in mcuboot_config folder
99-
file(MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/../build-spe/bl2/ext/mcuboot/mcuboot_config)
100-
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/boards/mcuboot_config.h
101-
${CMAKE_INSTALL_PREFIX}/../build-spe/bl2/ext/mcuboot/mcuboot_config
102-
@ONLY)
103-
10498
target_compile_options(platform_s
10599
PUBLIC
106100
${COMPILER_CMSE_FLAG}

platform/ext/target/stm/stm32wba65i_dk/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#-------------------------------------------------------------------------------
2-
# Copyright (c) 2020, Arm Limited. All rights reserved.
2+
# SPDX-FileCopyrightText: Copyright The TrustedFirmware-M Contributors
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55
#
@@ -89,14 +89,14 @@ add_custom_target(tfm_s_fmw ALL SOURCES ${tfm_s_split_out})
8989
if(CMAKE_C_COMPILER STREQUAL "iccarm")
9090
add_custom_command(
9191
OUTPUT ${tfm_s_split_out}
92-
# DEPENDS tfm_s_binaries
92+
DEPENDS tfm_s_bin
9393
COMMAND ielftool --silent --exclude=.BL2_OTP --bin $<TARGET_FILE:tfm_s> ${tfm_s_bin_dir}/tfm_s_fmw.bin
9494
COMMAND ielftool --silent --only=.BL2_OTP --bin $<TARGET_FILE:tfm_s> ${tfm_s_bin_dir}/tfm_s_otp.bin
9595
)
9696
else()
9797
add_custom_command(
9898
OUTPUT ${tfm_s_split_out}
99-
# DEPENDS tfm_s_binaries
99+
DEPENDS tfm_s_bin
100100
COMMAND ${CMAKE_OBJCOPY} --remove-section .BL2_OTP -O binary $<TARGET_FILE:tfm_s> ${tfm_s_bin_dir}/tfm_s_fmw.bin
101101
COMMAND ${CMAKE_OBJCOPY} --only-section .BL2_OTP -O binary $<TARGET_FILE:tfm_s> ${tfm_s_bin_dir}/tfm_s_otp.bin
102102
)

0 commit comments

Comments
 (0)