OTA Firmware: Invalid app size
Posted: Sun Apr 12, 2020 9:26 pm
I have tried compiling the code both with my own modules in micropython/ports/esp8266/modules and with none of my modules present there. I am able to flash the ESP8266 with the signed firmware-ota.bin.ota file (the second flashing). This is what shows in the terminal when the reset button is pressed:
The ESP8266 4MB reboots until I unplug it. I thought at first it had to do with a missing main.py in the firmware and I added one to the inisetup.py script, but this does not seem to be the problem.
Any help will be greatly appreciated.
Thanks!
EDIT: Here is the code in boot8266.c in the yaota8266 project that triggers the OTA server over and over:
Code: Select all
boot8266
HW RTC Reset reason: 2
System reset reason: 1
Initial GPIO state: c0030031, OE: 0
RTC user memory: 746f617a 61746f61
Comparator: 746f6179 61746f61
Magic word in RTC memory not detected, continuing normally.
Invalid main app size: 1487058088
Running OTA
Any help will be greatly appreciated.
Thanks!
EDIT: Here is the code in boot8266.c in the yaota8266 project that triggers the OTA server over and over:
Code: Select all
bool check_main_app(void)
{
//_printf("check_main_app\n");
MD5_CTX ctx;
MD5Init(&ctx);
uint32_t off = MAIN_APP_OFFSET;
uint32_t sz = 0;
SPIRead(MAIN_APP_OFFSET + 0x8ffc, &sz, sizeof(sz));
if (sz > 800000) {
_printf("Invalid main app size: %u\n", sz);
return false;
}