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
Rework flashing instructions to clarify need for SDK init data #1525
Conversation
Since 1.5.4.1, flashing `esp_init_data_default.bin` is no longer optional, even on a fully erased chip. Update documentation to clarify that it must be flashed anytime it is missing, or whenever the SDK version changes.
What does |
Sorry, that was just some cut and paste errors that made it into my PR description. Fixed. I don't think any of that made it into the documentation itself (but more eyes are welcome!). |
- `0x1fc000` for 2 MB | ||
- `0x3fc000` for 4 MB, modules like ESP-12E, NodeMCU devkit 1.0, WeMos D1 mini | ||
|
||
If you're not 100% sure what flash size you have, try other addresses. Sometimes module manufacturers install a larger flash chip than they advertise. |
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.
You could mention that the location depends on the size setting provided with the -fs
option and both have to be consistent. Thus "size of your flash memory" above doesn't refer to the physical size of the chip but to the size given with -fs
, as mentioned in https://github.com/themadinventor/esptool#flash-size---flash_size--fs.
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.
Good point, but the physical size of the chip does matter due to the "Self adjust flash size" in nodemcu_init
. On my 4 MB module, here's what happens:
- Erase chip
- Flash as a 2MB module with:
esptool.py write_flash -m qio -fs 16m 0x00000 combined.bin 0x1fc000 esp_init_data_default.bin
- At boot, NodeMCU runs, but reports "Self adjust flash size" and reboots
- ESP8266 is now stuck in a loop, printing ""rf_cal[0] !=0x05,is 0xFF"
I think that the "self adjust flash size" step can't work on a 1.5.4.1 firmware unless NodeMCU also moves the SDK data.
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.
Agreed. I really want the esp_init_data_default to be completely hidden from the user by default and have NodeMCU just Do The Right Thing automatically. Which, hopefully, we have in 1526. A user laying down custom init data should be optional, it's far too much a hassle otherwise, as @marcelstoer has discovered.
Before merging this, could you guys please try out #1526 ? It might avoid having to document this whole rf_cal[0] mess... |
Works for me (details at #1526). I can adjust this documentation to take that into account. I still think it's an overall improvement. |
- `0x1fc000` for 2 MB | ||
- `0x3fc000` for 4 MB, modules like ESP-12E, NodeMCU devkit 1.0, WeMos D1 mini | ||
|
||
If you're not 100% sure what flash size you have, try other addresses. Sometimes module manufacturers install a larger flash chip than they advertise. |
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 clarifying this @jimparis. Size spec while flashing vs. auto detection by the firmware - what a mess.
I tend to agree with Johny that users shouldn't have to deal with init data, but this also implies that the smart parts of the firmware have to be reliable and match all module configurations on the market.
For the docs: the user shall neither specify flash size nor init data since FW does the right thing (tm)?
Superseded by #1527 |
Addresses stuff raised in #1500.
dev
branch rather than formaster
.docs/en/*
.Since 1.5.4.1, flashing
esp_init_data_default.bin
is no longer optional, even on a fully erased chip. Update documentation to clarify that it must be flashed anytime it is missing, or whenever the SDK version changes. This restructures the document a bit in the process.