Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions sysbuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ function(bm_install_setup)
sysbuild_add_dependencies(FLASH ${DEFAULT_IMAGE} softdevice)
endif()
endif()

if(SB_CONFIG_BM_CRACEN_MICROCODE_LOAD_ONCE)
if(SB_CONFIG_BM_CRACEN_MICROCODE_LOAD_MCUBOOT)
set_config_bool(firmware_loader CONFIG_CRACEN_LOAD_MICROCODE n)
set_config_bool(mcuboot CONFIG_CRACEN_LOAD_MICROCODE y)
set_config_bool(${DEFAULT_IMAGE} CONFIG_CRACEN_LOAD_MICROCODE n)
else(SB_CONFIG_BM_CRACEN_MICROCODE_LOAD_FIRMWARE_LOADER)
set_config_bool(firmware_loader CONFIG_CRACEN_LOAD_MICROCODE y)
set_config_bool(${DEFAULT_IMAGE} CONFIG_CRACEN_LOAD_MICROCODE n)
endif()
endif()

endfunction()

function(${SYSBUILD_CURRENT_MODULE_NAME}_pre_cmake)
Expand Down
20 changes: 20 additions & 0 deletions sysbuild/Kconfig.bm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ config BM_BOOTLOADER_MCUBOOT

endchoice

config BM_CRACEN_MICROCODE_LOAD_ONCE
bool "Load CRACEN microcode once only"
depends on BM_CRACEN_MICROCODE_LOAD_MCUBOOT || BM_CRACEN_MICROCODE_LOAD_FIRMWARE_LOADER
help
If enabled, will only load microcode for CRACEN in the first system bootable image,
which will be either MCUboot or Firmware Loader, depending on project configuration.

if BM_BOOTLOADER_MCUBOOT

menu "MCUboot configuration"
Expand Down Expand Up @@ -101,6 +108,13 @@ endchoice

endmenu

config BM_CRACEN_MICROCODE_LOAD_MCUBOOT
bool
depends on BM_BOOTLOADER_MCUBOOT_SIGNATURE_TYPE_ED25519
default y
help
Hidden symbol indicating if MCUboot is using CRACEN.

endif # BM_BOOTLOADER_MCUBOOT

if !BM_BOOTLOADER_NONE
Expand Down Expand Up @@ -152,6 +166,12 @@ config BM_FIRMWARE_LOADER_IMAGE_PATH
help
Source directory of firmware loader image.

config BM_CRACEN_MICROCODE_LOAD_FIRMWARE_LOADER
bool
default y
help
Hidden symbol indicating if Firmware Loader is using CRACEN.

endif

endif
Expand Down
Loading