Comments (7)
@timkoers this should be already supported. Just keep in mind that the emulation performance is pretty low, since every operation is first represented as SPI commands (serialized to bytes) which are then handled by SPI Flash chip emulation layer. If you are running one of the flash related examples, you need to wait a fair bit, especially if the code is formatting a large partition.
from qemu.
The examples that I could find where of the SD MMC and the internal flash. I'd like to emulate an external SPI flash. Whilst your at it, would you mind providing an example on how to create such a image to be used during qemu emulation?
from qemu.
Okay, I understand your use case now. Indeed there is no support for emulating external flash in QEMU with ESP32. In principle this should be doable, need to create another instance of the SPI controller (SPI2) and attach a flash chip to it in the emulator.
I would suggest you to try the emulation of the internal flash, first. It's pretty slow, so please make sure it is okay for your purposes before we try to add support for external flash.
Regarding creating the flash image of an app, you can follow the instructions in this wiki section: https://github.com/espressif/qemu/wiki#build-test-app
from qemu.
Can I also use the vfs_fat filesystem on the internal flash, it doesn't look so
I do see that I can use the SD card with the FatFS filesystem, but then I'll need to change every initialization function to use the SD card instead of the spi flash when unit testing, which defeats the point of unit testing, since I want to test if the SPI flash works, instead of the SD card 😋
from qemu.
You should be able to use the filesystem in the internal flash, please refer to storage/wear_levelling example in ESP-IDF.
from qemu.
Closing this issue since support for esp_vfs_fat_spiflash_mount for the internal flash is currently available, and works in QEMU.
from qemu.
I'd still like to see this getting implemented for an external flash since I don't want to mess around with the internal flash as that contains the actual program.
from qemu.
Related Issues (20)
- ESP32: segfault in qemu_coroutine_switch (QEMU-137) HOT 3
- Unknown memory area 0x3ff5C000 HOT 6
- UART Echo Example not working as expected in ESP32C3 Qemu (QEMU-150) HOT 7
- Failed to burn efuses (QEMU-158) HOT 2
- Pre-encrypted firmware do not work on QEMU (QEMU-159) HOT 1
- ESP32C3 fails to boot with otadata partition and no factory app. (QEMU-160) HOT 15
- ASan issues (QEMU-161) HOT 1
- Write the secret key to BLK and QEMU will die and get stuck. (QEMU-162) HOT 1
- Bluetooth emulation for the esp32? (QEMU-166) HOT 1
- `nvs_flash_init` returns `ESP_ERR_NVS_NOT_INITIALIZED` (QEMU-171) HOT 1
- Crash when executing QEMU (QEMU-178) HOT 9
- ESP32C3 Qemu w64-mingw32 freeze with Arduino blink (QEMU-180) HOT 4
- Attach gdb or s argument shows duplicate yank instance (QEMU-183) HOT 2
- build fail on HEAD (QEMU-184) HOT 4
- binary install on ubuntu does not work. (QEMU-185) HOT 3
- Localization bios QEMU (QEMU-186) HOT 1
- ESP32 machines not available (QEMU-187) HOT 1
- Compilation help, no esp32 machine support after compilation (QEMU-200)
- ESP32-S3 documentation (QEMU-201) HOT 4
- ESP32-S3 Blink not working (QEMU-204)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qemu.