Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
Fix the qemu codepath
Browse files Browse the repository at this point in the history
  • Loading branch information
lu-zero authored and ivmarkov committed Nov 27, 2023
1 parent d0abcd6 commit 58b9ea6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ BUILD=debug

TARGET=xtensa-esp32-espidf # Don't change this. Only the ESP32 chip is supported in QEMU for now

cargo +esp espflash save-image --features qemu --merge target/$TARGET/$BUILD/rust-esp32-std-demo.bin --chip esp32 -s 4mb -T partitions.csv
cargo espflash save-image --features qemu --merge target/$TARGET/$BUILD/rust-esp32-std-demo.bin --chip esp32 -s 4mb -T partitions.csv
$ESP_QEMU_PATH/qemu-system-xtensa -nographic -machine esp32 -nic user,model=open_eth,id=lo0,hostfwd=tcp:127.0.0.1:7888-:80 -drive file=target/$TARGET/$BUILD/rust-esp32-std-demo.bin,if=mtd,format=raw
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ fn main() -> Result<()> {
#[cfg(feature = "qemu")]
let eth = {
let mut eth = Box::new(esp_idf_svc::eth::EspEth::wrap(
esp_idf_svc::eth::EthDriver::new_openeth(peripherals.mac, sysloop.clone()),
))?;
esp_idf_svc::eth::EthDriver::new_openeth(peripherals.mac, sysloop.clone())?,
)?);
eth_configure(&sysloop, &mut eth)?;

eth
Expand Down

0 comments on commit 58b9ea6

Please sign in to comment.