Skip to content

Commit b8eb162

Browse files
authored
Fix mac address efuse (#871)
* Fix mac-address trickery * efuse update using esptool commit 90e3770c6716a2031d77d830c3455d40db648b0c
1 parent 4006bd0 commit b8eb162

File tree

10 files changed

+182
-132
lines changed

10 files changed

+182
-132
lines changed

espflash/src/targets/efuse/esp32.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This file was automatically generated, please do not edit it manually!
22
//!
3-
//! Generated: 2025-04-15 12:51
3+
//! Generated: 2025-05-30 12:24
44
//! Version: 369d2d860d34e777c0f7d545a7dfc3c4
55
66
#![allow(unused)]
@@ -21,9 +21,9 @@ pub(crate) const UART_DOWNLOAD_DIS: EfuseField = EfuseField::new(0, 0, 27, 1);
2121
/// reserved
2222
pub(crate) const RESERVED_0_28: EfuseField = EfuseField::new(0, 0, 28, 4);
2323
/// MAC address
24-
pub(crate) const MAC0: EfuseField = EfuseField::new(0, 1, 0, 32);
24+
pub(crate) const MAC0: EfuseField = EfuseField::new(0, 1, 32, 32);
2525
/// MAC address
26-
pub(crate) const MAC1: EfuseField = EfuseField::new(0, 2, 32, 16);
26+
pub(crate) const MAC1: EfuseField = EfuseField::new(0, 2, 64, 16);
2727
/// CRC8 for MAC address
2828
pub(crate) const MAC_CRC: EfuseField = EfuseField::new(0, 2, 80, 8);
2929
/// Reserved; it was created by set_missed_fields_in_regs func

espflash/src/targets/efuse/esp32c2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This file was automatically generated, please do not edit it manually!
22
//!
3-
//! Generated: 2025-04-22 11:33
3+
//! Generated: 2025-05-30 12:24
44
//! Version: 897499b0349a608b895d467abbcf006b
55
66
#![allow(unused)]

espflash/src/targets/efuse/esp32c3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This file was automatically generated, please do not edit it manually!
22
//!
3-
//! Generated: 2025-04-22 11:33
3+
//! Generated: 2025-05-30 12:24
44
//! Version: 4622cf9245401eca0eb1df8122449a6d
55
66
#![allow(unused)]

espflash/src/targets/efuse/esp32c5.rs

Lines changed: 169 additions & 118 deletions
Large diffs are not rendered by default.

espflash/src/targets/efuse/esp32c6.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This file was automatically generated, please do not edit it manually!
22
//!
3-
//! Generated: 2025-04-22 11:33
3+
//! Generated: 2025-05-30 12:24
44
//! Version: df46b69f0ed3913114ba53d3a0b2b843
55
66
#![allow(unused)]

espflash/src/targets/efuse/esp32h2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This file was automatically generated, please do not edit it manually!
22
//!
3-
//! Generated: 2025-04-22 11:33
3+
//! Generated: 2025-05-30 12:24
44
//! Version: 44563d2af4ebdba4db6c0a34a50c94f9
55
66
#![allow(unused)]

espflash/src/targets/efuse/esp32p4.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This file was automatically generated, please do not edit it manually!
22
//!
3-
//! Generated: 2025-04-22 11:33
3+
//! Generated: 2025-05-30 12:24
44
//! Version: 73787d3f5ae45b80abca925a7562120b
55
66
#![allow(unused)]
@@ -36,7 +36,7 @@ pub(crate) const SPI_DOWNLOAD_MSPI_DIS: EfuseField = EfuseField::new(0, 1, 45, 1
3636
/// enabled
3737
pub(crate) const DIS_TWAI: EfuseField = EfuseField::new(0, 1, 46, 1);
3838
/// Represents whether the selection between usb_to_jtag and pad_to_jtag through
39-
/// strapping gpio15 when both EFUSE_DIS_PAD_JTAG and EFUSE_DIS_USB_JTAG are
39+
/// strapping gpio34 when both EFUSE_DIS_PAD_JTAG and EFUSE_DIS_USB_JTAG are
4040
/// equal to 0 is enabled or disabled. 1: enabled. 0: disabled
4141
pub(crate) const JTAG_SEL_ENABLE: EfuseField = EfuseField::new(0, 1, 47, 1);
4242
/// Represents whether JTAG is disabled in soft way. Odd number: disabled. Even

espflash/src/targets/efuse/esp32s2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This file was automatically generated, please do not edit it manually!
22
//!
3-
//! Generated: 2025-04-22 11:33
3+
//! Generated: 2025-05-30 12:24
44
//! Version: 888a61f6f500d9c7ee0aa32016b0bee7
55
66
#![allow(unused)]

espflash/src/targets/efuse/esp32s3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! This file was automatically generated, please do not edit it manually!
22
//!
3-
//! Generated: 2025-04-22 11:33
3+
//! Generated: 2025-05-30 12:24
44
//! Version: 7127dd097e72bb90d0b790d460993126
55
66
#![allow(unused)]

xtask/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,11 @@ fn process_efuse_definitions(efuse_fields: &mut EfuseFields) -> Result<()> {
162162
let mac_attrs = yaml.fields.get("MAC").unwrap();
163163

164164
let mut mac0_attrs = mac_attrs.clone();
165-
mac0_attrs.start = 0;
166165
mac0_attrs.len = 32;
167166

168167
let mut mac1_attrs = mac_attrs.clone();
169-
mac1_attrs.word += 1;
170-
mac1_attrs.start = 32;
168+
mac1_attrs.start = mac0_attrs.start + 32;
169+
mac1_attrs.word = mac1_attrs.start / 32;
171170
mac1_attrs.len = 16;
172171

173172
yaml.fields.remove("MAC").unwrap();

0 commit comments

Comments
 (0)