Commit cee5708
Add WLED_QEMU workaround to skip ethernet hardware init
The firmware crashes in QEMU with LoadStorePIFAddrError when ETH.begin()
tries to access ethernet MAC hardware registers (emac_ll_clock_enable_rmii_output).
QEMU's open_eth model doesn't fully emulate these registers.
Solution:
- Added WLED_QEMU build flag to esp32_16MB_V4_M_eth_debug
- Modified initEthernet() to skip ETH.begin() when WLED_QEMU is defined
- Ethernet is marked as configured without hardware initialization
- Network stack still functions via QEMU's user-mode networking (slirp)
- HTTP server and web UI work normally
This allows QEMU testing to proceed past ethernet initialization without
crashing. The flag should only be used for QEMU testing builds.
Documentation updates:
- docs/QEMU-ISSUES.md: Added section on QEMU ethernet workaround
- e2e-tests/README.md: Updated troubleshooting with WLED_QEMU info
Addresses the LoadStorePIFAddrError crash decoded in comment 3693613428:
Backtrace showed crash at 0x401771aa in emac_ll_clock_enable_rmii_output
when ETH.begin() tried to access register at EXCVADDR: 0x3ff6980c
Co-authored-by: softhack007 <[email protected]>1 parent 4beb79b commit cee5708
File tree
4 files changed
+25
-1
lines changed- docs
- e2e-tests
- wled00
4 files changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
31 | 42 | | |
32 | 43 | | |
33 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
125 | 127 | | |
126 | | - | |
| 128 | + | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1862 | 1862 | | |
1863 | 1863 | | |
1864 | 1864 | | |
| 1865 | + | |
1865 | 1866 | | |
1866 | 1867 | | |
1867 | 1868 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1071 | 1071 | | |
1072 | 1072 | | |
1073 | 1073 | | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
1074 | 1083 | | |
1075 | 1084 | | |
1076 | 1085 | | |
| |||
1088 | 1097 | | |
1089 | 1098 | | |
1090 | 1099 | | |
| 1100 | + | |
1091 | 1101 | | |
1092 | 1102 | | |
1093 | 1103 | | |
| |||
0 commit comments