Skip to content

Commit 61b1174

Browse files
committed
boards: mps4: Enable non-secure variant support
Zephyr's TF-M has been aligned with upstream TF-M v2.2.0, which adds support for Corstone-320 (CS320). The previous commit also updates TF-M to fix compiler warnings seen with MPS4. So, with this update, enable build and execution of non-secure variants of MPS4-based boards. Signed-off-by: Sudan Landge <sudan.landge@arm.com>
1 parent de6edc1 commit 61b1174

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

boards/arm/mps4/board.cmake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@ if(CONFIG_ARM_PAC OR CONFIG_ARM_BTI)
3333
endif()
3434

3535
if(CONFIG_BUILD_WITH_TFM)
36-
set(ARMFVP_FLAGS ${ARMFVP_FLAGS} -a ${APPLICATION_BINARY_DIR}/zephyr/tfm_merged.hex)
36+
# Workaround: Use binary (.bin) format images until TF-M supports generating them in hex (.hex)
37+
# format. The image load addresses are referred from the TF-M official documentation at:
38+
# https://trustedfirmware-m.readthedocs.io/en/latest/platform/arm/mps4/corstone320/README.html
39+
set(ARMFVP_FLAGS ${ARMFVP_FLAGS}
40+
--data ${APPLICATION_BINARY_DIR}/tfm/bin/bl1_1.bin@0x11000000
41+
--data ${APPLICATION_BINARY_DIR}/tfm/bin/cm_provisioning_bundle.bin@0x12024000
42+
--data ${APPLICATION_BINARY_DIR}/tfm/bin/dm_provisioning_bundle.bin@0x1202aa00
43+
--data ${APPLICATION_BINARY_DIR}/tfm/bin/bl2_signed.bin@0x12031400
44+
-a ${APPLICATION_BINARY_DIR}/zephyr/tfm_merged.hex
45+
)
3746
endif()
3847

3948
# FVP Parameters

boards/arm/mps4/mps4_corstone315_fvp_ns.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ type: mcu
77
arch: arm
88
ram: 1024
99
flash: 512
10+
simulation:
11+
- name: armfvp
12+
exec: FVP_Corstone_SSE-315
1013
toolchain:
1114
- gnuarmemb
1215
- zephyr

boards/arm/mps4/mps4_corstone320_fvp_ns.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ type: mcu
77
arch: arm
88
ram: 1024
99
flash: 512
10+
simulation:
11+
- name: armfvp
12+
exec: FVP_Corstone_SSE-320
1013
toolchain:
1114
- gnuarmemb
1215
- zephyr

modules/trusted-firmware-m/Kconfig.tfm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ config TFM_BOARD
1212
string
1313
default "nxp/lpcxpresso55s69" if BOARD_LPCXPRESSO55S69_LPC55S69_CPU0_NS
1414
default "arm/mps2/an521" if BOARD_MPS2_AN521_CPU0_NS
15-
default "arm/mps3/corstone300/fvp" if BOARD_MPS3_CORSTONE300_FVP_NS
15+
default "arm/mps3/corstone300/fvp" if BOARD_MPS3_CORSTONE300_FVP_NS
1616
default "arm/mps3/corstone300/an547" if BOARD_MPS3_CORSTONE300_AN547_NS
1717
default "arm/mps3/corstone300/an552" if BOARD_MPS3_CORSTONE300_AN552_NS
1818
default "arm/mps3/corstone310/an555" if BOARD_MPS3_CORSTONE310_AN555_NS
19-
default "arm/mps3/corstone310/fvp" if BOARD_MPS3_CORSTONE310_FVP_NS
19+
default "arm/mps3/corstone310/fvp" if BOARD_MPS3_CORSTONE310_FVP_NS
20+
default "arm/mps4/corstone315" if BOARD_MPS4_CORSTONE315_FVP_NS
21+
default "arm/mps4/corstone320" if BOARD_MPS4_CORSTONE320_FVP_NS
2022
default "stm/b_u585i_iot02a" if BOARD_B_U585I_IOT02A
2123
default "stm/nucleo_l552ze_q" if BOARD_NUCLEO_L552ZE_Q
2224
default "stm/stm32l562e_dk" if BOARD_STM32L562E_DK

0 commit comments

Comments
 (0)