Skip to content

Commit

Permalink
Update Qemu page (#146)
Browse files Browse the repository at this point in the history
* Update Qemu page

* back to use bash

* Back to use shell

Co-authored-by: Sergio Gasquez Arcos <[email protected]>

---------

Co-authored-by: Sergio Gasquez Arcos <[email protected]>
  • Loading branch information
kubo39 and SergioGasquez authored Mar 4, 2024
1 parent 02622cd commit 0e76579
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/tooling/simulating/qemu.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# QEMU

Espressif maintains a fork of QEMU in [espressif/QEMU][espressif-qemu] with the necessary patches to make it work on Espressif chips.
See the [QEMU wiki][qemu-wiki] for instructions on how to build QEMU and emulate projects with it.
See the [ESP-specific instructions for running QEMU][esp-qemu-doc] for instructions on how to build QEMU and emulate projects with it.

Once you have built QEMU, you should have the `qemu-system-xtensa` file.

[espressif-qemu]: https://github.com/espressif/qemu
[qemu-wiki]: https://github.com/espressif/qemu/wiki
[esp-qemu-doc]: https://github.com/espressif/esp-toolchain-docs/tree/main/qemu/esp32#overview

## Running Your Project Using QEMU

Expand All @@ -20,12 +20,14 @@ cargo espflash save-image --chip esp32 --merge <OUTFILE> --release
```

If you prefer to use [`espflash`][espflash], you can achieve the same result by building the project first and then generating image:

```shell
cargo build --release
espflash save-image --merge ESP32 target/xtensa-esp32-espidf/release/<NAME> <OUTFILE>
espflash save-image --chip ESP32 --merge target/xtensa-esp32-espidf/release/<NAME> <OUTFILE>
```

Now, run the image in QEMU:

```shell
/path/to/qemu-system-xtensa -nographic -machine esp32 -drive file=<OUTFILE>,if=mtd,format=raw
```
Expand Down

0 comments on commit 0e76579

Please sign in to comment.