-
Notifications
You must be signed in to change notification settings - Fork 7.7k
modules: mcuboot: enable support for RAMLOAD mode with revert #85254
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
5ce884e
a62c1e7
c9f27d1
cc38cf7
28790dc
42f5c3e
4129628
d683d7f
a31cf60
be54a7d
e0c40be
1b596bf
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 @@ | ||
CONFIG_USE_DT_CODE_PARTITION=y |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright (c) 2025 Tenstorrent AI ULC | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/* | ||
* Layout must match the hyperflash_ram_load overlay file within mcuboot | ||
* application configuration directory | ||
*/ | ||
|
||
/delete-node/ &sdram0; | ||
|
||
/ { | ||
sram@80007F00 { | ||
compatible = "zephyr,memory-region", "mmio-sram"; | ||
reg = <0x80007F00 0x100>; | ||
zephyr,memory-region = "RetainedMem"; | ||
status = "okay"; | ||
|
||
retainedmem { | ||
compatible = "zephyr,retained-ram"; | ||
status = "okay"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
boot_info0: boot_info@0 { | ||
compatible = "zephyr,retention"; | ||
status = "okay"; | ||
reg = <0x0 0x100>; | ||
}; | ||
}; | ||
}; | ||
|
||
chosen { | ||
zephyr,bootloader-info = &boot_info0; | ||
zephyr,sram = &sdram_split; | ||
}; | ||
|
||
/* | ||
* Adjust sdram0 to reserve first 30KB for MCUBoot, and | ||
* remaining 2KB for retained memory | ||
*/ | ||
sdram_split: sdram_split@80008000 { | ||
reg = <0x80008000 (0x2000000 - DT_SIZE_K(32))>; | ||
}; | ||
|
||
}; | ||
|
||
/* Reduce size of slot 0 to match slot 1 */ | ||
&slot0_partition { | ||
reg = <0x40000 0x300000>; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if("${FILE_SUFFIX}" STREQUAL "ram_load") | ||
set(mcuboot_EXTRA_DTC_OVERLAY_FILE "${CMAKE_CURRENT_LIST_DIR}/nrf52840dk_nrf52840_mcuboot_ram_load.overlay" CACHE INTERNAL "" FORCE) | ||
endif() | ||
|
||
find_package(Sysbuild REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
|
||
project(sysbuild LANGUAGES) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,11 @@ if(SB_CONFIG_BOOTLOADER_MCUBOOT) | |
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD y) | ||
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_XIP n) | ||
set_config_int(${ZCMAKE_APPLICATION} CONFIG_FLASH_SIZE 0) | ||
elseif(SB_CONFIG_MCUBOOT_MODE_RAM_LOAD_WITH_REVERT) | ||
# RAM load mode requires XIP be disabled and flash size be set to 0 | ||
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. Unrelated to the core of the PR, do you know why RAM_LOAD mode requires XIP=n, but SINGLE_APP_RAM_LOAD does not? 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 don't, no- not familiar with |
||
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_BOOTLOADER_MODE_RAM_LOAD_WITH_REVERT y) | ||
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_XIP n) | ||
set_config_int(${ZCMAKE_APPLICATION} CONFIG_FLASH_SIZE 0) | ||
elseif(SB_CONFIG_MCUBOOT_MODE_SINGLE_APP_RAM_LOAD) | ||
set_config_bool(${ZCMAKE_APPLICATION} CONFIG_MCUBOOT_BOOTLOADER_MODE_SINGLE_APP_RAM_LOAD y) | ||
elseif(SB_CONFIG_MCUBOOT_MODE_FIRMWARE_UPDATER) | ||
|
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.
Why remove integration platform from
sample.mcumgr.smp_svr.ram_load.serial
testcase?