From 2cd6ce9fb9c1c26a9a06d4d4b2f01040686d0f73 Mon Sep 17 00:00:00 2001 From: Thomas Altenbach Date: Thu, 2 May 2024 14:56:21 +0200 Subject: [PATCH] sim: Fix MCUBOOT_SWAP_USING_SCRATCH defined in direct-xip and ram-load When 'direct-xip' or 'ram-load' features were enabled, CONFIG_BOOT_SWAP_USING_SCRATCH and MCUBOOT_SWAP_USING_SCRATCH were defined even though swap using scratch wasn't used. This commit fixes the issue. Signed-off-by: Thomas Altenbach (cherry picked from commit 60806bce8e7803d7cd5ddbc2110deacff227652a) --- sim/mcuboot-sys/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/mcuboot-sys/build.rs b/sim/mcuboot-sys/build.rs index 4221292f..ea17d801 100644 --- a/sim/mcuboot-sys/build.rs +++ b/sim/mcuboot-sys/build.rs @@ -255,7 +255,7 @@ fn main() { if swap_move { conf.conf.define("MCUBOOT_SWAP_USING_MOVE", None); - } else if !overwrite_only { + } else if !overwrite_only && !direct_xip && !ram_load { conf.conf.define("CONFIG_BOOT_SWAP_USING_SCRATCH", None); conf.conf.define("MCUBOOT_SWAP_USING_SCRATCH", None); }