Upload to my ESP32 board was working fine yesterday, I had made no changes but suddenly uploads are not working fine, the firmware file is around 720KB but upload halts at 25KB transfer and throws a flash verify error:
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 2MB
Compressed 25504 bytes to 14987...
Writing at 0x00001000... (100 %)
Wrote 25504 bytes (14987 compressed) at 0x00001000 in 0.3 seconds (effective 597.8 kbit/s)...
File md5: 3ae26d559994cd531bc0bf49f23046a3
Flash md5: e666720ed1c825f6bbbee63fd458910c
MD5 of 0xFF is c14df0edbd07e54190878c348d133622
I tried upload manually via(same esptool version 2.6): python3 esptool.py -b 460800 write_flash 0x10000 firmware.bin and upload is successful.
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 2MB
Compressed 730656 bytes to 460406...
Wrote 730656 bytes (460406 compressed) at 0x00010000 in 10.5 seconds (effective 555.6 kbit/s)...
Hash of data verified.
Here is my Platform.ini file
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = espidf
monitor_speed = 115200
;upload_speed = 115200
; set frequency to 80MHz
board_build.f_flash = 80000000L
board_build.f_cpu = 40000000L
board_build.flash_mode = dio
board_upload.flash_size= 2MB
board_upload.maximum_size=2097152
board_build.partitions = partitions_example.csv
Partitions file:
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1M,
storage, data, spiffs, , 0xF0000,
Partiions configured in sdkconfig:
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_example.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_example.csv"
framework-espidf 3.40001.200521 (4.0.1)
tool-cmake 3.16.4
tool-esptoolpy 1.20600.0 (2.6.0)
tool-mkspiffs 2.230.0 (2.30)
tool-ninja 1.7.1
toolchain-esp32ulp 1.22851.191205 (2.28.51)
toolchain-xtensa32 2.80200.200827 (8.2.0)
Can anyone please help with this, I have to manually copy the firmware file and use the esptool command every time when upload is required.