-
Notifications
You must be signed in to change notification settings - Fork 1.4k
boards: nordic: add support for TF-m to nrf7120 #24475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# | ||
# Copyright (c) 2025, Nordic Semiconductor ASA. | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
set(NRF_BOARD_SELECTED True) | ||
|
||
add_subdirectory(${Trusted\ Firmware\ M_SOURCE_DIR}/platform/ext/target/nordic_nrf/common/nrf7120 nrf7120) | ||
|
||
add_subdirectory(.. tfm_board) | ||
|
||
target_include_directories(platform_s | ||
PUBLIC | ||
${ZEPHYR_NRF_MODULE_DIR}/subsys/nrf_security/src/drivers/cracen/cracenpsa/include | ||
) | ||
|
||
target_sources(platform_s | ||
PRIVATE | ||
${ZEPHYR_NRF_MODULE_DIR}/soc/nordic/nrf71/soc.c | ||
) | ||
|
||
target_include_directories(platform_s | ||
PRIVATE | ||
${ZEPHYR_BASE}/modules/cmsis/ | ||
${ZEPHYR_NRF_MODULE_DIR}/soc/nordic/nrf71 | ||
${ZEPHYR_BASE}/soc/nordic/common | ||
) | ||
|
||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/ns/cpuarch_ns.cmake | ||
DESTINATION ${INSTALL_PLATFORM_NS_DIR} | ||
RENAME cpuarch.cmake) | ||
|
||
install(FILES config.cmake | ||
DESTINATION ${INSTALL_PLATFORM_NS_DIR}) | ||
|
||
install(FILES ../common/config.cmake | ||
DESTINATION ${INSTALL_PLATFORM_NS_DIR}/../common/) | ||
|
||
install(DIRECTORY ${Trusted\ Firmware\ M_SOURCE_DIR}/platform/ext/target/nordic_nrf/nrf7120pdk_nrf7120_cpuapp/tests | ||
DESTINATION ${INSTALL_PLATFORM_NS_DIR} | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#------------------------------------------------------------------------------- | ||
# Copyright (c) 2025, Nordic Semiconductor ASA. | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
#------------------------------------------------------------------------------- | ||
|
||
include(${CMAKE_CURRENT_LIST_DIR}/../common/config.cmake) | ||
|
||
set(NRF_SOC_VARIANT nrf7120 CACHE STRING "nRF SoC Variant") | ||
|
||
include(${PLATFORM_PATH}/common/${NRF_SOC_VARIANT}/config.cmake) | ||
|
||
# Override PS_CRYPTO_KDF_ALG | ||
set(PS_CRYPTO_KDF_ALG PSA_ALG_SP800_108_COUNTER_CMAC CACHE STRING "KDF Algorithm to use") | ||
|
||
# attest_hal.c includes bl_storage.h, which needs CONFIG_NRFX_MRAMC to be defined. | ||
# This is because bl_storage is a lib intended to be run from either the bootloader (Zephyr) or from TF-M. | ||
# This is independent from the NS image's CONFIG_NRFX_MRAMC, which must be disabled, so we can not inherit | ||
# this from app Kconfig. | ||
if(TFM_PARTITION_INITIAL_ATTESTATION) | ||
add_compile_definitions(CONFIG_NRFX_MRAMC) | ||
endif() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright (c) 2025, Nordic Semiconductor ASA. | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
set(PLATFORM_PATH platform/ext/target/nordic_nrf) | ||
|
||
include(${PLATFORM_PATH}/common/nrf7120/cpuarch.cmake) | ||
add_compile_definitions(__NRF_TFM__) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# Copyright (c) 2025, Nordic Semiconductor ASA. | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
set(PLATFORM_DIR ${CMAKE_CURRENT_LIST_DIR}) | ||
set(PLATFORM_PATH ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
include(${CMAKE_CURRENT_LIST_DIR}/common/nrf7120/cpuarch.cmake) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,7 +149,7 @@ manifest: | |
- name: trusted-firmware-m | ||
repo-path: sdk-trusted-firmware-m | ||
path: modules/tee/tf-m/trusted-firmware-m | ||
revision: b4dfb8e90f7a133a68fd6949bc24586af99a3e0c | ||
revision: 902f58b94409fa12a57e6b821592ea53d8dfef96 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This commit has now been polluted with other changes, please squash the commits because right now you are deleting things that are added in a previous commit which makes it confusing to review. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will fix everything when zephyrproject-rtos/zephyr#97474 ready |
||
- name: psa-arch-tests | ||
repo-path: sdk-psa-arch-tests | ||
path: modules/tee/tf-m/psa-arch-tests | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tejlmand I have created this new Kconfig in zephyr, so that all Kconfigs between nrf71x and nrf54lx can share the common properties, also i.e. many Kconfig that has
depend on (SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X)
can change todepend on NRF_PLATFORM_LUMOS
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accepted.