@@ -29,6 +29,7 @@ pub trait ChipType {
29
29
/// Get the firmware segments for writing an image to flash
30
30
fn get_flash_segments < ' a > (
31
31
image : & ' a FirmwareImage ,
32
+ bootloader : Option < Vec < u8 > > ,
32
33
partition_table : Option < PartitionTable > ,
33
34
) -> Box < dyn Iterator < Item = Result < RomSegment < ' a > , Error > > + ' a > ;
34
35
@@ -113,12 +114,13 @@ impl Chip {
113
114
pub fn get_flash_segments < ' a > (
114
115
& self ,
115
116
image : & ' a FirmwareImage ,
117
+ bootloader : Option < Vec < u8 > > ,
116
118
partition_table : Option < PartitionTable > ,
117
119
) -> Box < dyn Iterator < Item = Result < RomSegment < ' a > , Error > > + ' a > {
118
120
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 ) ,
122
124
}
123
125
}
124
126
0 commit comments