sim: Support direct-xip configuration
Add simulator support for building the direct-xip configuration.
Although this builds, there are no tests that test any of the
functionality, so all current tests trivially pass.
Signed-off-by: David Brown <david.brown@linaro.org>
diff --git a/sim/mcuboot-sys/build.rs b/sim/mcuboot-sys/build.rs
index e4ceefc..f2649d3 100644
--- a/sim/mcuboot-sys/build.rs
+++ b/sim/mcuboot-sys/build.rs
@@ -31,6 +31,7 @@
let multiimage = env::var("CARGO_FEATURE_MULTIIMAGE").is_ok();
let downgrade_prevention = env::var("CARGO_FEATURE_DOWNGRADE_PREVENTION").is_ok();
let ram_load = env::var("CARGO_FEATURE_RAM_LOAD").is_ok();
+ let direct_xip = env::var("CARGO_FEATURE_DIRECT_XIP").is_ok();
let mut conf = cc::Build::new();
conf.define("__BOOTSIM__", None);
@@ -64,6 +65,10 @@
conf.define("IMAGE_EXECUTABLE_RAM_SIZE", "0x10000");
}
+ if direct_xip {
+ conf.define("MCUBOOT_DIRECT_XIP", None);
+ }
+
// Currently no more than one sig type can be used simultaneously.
if vec![sig_rsa, sig_rsa3072, sig_ecdsa, sig_ed25519].iter()
.fold(0, |sum, &v| sum + v as i32) > 1 {