-
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
Open
travis3630
wants to merge
3
commits into
nrfconnect:main
Choose a base branch
from
travis3630:NRFX-7040-nrf7120-add-tfm-ns-build
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
modules/trusted-firmware-m/tfm_boards/nrf7120_cpuapp/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
) |
23 changes: 23 additions & 0 deletions
23
modules/trusted-firmware-m/tfm_boards/nrf7120_cpuapp/config.cmake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
10 changes: 10 additions & 0 deletions
10
modules/trusted-firmware-m/tfm_boards/nrf7120_cpuapp/cpuarch.cmake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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__) |
10 changes: 10 additions & 0 deletions
10
modules/trusted-firmware-m/tfm_boards/nrf7120_cpuapp/ns/cpuarch_ns.cmake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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