-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Verify firmware does not work after update. #7755
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
Comments
Your debug message shows a crash not on verify but on the Update. Looks like the crash in happening in Are you using a progress callback? |
Wow! Does this mean we can read the crash log from flash finally?? Sorry I think this was my bad. I had a line in the progress callback which printed out the progress but I used %s instead of %d in the print. I think that was the problem. Will test it asap. The firmware still can't verify tho. |
That solved the firmware update problem but the verify still presist. The problematic part was that: /*
* Setting up a firmware upload progress callback.
*/
Update.onProgress([this](unsigned int progress, unsigned int total){
int percent = (progress * 100) / total;
if( percent == latestUpdatePercent ){ return; }
latestUpdatePercent = percent;
if(isDebugOn){
debug.print(
DEBUG_INFO,
"Update progress: %d%%\n",
percent
);
}
serverSys.sendEvent("firmwareUpdate","Percent: %s", percent);
}); changed to /*
* Setting up a firmware upload progress callback.
*/
Update.onProgress([this](unsigned int progress, unsigned int total){
int percent = (progress * 100) / total;
if( percent == latestUpdatePercent ){ return; }
latestUpdatePercent = percent;
if(isDebugOn){
debug.print(
DEBUG_INFO,
"Update progress: %d%%\n",
percent
);
}
serverSys.sendEvent("firmwareUpdate","Percent: %d", percent);
}); |
If you use ESPInsights. Haven't played with it. It's been in IDF for a while but was recently added to Arduino level. I get the feeling it's still a work in progress. |
Never heard of it. Thank you i will look into. |
Board
ESP32-Wrover-E
Device Description
It is an ESP32-Wrover-E ( 16mb flash and 8mb psram )
Hardware Configuration
ETH,SPI,PSRAM,I2C heavy usage
Version
latest master (checkout manually)
IDE Name
PlatformIO
Operating System
Windows 11
Flash frequency
80mhz
PSRAM enabled
yes
Upload speed
115200
Description
I have overwritten the default
verifyRollbackLater()
function for my own to gain more controll over the firmware rollback process. It was working pretty good so far, but after an update it does not work anymore and i can't load a new firmware via HTTP anymore.My application called
verifyFirmware()
after startup at several seconds to ensure the new firmware is not crashing.If this function never called and the esp crashes, my application rolls back to it's previous state.
How it worked previously:
If
ota_state == ESP_OTA_IMG_PENDING_VERIFY
then we verified the formware and saved the running address to flash.Now it's just prints
[SYSTEM] - Verifying firmware...
and nothing more.Below is the relevant functions.
Sketch
Debug Message
Other Steps to Reproduce
This error happens as soon as i want to upload a new firmware via HTTP.
I think the problem is partition related since the firmware verify process does not end.
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: