Skip to content

Commit 6f7138a

Browse files
committed
script tinkering
* disable TG watchdogs * align port forwarding with espressif examples * show qemu output * adding link to esp-idf example
1 parent f79f0bd commit 6f7138a

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/scripts/run-qemu.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,15 @@ echo "Flash image created successfully"
7575
# Run QEMU ESP32
7676
# Note: ESP32 in QEMU has limited peripheral support
7777
# Network configuration uses user-mode networking with port forwarding
78+
# -nic user,model=open_eth,id=lo0,hostfwd=tcp:127.0.0.1:PORT_HOST-:PORT_GUEST # for port forwarding
79+
# -global driver=timer.esp32.timg,property=wdt_disable,value=true # disables TG watchdog timers
7880
echo "Starting QEMU..."
7981
${QEMU_BIN} \
8082
-nographic \
8183
-machine esp32 \
8284
-drive file=${FLASH_IMAGE},if=mtd,format=raw \
83-
-nic user,model=open_eth,hostfwd=tcp::${HTTP_PORT}-:80 \
85+
-nic user,model=open_eth,id=lo0,hostfwd=tcp::${HTTP_PORT}-:80 \
86+
-global driver=timer.esp32.timg,property=wdt_disable,value=true \
8487
-serial mon:stdio &
8588

8689
QEMU_PID=$!

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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_16MB_QEMU_debug qemu-esp32 8080 > qemu-output.log 2>&1 &
119+
bash .github/scripts/run-qemu.sh .pio/build/esp32_16MB_QEMU_debug qemu-esp32 8080 2>&1 | tee qemu-output.log &
120120
echo "Waiting for QEMU to start and WLED to boot..."
121121
sleep 45
122122
@@ -142,7 +142,7 @@ jobs:
142142
# Check for network/DHCP initialization in logs
143143
echo ""
144144
echo "=== Verifying Network Initialization ==="
145-
sleep 5 # Give a bit more time for network logs
145+
sleep 20 # Give a bit more time for network logs
146146
147147
if grep -i "ETH Started\|ETH Connected\|eth: link up" qemu-output.log > /dev/null 2>&1; then
148148
echo "✓ Ethernet initialization detected in logs"

wled00/wled.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,8 @@ bool WLED::initEthernet()
10761076
#ifdef WLED_QEMU
10771077
// QEMU: Skip hardware initialization - QEMU's open_eth doesn't fully emulate MAC registers
10781078
// The ethernet hardware init crashes with LoadStorePIFAddrError in emac_ll_clock_enable_rmii_output
1079+
// espresiv ecample on how to init open_eth:
1080+
// https://github.com/espressif/esp-afr-sdk/blob/release/v4.4/examples/common_components/protocol_examples_common/connect.c - look for esp_eth_mac_new_openeth()
10791081

10801082
// Don't call ETH.begin() - avoids MAC register crash
10811083
// But manually initialize lwIP and DHCP for QEMU

0 commit comments

Comments
 (0)