Skip to content

Commit fc080f7

Browse files
committed
M2354: Fix incorrect peripheral base with security
Import mcu partition header (renamed to partition_M2354_im.h) for resolving peripheral base with security. Though Mbed is non-secure only and needn't secure peripheral base, some BSP driver code still rely on it.
1 parent 50c1352 commit fc080f7

File tree

6 files changed

+803
-57
lines changed

6 files changed

+803
-57
lines changed

targets/TARGET_NUVOTON/TARGET_M2354/TARGET_TFM/TARGET_NU_M2354/COMPONENT_TFM_S_FW/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ target_link_libraries(mbed-m2354-tfm
1212
set(bl2 true)
1313
set(mcuboot_image_number 2)
1414
set(region_defs_h_path "${CMAKE_CURRENT_SOURCE_DIR}/partition/region_defs.h")
15+
set(partition_mcu_h_path "${CMAKE_CURRENT_SOURCE_DIR}/partition/partition_M2354_im.h")
1516
set(update_stage_sdh true)
1617
set(update_stage_flash false)
1718

@@ -35,8 +36,8 @@ target_compile_definitions(mbed-m2354-tfm
3536
INTERFACE
3637
NU_TFM_S_BL2=$<IF:$<BOOL:${bl2}>,1,0>
3738
NU_TFM_S_MCUBOOT_IMAGE_NUMBER=${mcuboot_image_number}
38-
# TODO: Fix escape sequence in NU_TFM_S_REGION_DEFS_H_PATH
39-
#NU_TFM_S_REGION_DEFS_H_PATH=\"${region_defs_h_path}\"
39+
NU_TFM_S_REGION_DEFS_H_PATH="${region_defs_h_path}"
40+
NU_TFM_S_PARTITION_MCU_H_PATH="${partition_mcu_h_path}"
4041
NU_TFM_S_UPDATE_STAGE_SDH=$<IF:$<BOOL:${update_stage_sdh}>,1,0>
4142
NU_TFM_S_UPDATE_STAGE_FLASH=$<IF:$<BOOL:${update_stage_flash}>,1,0>
4243
)

0 commit comments

Comments
 (0)