File tree Expand file tree Collapse file tree 4 files changed +8
-0
lines changed Expand file tree Collapse file tree 4 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ validate-primary-slot = ["mcuboot-sys/validate-primary-slot"]
1414enc-rsa = [" mcuboot-sys/enc-rsa" ]
1515enc-kw = [" mcuboot-sys/enc-kw" ]
1616bootstrap = [" mcuboot-sys/bootstrap" ]
17+ multiimage = [" mcuboot-sys/multiimage" ]
1718
1819[dependencies ]
1920libc = " 0.2.0"
Original file line number Diff line number Diff line change @@ -33,6 +33,9 @@ enc-kw = []
3333# Allow bootstrapping an empty/invalid primary slot from a valid secondary slot
3434bootstrap = []
3535
36+ # Support multiple images (currently 2 instead of 1).
37+ multiimage = []
38+
3639[build-dependencies ]
3740cc = " 1.0.25"
3841
Original file line number Diff line number Diff line change @@ -17,13 +17,15 @@ fn main() {
1717 let enc_rsa = env:: var ( "CARGO_FEATURE_ENC_RSA" ) . is_ok ( ) ;
1818 let enc_kw = env:: var ( "CARGO_FEATURE_ENC_KW" ) . is_ok ( ) ;
1919 let bootstrap = env:: var ( "CARGO_FEATURE_BOOTSTRAP" ) . is_ok ( ) ;
20+ let multiimage = env:: var ( "CARGO_FEATURE_MULTIIMAGE" ) . is_ok ( ) ;
2021
2122 let mut conf = cc:: Build :: new ( ) ;
2223 conf. define ( "__BOOTSIM__" , None ) ;
2324 conf. define ( "MCUBOOT_HAVE_LOGGING" , None ) ;
2425 conf. define ( "MCUBOOT_USE_FLASH_AREA_GET_SECTORS" , None ) ;
2526 conf. define ( "MCUBOOT_HAVE_ASSERT_H" , None ) ;
2627 conf. define ( "MCUBOOT_MAX_IMG_SECTORS" , Some ( "128" ) ) ;
28+ conf. define ( "MCUBOOT_IMAGE_NUMBER" , Some ( if multiimage { "2" } else { "1" } ) ) ;
2729
2830 if bootstrap {
2931 conf. define ( "MCUBOOT_BOOTSTRAP" , None ) ;
Original file line number Diff line number Diff line change 1212#define DT_FLASH_AREA_IMAGE_0_ID 1
1313#define DT_FLASH_AREA_IMAGE_1_ID 2
1414#define DT_FLASH_AREA_IMAGE_SCRATCH_ID 3
15+ #define DT_FLASH_AREA_IMAGE_2_ID 4
16+ #define DT_FLASH_AREA_IMAGE_3_ID 5
1517
1618#endif /*__GENERATED_DTS_BOARD_H__*/
You can’t perform that action at this time.
0 commit comments