-
Notifications
You must be signed in to change notification settings - Fork 1.4k
applications: nrf_desktop: nrf54h20: migrate to ironside se #24494
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
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,36 @@ | ||
/* | ||
* Copyright (c) 2025 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
#include "../../memory_map.dtsi" | ||
|
||
/* The nRF54H20 DK defines memory map using DTS. | ||
* Assign the bootloader partition to the MCUboot image. | ||
*/ | ||
/ { | ||
chosen { | ||
zephyr,code-partition = &cpuapp_boot_partition; | ||
}; | ||
}; | ||
|
||
/* Define the necessary aliases for the DTS partition nodes that contain the application and | ||
* radio images. | ||
*/ | ||
slot0_partition: &cpuapp_slot0_partition { | ||
label = "image-0"; | ||
}; | ||
|
||
slot1_partition: &cpuapp_slot1_partition { | ||
label = "image-1"; | ||
}; | ||
|
||
/* Remove the undefined property value from the disabled VPR cores to prevent build errors. */ | ||
MarekPieta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
&cpuflpr_vpr { | ||
/delete-property/ source-memory; | ||
}; | ||
|
||
&cpuppr_vpr { | ||
/delete-property/ source-memory; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MC4CAQAwBQYDK2VwBCIEIFe3odXpEgmHpGsRmLZkC9FS+DMxKO5yi6BmKTctX05/ | ||
-----END PRIVATE KEY----- |
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. Switch to HW crypto by enabling the nRF Security module with the next PR update operation. Apply to other MCUboot configurations. 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. addressed |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# Copyright (c) 2025 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
CONFIG_SIZE_OPTIMIZATIONS=y | ||
|
||
CONFIG_HW_STACK_PROTECTION=y | ||
CONFIG_MAIN_STACK_SIZE=10240 | ||
CONFIG_BOOT_BOOTSTRAP=n | ||
|
||
CONFIG_BOOT_VERSION_CMP_USE_BUILD_NUMBER=y | ||
|
||
CONFIG_FLASH=y | ||
# CONFIG_FPROTECT is not supported yet on the nRF54H20 SoC | ||
|
||
# Configure Zephyr system power management | ||
MarekPieta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# The Zephyr system power management is used by the MCUboot bootloader to detect wake-up from | ||
# S2RAM and redirect execution to the resume routine of the application image | ||
CONFIG_PM=y | ||
CONFIG_PM_S2RAM=y | ||
CONFIG_PM_S2RAM_CUSTOM_MARKING=y | ||
|
||
# Enable HW cryptography in the MCUboot bootloader and its dependencies | ||
# The PSA operations are handled by the SDFW Service Framework (SDFW) | ||
# that is enabled with the CONFIG_PSA_SSF_CRYPTO_CLIENT Kconfig option. | ||
CONFIG_NRF_SECURITY=y | ||
CONFIG_MULTITHREADING=y | ||
CONFIG_PSA_SSF_CRYPTO_CLIENT=y | ||
|
||
# Reduce memory consumption | ||
CONFIG_BOOT_BANNER=n | ||
CONFIG_NCS_BOOT_BANNER=n | ||
CONFIG_CLOCK_CONTROL=n | ||
CONFIG_SPI_NOR=n | ||
CONFIG_GPIO=n | ||
CONFIG_SERIAL=n | ||
CONFIG_CONSOLE=n | ||
CONFIG_UART_CONSOLE=n | ||
CONFIG_PRINTK=n | ||
CONFIG_USE_SEGGER_RTT=n | ||
|
||
# Use minimal C library instead of the Picolib | ||
MarekPieta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
CONFIG_MINIMAL_LIBC=y | ||
|
||
# Activate Link Time Optimization (LTO) | ||
CONFIG_LTO=y | ||
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y | ||
|
||
# Improve debugging experience by disabling reset on fatal error | ||
MarekPieta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
CONFIG_RESET_ON_FATAL_ERROR=n |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# Copyright (c) 2025 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
CONFIG_SIZE_OPTIMIZATIONS=y | ||
|
||
CONFIG_HW_STACK_PROTECTION=y | ||
CONFIG_MAIN_STACK_SIZE=10240 | ||
CONFIG_BOOT_BOOTSTRAP=n | ||
|
||
CONFIG_BOOT_VERSION_CMP_USE_BUILD_NUMBER=y | ||
|
||
CONFIG_FLASH=y | ||
# CONFIG_FPROTECT is not supported yet on the nRF54H20 SoC | ||
|
||
# Configure Zephyr system power management | ||
# The Zephyr system power management is used by the MCUboot bootloader to detect wake-up from | ||
# S2RAM and redirect execution to the resume routine of the application image | ||
CONFIG_PM=y | ||
CONFIG_PM_S2RAM=y | ||
CONFIG_PM_S2RAM_CUSTOM_MARKING=y | ||
|
||
# Enable HW cryptography in the MCUboot bootloader and its dependencies | ||
# The PSA operations are handled by the SDFW Service Framework (SDFW) | ||
# that is enabled with the CONFIG_PSA_SSF_CRYPTO_CLIENT Kconfig option. | ||
CONFIG_NRF_SECURITY=y | ||
CONFIG_MULTITHREADING=y | ||
CONFIG_PSA_SSF_CRYPTO_CLIENT=y | ||
|
||
# Reduce memory consumption | ||
CONFIG_BOOT_BANNER=n | ||
CONFIG_NCS_BOOT_BANNER=n | ||
CONFIG_CLOCK_CONTROL=n | ||
CONFIG_SPI_NOR=n | ||
CONFIG_GPIO=n | ||
CONFIG_SERIAL=n | ||
CONFIG_CONSOLE=n | ||
CONFIG_UART_CONSOLE=n | ||
CONFIG_PRINTK=n | ||
CONFIG_USE_SEGGER_RTT=n | ||
|
||
# Use minimal C library instead of the Picolib | ||
CONFIG_MINIMAL_LIBC=y | ||
|
||
# Activate Link Time Optimization (LTO) | ||
CONFIG_LTO=y | ||
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y | ||
|
||
# Improve debugging experience by disabling reset on fatal error | ||
CONFIG_RESET_ON_FATAL_ERROR=n |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# Copyright (c) 2025 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
CONFIG_SIZE_OPTIMIZATIONS=y | ||
|
||
CONFIG_HW_STACK_PROTECTION=y | ||
CONFIG_MAIN_STACK_SIZE=10240 | ||
CONFIG_BOOT_BOOTSTRAP=n | ||
|
||
CONFIG_BOOT_VERSION_CMP_USE_BUILD_NUMBER=y | ||
|
||
CONFIG_FLASH=y | ||
# CONFIG_FPROTECT is not supported yet on the nRF54H20 SoC | ||
|
||
CONFIG_RESET_ON_FATAL_ERROR=y | ||
|
||
# Configure Zephyr system power management | ||
# The Zephyr system power management is used by the MCUboot bootloader to detect wake-up from | ||
# S2RAM and redirect execution to the resume routine of the application image | ||
CONFIG_PM=y | ||
CONFIG_PM_S2RAM=y | ||
CONFIG_PM_S2RAM_CUSTOM_MARKING=y | ||
|
||
# Enable HW cryptography in the MCUboot bootloader and its dependencies | ||
# The PSA operations are handled by the SDFW Service Framework (SDFW) | ||
# that is enabled with the CONFIG_PSA_SSF_CRYPTO_CLIENT Kconfig option. | ||
CONFIG_NRF_SECURITY=y | ||
CONFIG_MULTITHREADING=y | ||
CONFIG_PSA_SSF_CRYPTO_CLIENT=y | ||
|
||
# Reduce memory consumption | ||
CONFIG_BOOT_BANNER=n | ||
CONFIG_NCS_BOOT_BANNER=n | ||
CONFIG_CLOCK_CONTROL=n | ||
CONFIG_SPI_NOR=n | ||
CONFIG_GPIO=n | ||
CONFIG_SERIAL=n | ||
CONFIG_CONSOLE=n | ||
CONFIG_UART_CONSOLE=n | ||
CONFIG_PRINTK=n | ||
CONFIG_USE_SEGGER_RTT=n | ||
|
||
# Use minimal C library instead of the Picolib | ||
CONFIG_MINIMAL_LIBC=y | ||
|
||
# Activate Link Time Optimization (LTO) | ||
CONFIG_LTO=y | ||
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# | ||
# Copyright (c) 2025 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
CONFIG_SIZE_OPTIMIZATIONS=y | ||
|
||
CONFIG_HW_STACK_PROTECTION=y | ||
CONFIG_MAIN_STACK_SIZE=10240 | ||
CONFIG_BOOT_BOOTSTRAP=n | ||
|
||
CONFIG_BOOT_VERSION_CMP_USE_BUILD_NUMBER=y | ||
|
||
CONFIG_FLASH=y | ||
# CONFIG_FPROTECT is not supported yet on the nRF54H20 SoC | ||
|
||
CONFIG_RESET_ON_FATAL_ERROR=y | ||
|
||
# Configure Zephyr system power management | ||
# The Zephyr system power management is used by the MCUboot bootloader to detect wake-up from | ||
# S2RAM and redirect execution to the resume routine of the application image | ||
CONFIG_PM=y | ||
CONFIG_PM_S2RAM=y | ||
CONFIG_PM_S2RAM_CUSTOM_MARKING=y | ||
|
||
# Enable HW cryptography in the MCUboot bootloader and its dependencies | ||
# The PSA operations are handled by the SDFW Service Framework (SDFW) | ||
# that is enabled with the CONFIG_PSA_SSF_CRYPTO_CLIENT Kconfig option. | ||
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. I would consider explicitly enabling the 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. No, we don't need it. However, disabling this Kconfig option doesn't change the memory footprint of the mcuboot image, so I think this Kconfig option is not even used for the nRF54H20 platform. I would leave the default configuration and let the bootloader team optimize the Kconfig set and get rid of unnecessary Kconfigs. 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. Contacting bootloader team regarding this might be a good idea. It would be great if the configuration could be improved here. |
||
CONFIG_NRF_SECURITY=y | ||
CONFIG_MULTITHREADING=y | ||
CONFIG_PSA_SSF_CRYPTO_CLIENT=y | ||
|
||
# Reduce memory consumption | ||
CONFIG_BOOT_BANNER=n | ||
CONFIG_NCS_BOOT_BANNER=n | ||
CONFIG_CLOCK_CONTROL=n | ||
CONFIG_SPI_NOR=n | ||
CONFIG_GPIO=n | ||
CONFIG_SERIAL=n | ||
CONFIG_CONSOLE=n | ||
CONFIG_UART_CONSOLE=n | ||
CONFIG_PRINTK=n | ||
CONFIG_USE_SEGGER_RTT=n | ||
|
||
# Use minimal C library instead of the Picolib | ||
CONFIG_MINIMAL_LIBC=y | ||
|
||
# Activate Link Time Optimization (LTO) | ||
CONFIG_LTO=y | ||
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright (c) 2025 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
&mram1x { | ||
/delete-node/ partitions; | ||
|
||
/* Redefine the "partitions" DTS node. */ | ||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
/* Partitions belonging to the MRAM_10 memory block. | ||
* The start of the MRAM_10 memory is reserved for internal IronSide SE firmware. | ||
*/ | ||
|
||
cpuapp_boot_partition: partition@30000 { | ||
MarekPieta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
reg = <0x30000 DT_SIZE_K(24)>; | ||
}; | ||
|
||
/* Due to the build system limitation, the allowed size of the application image | ||
* (configured by the code partition DTS node) is incorrectly increased by the size | ||
* allocated for the radio image. | ||
*/ | ||
cpuapp_slot0_partition: partition@36000 { | ||
reg = <0x36000 DT_SIZE_K(808)>; | ||
MarekPieta marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}; | ||
|
||
cpurad_slot0_partition: partition@c9000 { | ||
reg = <0xc9000 DT_SIZE_K(220)>; | ||
}; | ||
|
||
/* Partitions belonging to the MRAM_11 memory block. */ | ||
|
||
/* Due to the build system limitation, the allowed size of the application image | ||
* (configured by the code partition DTS node) is incorrectly increased by the size | ||
* allocated for the radio image. | ||
*/ | ||
cpuapp_slot1_partition: partition@100000 { | ||
reg = <0x100000 DT_SIZE_K(808)>; | ||
}; | ||
|
||
cpurad_slot1_partition: partition@193000 { | ||
reg = <0x193000 DT_SIZE_K(220)>; | ||
}; | ||
|
||
storage_partition: partition@1ca000 { | ||
reg = <0x1ca000 DT_SIZE_K(40)>; | ||
}; | ||
|
||
periphconf_partition: partition@1d4000 { | ||
reg = <0x1d4000 DT_SIZE_K(8)>; | ||
}; | ||
|
||
/* The end of the MRAM_11 memory is left unallocated. */ | ||
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. Note that in some future - there might be an allocation here for the SDFW recovery logic.
|
||
}; | ||
}; |
Uh oh!
There was an error while loading. Please reload this page.