Closed sobolkz closed 2 years ago
Thanks, will look into these links.
Yes, sure. Download tool v. 3.9.2. As all before. Also, 16m1m was successfully flashed after it.
@TD-er Since how the bootloader are built for core 2.0.4 idk if using old tools is still working. There are NO defaults anymore in magic bytes firmware header.
Oh and just curious, why don't you have the option to not append the SHA digest when generating the factory bin?
esptool v4.1 does not patch the header if there is the SHA diggest. So the need to be stripped before to make it possible to do the needed header patching. In IDF this is not needed since the bootloaders are built together with the firmware with the settings made for size, speed and mode. This remove of the diggest is only possible in elf2image command. The command is in the changed platformio espressif framework
Yep, I know why it is needed when patching the speed/mode flags. But if it isn't possible to do so on "factory" images, then flashing using flash tools which may patch these on the fly will cause bootloops, right?
See annswer above. The firmware.img does not have anymore the diggest. So the needed header patching is now possible with esptool v4.1 too. The check for diggest and not to do patching (not to brake SHA) is introduced with esptool v4.x. Esptool v3.x patches always header. NO check! So this problem only arrives when using Esptool v4.
What state has the checkbox to change the bin? (not sure about the exact text) Does it allow to change the bin during flash or not? What does the flash tool show about the detected module? (flash frequency, flash mode, etc.)
As I use natuve Win tool Esspessif Download tool and remember option like "Do mot change the bin" always checked. Also it doesn't matter which type of flashing mode was used - it always use propriate type DIO or QIO. Also, as I wrote before @tonhuisman's old test release 16M8M can be successfully used with same tool and same flashing options.
Exactly old test release, stuff changed. Old may not working anymore!
Even Platformio guys seems sometimes a bit confused about. Did a PR https://github.com/platformio/platform-espressif32/pull/880
I'm testing now with only old one, because it's look like board HW independent issue. So, latest results - you build 3227 seems to work with 4M316k and 16M1M versions - I can upload this versions and use with backup. Version 16M8M LittleFS still can't be used - I can't restore backup. Board going to cyclic reboot after restoring, hardware power disconnection doesn't help. Also board going to reboot after PMS7003 was added at HWSerial1 or HWSerial2. I'll upload 16M1M version and will test it more detail.
2 days of testing- no issues. PMS7003 was changed to PMS5003ST, additional parameters was added for new events from this device - all looks good, some board stats:
So issues are introduced somewhere since that. Since we encounter no issues in Tasmota it has to do something related to Espeasy or the tools around used to build or flash.
@sobolkz Please try with flash mode qio
. This is the main change in core 2.0.4(.1) The way the bootloaders are builded has changed.
I recommend to set all boards to mode qio
since it makes no difference. ONLY the second stage bootloader enables the flash mode which is used finally!
In my experience strange errors that may occur does disappear by doing this.
Maybe we are not hit by this since we use dout
as standard flash mode for Tasmota.
It could be that the problem in this mode do not happen?!
ESPEasy uses flash-mode dout
by default, currently. We made a test build 2 days ago with qio
, but that wasn't an improvement
So issues are introduced somewhere since that. Since we encounter no issues in Tasmota it has to do something related to Espeasy or the tools around used to build or flash. @sobolkz Please try with flash mode
qio
. This is the main change in core 2.0.4(.1) The way the bootloaders are builded has changed. I recommend to set all boards to modeqio
since it makes no difference. ONLY the second stage bootloader enables the flash mode which is used finally! In my experience strange errors that may occur does disappear by doing this. Maybe we are not hit by this since we usedout
as standard flash mode for Tasmota. It could be that the problem in this mode do not happen?!
@Jason2866 , is it important, which tool should be used? As discussed with @TD-er some time ago - it can be sensitive for esptool. But as I use for las time only native Espressif win tool flash mode - it sholud like this one: I'll test it again for you, but as I remember - it was already tested yesterday, it's look like this option doesn't affected while ESPEasy .factory.bin used. Independent that I choose upload procedure was going without errors and final mode is DOUT or QIO is provided inside of FW file.
The DoNotChgBin
option is checked in your screenshot.
This means (or at least should mean) that no matter what you set in your SPI config there, or what is detected on the ESP unit, the flashed data should be exactly what was compiled.
However with that checkbox unchecked, or using other tools like esptool.py, the flash settings may be changed while flashing.
So this leaves us with several possible causes when flashing results in a boot loop (or other unexpected behavior) :
DoNotChgBin
checked)Even with all the SPI flash settings set correct, I am still a bit worried to why exactly your build did behave like it did. In other words, I am not 100% convinced that even though Ton's builds seem to work now, all new builds will too. The reason I'm still not convinced is simply because I am not sure about whether our explanation can explain all we're seeing.
Just read through the comments a bit more. The 4M build and 16M1M build both use SPIFFS. The 16M8M uses LittleFS. Maybe LittleFS is a bit more timing sensitive? Or maybe it uses a bit more low level function calls, making assumptions it shouldn't?
For Tasmota we only use LittleFS and it is in every Esp32x build. If there would be a general problem users would have opened issues in github
Mhh,. do you use ESPAsyncWebServer
? There was a problem in the past. Needs newest version to work together.
Nope, we don't use that one.
One point. I have no idea why the second stage bootloader does not switch in mode qio
. I did not managed. But this is not new, previous version did behave identically
Later this week I have some more time to do investigations around the qio miracle Will start with IDF examples. If qio mode is activated I will try this generated bootloader to use with Tasmota.
Closing issue due to solved by theme.
Hi all! Just checked latest mega-20220809 with Wemos D32 mini pro - it's look like an error in AdaGFX helper was expected. Mega-20220809 was uploaded to clean Wemos D32 mini pro, it can work without issues due ILI9341 plugin was enabled. After it board stopping to boot at ADAGFX helper initialization step:
Web server wasn't yet enabled, therefore only full reset can help to boot board again (with disabled ILI9341). I'll try to check latest build with @tonhuisman commit #3903