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 <thomas.altenbach@legrand.com>
(cherry picked from commit 60806bce8e)
This commit is contained in:
Thomas Altenbach 2024-05-02 14:56:21 +02:00 committed by Jamie McCrae
parent 3c2f837528
commit 2cd6ce9fb9
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}