Infineon: Switch to 1.9.0 code base, add xmc7000 family support, refactor memory layer
diff --git a/sim/mcuboot-sys/build.rs b/sim/mcuboot-sys/build.rs
index 1a08741..294aea6 100644
--- a/sim/mcuboot-sys/build.rs
+++ b/sim/mcuboot-sys/build.rs
@@ -34,6 +34,7 @@
     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 max_align_32 = env::var("CARGO_FEATURE_MAX_ALIGN_32").is_ok();
 
     let mut conf = CachedBuild::new();
     conf.conf.define("__BOOTSIM__", None);
@@ -41,6 +42,13 @@
     conf.conf.define("MCUBOOT_USE_FLASH_AREA_GET_SECTORS", None);
     conf.conf.define("MCUBOOT_HAVE_ASSERT_H", None);
     conf.conf.define("MCUBOOT_MAX_IMG_SECTORS", Some("128"));
+
+    if max_align_32 {
+        conf.conf.define("MCUBOOT_BOOT_MAX_ALIGN", Some("32"));
+    } else {
+        conf.conf.define("MCUBOOT_BOOT_MAX_ALIGN", Some("8"));
+    }
+
     conf.conf.define("MCUBOOT_IMAGE_NUMBER", Some(if multiimage { "2" } else { "1" }));
 
     if downgrade_prevention && !overwrite_only {
@@ -163,9 +171,12 @@
         conf.conf.define("CONFIG_BOOT_SWAP_USING_SCRATCH", None);
         conf.conf.define("MCUBOOT_SWAP_USING_SCRATCH", None);
     }
+
     if swap_status {
         conf.conf.define("MCUBOOT_SWAP_USING_STATUS", None);
-        conf.conf.define("CY_FLASH_ALIGN", "512");
+        conf.conf.define("MEMORY_ALIGN", "512");
+        conf.conf.define("PLATFORM_MAX_TRAILER_PAGE_SIZE", "512");
+        conf.conf.define("SLOTS_FOR_IMAGE", "2");
         conf.conf.file("../../boot/bootutil/src/swap_status.c");
         conf.conf.file("../../boot/bootutil/src/swap_status_part.c");
         conf.conf.file("../../boot/bootutil/src/swap_status_misc.c");
@@ -375,6 +386,7 @@
     conf.file("../../boot/bootutil/src/fault_injection_hardening.c");
     conf.file("csupport/run.c");
     conf.conf.include("../../boot/bootutil/include");
+    conf.conf.include("../../boot/boot/bootutil/include/bootutil/fault_injection_hardening.h");
     conf.conf.include("csupport");
     conf.conf.include("../../boot/zephyr/include");
     conf.conf.debug(true);