-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32-PICO-D4 - Error: flash chip not supported #7
Comments
As a sanity check that I have switched to an ESP-WROOM-32 and was successfully able to flash with the same command |
Can you try with the latest master, which should give you the detected flash id in the error message |
Tried with ad983cb:
|
Greetings,
|
For what it's worth, I repeated the test using an Adafruit "FTDI Friend" USB-UART bridge, with the same results--although I didn't really expect the bridge to make a difference. I've been comparing the |
The solution here will probably be to add a |
That sounds like a reasonable fallback so that the tool can still be used if auto detection fails. Idea being look at the specific device you're using and pass the flash size (e.g. for the board I'm using, it'd be 4 MB)? |
It should be noted that the same device is detected without fail by Anyway, I added some logging which is not terribly useful (and my apologies that it logs decimal values in arrays, but I'm just getting started with Rust). When reading the flash ID:
Now, I hacked the code to accept
It seems that either |
Doing a little more digging, I stumbled onto something: To summarize, an
So I guess the Rust If there's a preferred approach, I'm happy to try implementing it, or at least help out somehow if I can. |
Actually it seems that there is a third, less troublesome option. A later comment in that thread makes the cryptic suggestion:
As a test, I hardcoded a parameter to the
So I would suggest that the solution is to implement the same |
Thanks for the research! it might be doable to try the different spi parameters automatically when the flash detect returns |
I'm not sure how many variations exist in the wild, but I could certainly start by implementing something that works for the PICO-D4. This would probably require checking additional registers to distinguish the PICO from other ESP32 variations; I've noticed that |
Seems that my recollection of |
@ubergeek801 can you verify that things are still working after merging 821cb2b |
I like your version better; it's certainly cleaner. However, there's a subtle issue when enabling/attaching to flash. The default all-zero parameter must be encoded as five bytes, or the command times out. (It's also possible that any parameters with leading and/or trailing zeroes also need an additional byte, but I have no way of knowing.) In other words, instead of this:
We need something like this:
(Note that |
I noticed the difference in numbers of 0's send to, but it didn't seem to make a difference in my own testing. I've fixed it now |
Detection seems to work perfectly now. Thanks! |
I have an ESP32-PICO-D4 with 4MB of flash, I believe something like (but potentially not exactly) this: https://www.aliexpress.com/item/4000473398801.html
I'm following along the xtensa-rust-quickstart, and rying to use cargo-espflash from Crates.io got me some unexpected errors:
Installing from this repo directly (via
cargo install --git https://github.com/esp-rs/espflash/ cargo-espflash
) seems to have gone better, but I get "flash chip not supported":Is this a limitation of the library currently, or potentially a bug? Whatever the solution, this may ultimately fix MabezDev/xtensa-rust-quickstart#30
The text was updated successfully, but these errors were encountered: