Skip to content

Commit e5dfccb

Browse files
Copilotsofthack007
andcommitted
Switch to esp32_16MB_V4_M_eth_debug build for QEMU tests
Changed all scripts and documentation to use the new debug ethernet build environment as requested: Workflow changes: - Build: esp32_16MB_V4_M_eth_debug (was esp32_4MB_V4_S_eth) - PlatformIO cache key updated - Firmware artifact paths updated Script changes: - run-qemu.sh: Default firmware dir updated - monitor-qemu.py: Default firmware dir updated Documentation changes: - e2e-tests/README.md: Updated commands and descriptions - docs/QEMU-ISSUES.md: Updated build info, added debug benefits The esp32_16MB_V4_M_eth_debug build provides: - 16MB flash (vs 4MB) - V4 Mainline variant (vs Sound Reactive) - Ethernet with ESP32-POE config - Debug capabilities for better crash analysis - WiFi disabled (required for QEMU) Co-authored-by: softhack007 <[email protected]>
1 parent 28a0d00 commit e5dfccb

File tree

5 files changed

+15
-14
lines changed

5 files changed

+15
-14
lines changed

.github/scripts/monitor-qemu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,5 @@ def monitor_output(firmware_dir):
8989
exception_lines = []
9090

9191
if __name__ == '__main__':
92-
firmware_dir = sys.argv[1] if len(sys.argv) > 1 else '.pio/build/esp32_4MB_V4_S_eth'
92+
firmware_dir = sys.argv[1] if len(sys.argv) > 1 else '.pio/build/esp32_16MB_V4_M_eth_debug'
9393
monitor_output(firmware_dir)

.github/scripts/run-qemu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
set -e
1111

12-
FIRMWARE_DIR="${1:-.pio/build/esp32_4MB_V4_S_eth}"
12+
FIRMWARE_DIR="${1:-.pio/build/esp32_16MB_V4_M_eth_debug}"
1313
QEMU_DIR="${2:-qemu-esp32}"
1414
HTTP_PORT="${3:-8080}" # Default to 8080 (non-privileged port)
1515

.github/workflows/qemu-e2e-test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
uses: actions/cache@v4
2828
with:
2929
path: ~/.platformio
30-
key: ${{ runner.os }}-pio-esp32_4MB_V4_S_eth-${{ hashFiles('**/platformio.ini') }}
30+
key: ${{ runner.os }}-pio-esp32_16MB_V4_M_eth_debug-${{ hashFiles('**/platformio.ini') }}
3131
restore-keys: |
32-
${{ runner.os }}-pio-esp32_4MB_V4_S_eth-
32+
${{ runner.os }}-pio-esp32_16MB_V4_M_eth_debug-
3333
3434
- name: Set up Python
3535
uses: actions/setup-python@v5
@@ -52,13 +52,13 @@ jobs:
5252
run: npm run build
5353

5454
- name: Build ESP32 firmware
55-
run: pio run -e esp32_4MB_V4_S_eth
55+
run: pio run -e esp32_16MB_V4_M_eth_debug
5656

5757
- name: Upload firmware artifacts
5858
uses: actions/upload-artifact@v4
5959
with:
6060
name: esp32-firmware
61-
path: .pio/build/esp32_4MB_V4_S_eth/
61+
path: .pio/build/esp32_16MB_V4_M_eth_debug/
6262
retention-days: 1
6363

6464
# Job 2: Test with QEMU ESP32
@@ -85,7 +85,7 @@ jobs:
8585
uses: actions/download-artifact@v4
8686
with:
8787
name: esp32-firmware
88-
path: .pio/build/esp32_4MB_V4_S_eth/
88+
path: .pio/build/esp32_16MB_V4_M_eth_debug/
8989

9090
- name: Install Node.js dependencies
9191
run: npm ci
@@ -116,7 +116,7 @@ jobs:
116116
- name: Start QEMU with WLED firmware in background
117117
run: |
118118
chmod +x .github/scripts/run-qemu.sh
119-
bash .github/scripts/run-qemu.sh .pio/build/esp32_4MB_V4_S_eth qemu-esp32 8080 > qemu-output.log 2>&1 &
119+
bash .github/scripts/run-qemu.sh .pio/build/esp32_16MB_V4_M_eth_debug qemu-esp32 8080 > qemu-output.log 2>&1 &
120120
echo "Waiting for QEMU to start and WLED to boot..."
121121
sleep 45
122122

docs/QEMU-ISSUES.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@
22

33
## Build Configuration
44

5-
**Important**: QEMU testing uses the **V4 Sound Reactive ethernet build** (`esp32_4MB_V4_S_eth`).
5+
**Important**: QEMU testing uses the **V4 Mainline ethernet debug build** (`esp32_16MB_V4_M_eth_debug`).
66

7-
### Why esp32_4MB_V4_S_eth Build?
7+
### Why esp32_16MB_V4_M_eth_debug Build?
88
- WiFi hardware is not emulated in QEMU
99
- WiFi initialization causes crashes in QEMU
1010
- Ethernet build uses `WLED_USE_ETHERNET` flag
1111
- Disables ESP-NOW with `WLED_DISABLE_ESPNOW` (requires WiFi)
1212
- Uses ESP32-POE board configuration (`WLED_ETH_DEFAULT=2`)
1313
- Allows network functionality without WiFi hardware
1414
- HTTP server works via emulated ethernet (open_eth model)
15+
- Debug build provides better crash analysis capabilities
1516

1617
### Ethernet Configuration for QEMU
1718
The build uses ESP32-POE board configuration (index 2):
@@ -76,7 +77,7 @@ ESP32 QEMU emulation is not perfect and has several known limitations:
7677
**Symptom**: Crashes when accessing I2C, SPI, or other peripherals
7778
**Cause**: Peripheral emulation is incomplete
7879
**Analysis**: Check which peripheral is being accessed in the backtrace
79-
**Solution**: These may be QEMU-specific issues
80+
**Solution**: These may be QEMU-specific issues, use ethernet debug build for better diagnostics
8081

8182
#### 3. Real Firmware Bugs
8283
**Symptom**: Crashes in application code (not hardware access)

e2e-tests/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ pip install -r requirements.txt
3131

3232
Test the actual firmware running in QEMU ESP32 emulator:
3333

34-
**Important**: Use the V4 Sound Reactive ethernet build for QEMU testing, as WiFi is not emulated and causes crashes.
34+
**Important**: Use the V4 Mainline ethernet debug build for QEMU testing, as WiFi is not emulated and causes crashes.
3535

3636
1. **Build the firmware**:
3737
```bash
3838
npm run build # Build web UI
39-
pio run -e esp32_4MB_V4_S_eth # Build V4 SR ethernet firmware (WiFi disabled, 15+ min first time)
39+
pio run -e esp32_16MB_V4_M_eth_debug # Build V4 M ethernet debug firmware (WiFi disabled, 15+ min first time)
4040
```
4141

4242
2. **Setup QEMU** (first time only):
@@ -46,7 +46,7 @@ Test the actual firmware running in QEMU ESP32 emulator:
4646

4747
3. **Run firmware in QEMU** (in a separate terminal):
4848
```bash
49-
bash .github/scripts/run-qemu.sh .pio/build/esp32_4MB_V4_S_eth qemu-esp32 8080
49+
bash .github/scripts/run-qemu.sh .pio/build/esp32_16MB_V4_M_eth_debug qemu-esp32 8080
5050
```
5151

5252
Wait ~30-45 seconds for ESP32 to boot and start the web server.

0 commit comments

Comments
 (0)