File tree Expand file tree Collapse file tree 9 files changed +12
-1
lines changed Expand file tree Collapse file tree 9 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ impl<'a> IdfBootloaderFormat<'a> {
61
61
62
62
header. write_flash_config (
63
63
flash_size. unwrap_or_default ( ) ,
64
- flash_freq. unwrap_or_default ( ) ,
64
+ flash_freq. unwrap_or ( params . flash_freq ) ,
65
65
chip,
66
66
) ?;
67
67
@@ -303,6 +303,7 @@ pub mod tests {
303
303
0x1_0000 ,
304
304
0x3f_0000 ,
305
305
0 ,
306
+ FlashFrequency :: _40Mhz,
306
307
include_bytes ! ( "../../resources/bootloaders/esp32-bootloader.bin" ) ,
307
308
) ;
308
309
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const PARAMS: Esp32Params = Esp32Params::new(
23
23
0x1_0000 ,
24
24
0x3f_0000 ,
25
25
0 ,
26
+ FlashFrequency :: _40Mhz,
26
27
include_bytes ! ( "../../resources/bootloaders/esp32-bootloader.bin" ) ,
27
28
) ;
28
29
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ const PARAMS: Esp32Params = Esp32Params::new(
26
26
0x1_0000 ,
27
27
0x1f_0000 ,
28
28
12 ,
29
+ FlashFrequency :: _30Mhz,
29
30
include_bytes ! ( "../../resources/bootloaders/esp32c2-bootloader.bin" ) ,
30
31
) ;
31
32
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ const PARAMS: Esp32Params = Esp32Params::new(
26
26
0x1_0000 ,
27
27
0x3f_0000 ,
28
28
5 ,
29
+ FlashFrequency :: _40Mhz,
29
30
include_bytes ! ( "../../resources/bootloaders/esp32c3-bootloader.bin" ) ,
30
31
) ;
31
32
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const PARAMS: Esp32Params = Esp32Params::new(
23
23
0x1_0000 ,
24
24
0x3f_0000 ,
25
25
13 ,
26
+ FlashFrequency :: _40Mhz,
26
27
include_bytes ! ( "../../resources/bootloaders/esp32c6-bootloader.bin" ) ,
27
28
) ;
28
29
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const PARAMS: Esp32Params = Esp32Params::new(
24
24
0x1_0000 ,
25
25
0x3f_0000 ,
26
26
16 ,
27
+ FlashFrequency :: _24Mhz,
27
28
include_bytes ! ( "../../resources/bootloaders/esp32h2-bootloader.bin" ) ,
28
29
) ;
29
30
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const PARAMS: Esp32Params = Esp32Params::new(
25
25
0x1_0000 ,
26
26
0x10_0000 ,
27
27
2 ,
28
+ FlashFrequency :: _40Mhz,
28
29
include_bytes ! ( "../../resources/bootloaders/esp32s2-bootloader.bin" ) ,
29
30
) ;
30
31
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ const PARAMS: Esp32Params = Esp32Params::new(
23
23
0x1_0000 ,
24
24
0x10_0000 ,
25
25
9 ,
26
+ FlashFrequency :: _40Mhz,
26
27
include_bytes ! ( "../../resources/bootloaders/esp32s3-bootloader.bin" ) ,
27
28
) ;
28
29
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ pub struct Esp32Params {
133
133
pub app_addr : u32 ,
134
134
pub app_size : u32 ,
135
135
pub chip_id : u16 ,
136
+ pub flash_freq : FlashFrequency ,
136
137
pub default_bootloader : & ' static [ u8 ] ,
137
138
}
138
139
@@ -142,6 +143,7 @@ impl Esp32Params {
142
143
app_addr : u32 ,
143
144
app_size : u32 ,
144
145
chip_id : u16 ,
146
+ flash_freq : FlashFrequency ,
145
147
bootloader : & ' static [ u8 ] ,
146
148
) -> Self {
147
149
Self {
@@ -154,6 +156,7 @@ impl Esp32Params {
154
156
app_addr,
155
157
app_size,
156
158
chip_id,
159
+ flash_freq,
157
160
default_bootloader : bootloader,
158
161
}
159
162
}
You can’t perform that action at this time.
0 commit comments