sim: Fit unit tests to larger write align values

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
diff --git a/sim/mcuboot-sys/Cargo.toml b/sim/mcuboot-sys/Cargo.toml
index 225ca0c..1f6b81c 100644
--- a/sim/mcuboot-sys/Cargo.toml
+++ b/sim/mcuboot-sys/Cargo.toml
@@ -80,9 +80,8 @@
 # Check (in software) against version downgrades.
 downgrade-prevention = []
 
-# Large write.  Not meaningful, but present here so that the
-# full-suite tests will work for this configuration.
-large-write = []
+# Support images with 32-byte maximum write alignment value.
+max-align-32 = []
 
 [build-dependencies]
 cc = "1.0.25"
diff --git a/sim/mcuboot-sys/build.rs b/sim/mcuboot-sys/build.rs
index eb3ab34..550d980 100644
--- a/sim/mcuboot-sys/build.rs
+++ b/sim/mcuboot-sys/build.rs
@@ -40,6 +40,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"));
+
+#[cfg(not(feature = "max-align-32"))]
+    conf.conf.define("MCUBOOT_BOOT_MAX_ALIGN", Some("8"));
+
+#[cfg(feature = "max-align-32")]
+    conf.conf.define("MCUBOOT_BOOT_MAX_ALIGN", Some("32"));
+
     conf.conf.define("MCUBOOT_IMAGE_NUMBER", Some(if multiimage { "2" } else { "1" }));
 
     if downgrade_prevention && !overwrite_only {
diff --git a/sim/mcuboot-sys/csupport/run.c b/sim/mcuboot-sys/csupport/run.c
index 6c61228..cb2016b 100644
--- a/sim/mcuboot-sys/csupport/run.c
+++ b/sim/mcuboot-sys/csupport/run.c
@@ -477,5 +477,5 @@
 
 uint32_t boot_magic_sz(void)
 {
-    return BOOT_MAGIC_SZ;
+    return BOOT_MAGIC_ALIGN_SIZE;
 }