sim: Set version numbers in images
To make the images easier to identify during analysis, set the version
number. The major number tries to be set to the slot number, and the
build number is the byte offset.
diff --git a/sim/src/main.rs b/sim/src/main.rs
index 2c53d22..f077668 100644
--- a/sim/src/main.rs
+++ b/sim/src/main.rs
@@ -264,10 +264,10 @@
img_size: len as u32,
flags: 0,
ver: ImageVersion {
- major: 1,
+ major: (offset / (128 * 1024)) as u8,
minor: 0,
revision: 1,
- build_num: 1,
+ build_num: offset as u32,
},
_pad3: 0,
};