-
Notifications
You must be signed in to change notification settings - Fork 13.3k
OTA update fails with XMC Flash chip #7267
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
Did some test #6725 causes the issue. Using a eboot.elf version before this commit solves the problem |
Thanks @Jason2866 for the bissect ! |
Same problem for me on OTA only Start OK
I can upgrade firmware with serial COM only on 2.7.0 On version 2.6.3, all is ok, serial and OTA |
Hmm, ok, testing of OTA updates was shall we say "severely limited". There are two factors at play here - OR it is working and the code that tries to slow down the access is messing up. Either way, trying a build with XMC support disabled in the bootloader will give some insight. |
To whoever will test, the previous means:
|
Using a eboot.elf before the XMC PR works for my module with XMC flash (OTA with gzip and uncompressed too). @ChocolateFrogsNuts The OTA fails only if the XMC eboot.elf is used.
I am not using Linux. So i cant use the provided Makefile to build eboot.elf... |
All of my D1 Mini boards have XMC flash chips, if you need another test bunny. I'm not on Linux, either. 😄 I know I can OTA to the IP address directly, haven't been able to OTA via the GUI for some time; Bonjour Browser doesn't see it, nor does Service Browser on the Android phone. I'm pretty sure I updated to 2.7.0 dev on Saturday. edit: yep, I'm even with master, and it dies quietly after the OTA completes when going from the command line direct to the IP address with espota.py. It uploads, but the code doesn't run after the reset. |
See: esp8266/Arduino#7267 Using [Tasmota Hotfix: Use patched Core 2.7.0](https://github.com/arendst/Tasmota/pull/8342/files)
Tested. XMC Hotfix solves issue. OTA works again |
PR #7277 didn't fix it for me, even after doing "Erase all flash contents" with a fresh compile via serial upload with the new binary. I can still upload via serial, but OTA to the IP address hangs quietly on boot afterwards, and all I get is
I'm purely guessing that doing git fetch upstream and git rebase upstream/master should have pulled the replacement eboot.elf file from #7277 after it was merged. It has a time stamp from 30 minutes ago, so it ought to be the right file. Here's the MD5 I got on the file from the merged PR: If I have to delete my local files and fork and start from scratch, I'm OK with that. ;-) Right now it doesn't appear like it'll help. I copied an older eboot.elf from my desktop PC with a date of 4/18/2020 on top of the one on my laptop and it uploads and works via OTA now. edit: Never mind. After deleting everything and re-forking I was getting the older file from a different PR once I switched to it. |
getting this issue some CPU cycles now... I can replicate it, so will be working on a fix over the next few days I hope. |
Ok, so it appears that examining the flash speed registers to get appropriate values to use in eboot by printing them from within the sketch at various flash speed settings was the wrong approach - I needed to have eboot print them. Anyway, the fact that eboot already runs at 20mhz flash access no matter what speed is selected once the SDK/core starts means there is no need to have XMC support in eboot at all! The XMC chips only need special treatment (boosting the drive level) when at 40mhz and above, which never happens in eboot. I'll do a bit more testing and try breaking things with a power cycle during the eboot copy, but I can't see why that would be a problem now. I can also move spi_vendors.h back out of eboot into the core too. |
I added a couple of 2 second delays to eboot so I could pull the USB cable at a known point.
It would seem the RTC is losing the copy command when the power fails, thus resulting in no attempt to re-start the failed copy at power up! |
RTC is a SRAM, not an NVRAM, so that's expected, @ChocolateFrogsNuts. See #6538 |
ahh excellent... I can ignore that and just temporarily hack eboot to always copy while I test that the copy works ok from a cold boot. |
@ChocolateFrogsNuts #7307 has some additional info. |
PR #7317 should wrap this up. |
@ChocolateFrogsNuts tried PR #7317 OTA is working with. |
The relevant PRs are merged, so closing as already resolved. |
OTA update fails (used gz Tasmota firmware) when a XMC Flash is on the ESP board.
Module Model: ESP-12F Vendor: DOITING
Flash Chip Id 0x164020
To get it working (again) a serial flash is needed
Basic Infos
Platform
Settings in IDE
Problem Description
Flashing via serial does work and device works as expected.
Trying a OTA update results in this
Debug Messages
The text was updated successfully, but these errors were encountered: