-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
938 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ CONFIG_SEMIHOSTING=y | |
CONFIG_XTENSA_SIM=y | ||
CONFIG_XTENSA_VIRT=y | ||
CONFIG_XTENSA_XTFPGA=y | ||
CONFIG_XTENSA_ESP32=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
440ff71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet! 💯
I know this is still fresh.1 May I still ask if you could outline a small documentation how this is supposed to be used and what will be possible with it? When working on the Terkin Datalogger the other day, I would have loved such an infrastructure to be able to run code completely on my workstation.Footnotes
I now can see that this is already around for a while (https://github.com/espressif/qemu/releases). We probably should have used it earlier. Thank you! ↩
440ff71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amotl please take a look at https://github.com/espressif/qemu/wiki, it should give some general overview
440ff71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks pretty thorough, I can spot support for things like
esptool.py
, networking, and SD host controller emulation. Well done, thank you very much!If this is still the right spot, may I ask if support for Opencores Ethernet MAC will be accompanied by support to provide the networking emulation also as a WiFi device to the userspace program in the future? Or is it already possible?
440ff71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To answer myself here: In #23 you are stating that:
A quick search revealed that the repository
qemu_esp32
1, conceived by @Ebiroll, @sunnet-si and contributors, apparently supports mapping the Ethernet device communication to the WiFi stack already. I didn't research thoroughly, but @emb-team's patch to the ESP IDF 2 also seems to play a role here, as outlined at 3. Kudos!It might make sense to wrap that up into another issue on this repository instead of attached to this commit. I will do that later, sorry for the noise.
Footnotes
https://github.com/Ebiroll/qemu_esp32 ↩
https://github.com/emb-team/esp-idf-qemu/commit/5c0cbfaffbc0ad ↩
https://emb-team.com/esp32-wifi-ble-emulation-in-qemu/ ↩
440ff71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for letting me know about @emb-team's work. I was not aware of it!
I'll discuss with my colleagues responsible for the Wi-Fi stack and see if this could be integrated into ESP-IDF.
440ff71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a branch of this with wifi emulation here:
https://github.com/a159x36/qemu/commits/esp-dev
This emulates the actual wifi hardware so runs unmodified binaries (emb-team's wifi needs a modified wifi lib)
It emulates both station and access point modes.
The wifi hardware is here:
https://github.com/a159x36/qemu/blob/esp-dev/hw/misc/esp32_wifi.c
and the access point is here:
https://github.com/a159x36/qemu/blob/esp-dev/hw/misc/esp32_wifi_ap.c
(this also handles emulating a station when the esp32 is in ap mode)
If you want to see it working you can try a prebuilt emulator (linux, windows and macOS) by opening my demo code from the platformio ide here:
https://github.com/a159x36/TTGODemo