-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix repeat reboot bug when rfinit data is filled with 0xff #1500
Conversation
Does this reset the saved SSIDs etc? |
I don't support this for several reasons:
|
So let me get this straight:
If that's what's going, it sounds to me like we should be back to step 2 here. |
Hi @pjsg I've tested that whrite
So we can do this with no worries 😄 Hi @marcelstoer , your suggestions is very nice, and I will improve it. Now, I add address table to list init data addresses and blank addresses, and fixed an error links, (I feel) the document is more clear than before. And then I delete all hardcode and use esp_init_data_default.bin form espressif's SDK, not use specific version of esp_init_data_default.bin. Hi @jmattsson, the espressif's SDK always confused me, and will confused me in future, many strange change will appear in some days 😂 |
…escription. Add address table to list init data addresses and blank addresses. Add RF & SoC configuration and Wi-Fi configuration to overwrite confused and blank.bin
…ardcode and use esp_init_data_default.bin form espressif's SDK
I really think this issue is much bigger than the few code changes this PR proposes. I hope I don't open a can of worms but here's my story. I can't contribute code but I spend a lot of time answering questions on Stack Overflow and esp8266.com. 80% of them are from users stuck with flashing the firmware. 10% are from users who don't understand the asynchronous nature of NodeMCU. 9% ask how to implement a (HTTP) server and the remaining 1% are about deep sleep and hardware issues. One can always argue that users didn't read the manual thoroughly (they don't) or that they were simply too stupid to understand. One could also argue that if people "don't get it" it's because we don't explain things well enough. Or because the available tools are not simple enough. My guess is that only a very small fraction of our users actually build the firmware from scratch. And not even all of those few probably use the flash target in our Makefile. I see the following measures:
|
To make esp8266 easy to use is my objectives. Let me tell the history of NodeMCU Flasher. The espressif becomes open after nodemcu-devkit-0.9, and open-sorce many SDK's code. Now espressif open the firmware_download_protocol, so it is easier to do the same thing. Now it seems that nodemcu-flasher is becomes next XTCOM_UTIL, it is old. I always using esptool-ck and esptool.py to do that, but I think for beginner's a easily and cross-platform(also I'm using linux) GUI-flash-tool is important. Now the esptool.py is super fast because of Cesanta stub. I think write a beautiful GUI frontend for |
I use the cesanta version of esptool.py as it programs nice and fast and it just works. I feel that the user experience of flashing an image to the nodemcu board should be:
If rf cal data needs to be programmed, then we should do that. If other stuff needs to be done, then the firmware should do it (at least by default). If all else fails, and the board won't boot, then the sequence:
should have the best chance of making it work again. |
@marcelstoer, you wrote
and
The manual currently states that erasing the flash completely is all you need to do:
This is misleading and wrong, at least for 1.5.4.1, and I would not argue that users who believed it are "simply too stupid to understand". |
Meaning that erasing alone does not work? I can't verify that atm. Feel free to create a PR to correct that.
Neither do I. That sentence is in conditional, 3rd-person form on purpose. My point is that if lots of people don't understand our docs then it may be our fault. I hope this becomes clear if you read the entire comment. |
Yeah, erasing alone does not work. I will file a PR. I did understand the point of your comment, just wanted to make sure people were aware that the documentation is no longer accurate (which is a different problem than improving its form/structure). |
While I had been hoping to stay out of this, the rf_cal[0] != 0x05 issue hit me here as well, so I took some time off from the ESP32 work to sort this out. Please give PR #1526 a spin. It should fix this issue at the root. At least until Espressif pulls this rug out from underneath us too... The main downside is that we'll once again run the risk of going out-of-sync with the SDK's esp_init_data_default.bin. I left a comment in the code on how I think we might avoid that, but I don't have time to pursue that avenue at this point. Someone else is quite welcome to if that PR gets merged. |
Fix repeat reboot bug when rfinit data is filled with 0xff.
docs/en/*
.When erase a flash or fill flash with 0xff, using latest 19f80ab will cause reboot repeatly.
To verify this, I use these command below:
# erase flash ../tools/esptool.py --port /dev/ttyUSB0 erase_flash
# programming firmware ../tools/esptool.py --port /dev/ttyUSB0 write_flash -fm dio -fs 32m -ff 40m 0x00000 ../bin/0x00000.bin 0x10000 ../bin/0x10000.bin
After then I got repeatly reboot, so I changed baudrate to 74880 and listen the serial port:
and the mesage is output again and again:
The reason is printed at 74880 baud when reboot:
rf_cal[0] !=0x05,is 0xFF
So we should not believe
esp_init_data_default.bin
is optional in espressif's data sheet, the rf init data must write to flash before run nodemcu firmware.This change will write rf init data to flash when do
make flash512k
andmake flash4m
, and fix it.