@@ -29,6 +29,7 @@ pub trait ChipType {
2929 /// Get the firmware segments for writing an image to flash
3030 fn get_flash_segments < ' a > (
3131 image : & ' a FirmwareImage ,
32+ bootloader : Option < Vec < u8 > > ,
3233 partition_table : Option < PartitionTable > ,
3334 ) -> Box < dyn Iterator < Item = Result < RomSegment < ' a > , Error > > + ' a > ;
3435
@@ -113,12 +114,13 @@ impl Chip {
113114 pub fn get_flash_segments < ' a > (
114115 & self ,
115116 image : & ' a FirmwareImage ,
117+ bootloader : Option < Vec < u8 > > ,
116118 partition_table : Option < PartitionTable > ,
117119 ) -> Box < dyn Iterator < Item = Result < RomSegment < ' a > , Error > > + ' a > {
118120 match self {
119- Chip :: Esp32 => Esp32 :: get_flash_segments ( image, partition_table) ,
120- Chip :: Esp32c3 => Esp32c3 :: get_flash_segments ( image, partition_table) ,
121- Chip :: Esp8266 => Esp8266 :: get_flash_segments ( image, None ) ,
121+ Chip :: Esp32 => Esp32 :: get_flash_segments ( image, bootloader , partition_table) ,
122+ Chip :: Esp32c3 => Esp32c3 :: get_flash_segments ( image, bootloader , partition_table) ,
123+ Chip :: Esp8266 => Esp8266 :: get_flash_segments ( image, None , None ) ,
122124 }
123125 }
124126
0 commit comments