Issues flashing D2WD/flash status meaning?
Posted: Thu Oct 26, 2017 9:07 am
Hi - am getting this issue on some D2WD devices - sometimes they will flash a few times and then start doing this:
$ make -j 32 flash
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
Flashing binaries to serial port /COM7 (app at offset 0x10000)...
esptool.py v2.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
Wrote 32768 bytes at 0x00001000 in 2.9 seconds (90.0 kbit/s)...
File md5: 080949b2e22ae4663b43068789233378
Flash md5: b57927e2a299d22002593e4cd309d763
MD5 of 0xFF is fb0d8f08f299b9d5a5a87d75bdfef241
A fatal error occurred: MD5 of file does not match data in flash!
make: *** [Makefile.projbuild:55: flash] Error 2
$ make -j 32 flash
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
Flashing binaries to serial port /COM7 (app at offset 0x10000)...
esptool.py v2.1
Connecting.......
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
Wrote 32768 bytes at 0x00001000 in 2.9 seconds (89.9 kbit/s)...
Hash of data verified.
Wrote 950272 bytes at 0x00010000 in 84.1 seconds (90.4 kbit/s)...
File md5: 7cf72d6f072c1c6a2c4e3c2e5b14bbaa
Flash md5: 373d45fa3eb34c14bae19cab9744889c
MD5 of 0xFF is 998b60ed802d5f8e9e0835b0a2459c83
A fatal error occurred: MD5 of file does not match data in flash!
make: *** [Makefile.projbuild:55: flash] Error 2
$ make -j 32 flash
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
Flashing binaries to serial port /COM7 (app at offset 0x10000)...
esptool.py v2.1
Connecting....
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
Wrote 32768 bytes at 0x00001000 in 2.9 seconds (89.6 kbit/s)...
File md5: 080949b2e22ae4663b43068789233378
Flash md5: 6cee48796391c29a95071e24ad733608
MD5 of 0xFF is fb0d8f08f299b9d5a5a87d75bdfef241
A fatal error occurred: MD5 of file does not match data in flash!
make: *** [Makefile.projbuild:55: flash] Error 2
$ python esptool.py --port /COM7 read_flash_status
esptool.py v2.1
Connecting........_____....._____.....
Detecting chip type... ESP32
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Status value: 0xff00
Hard resetting...
$ python esptool.py --port /COM7 flash_id
esptool.py v2.1
Connecting........_____....._____....._____....._____....._____....._____....._
Detecting chip type... ESP32
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Manufacturer: 9d
Device: 7015
Detected flash size: 2MB
Hard resetting...
$ python esptool.py --port /COM7 write_flash_status --non-volatile 0
esptool.py v2.1
Connecting......
Detecting chip type... ESP32
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Initial flash status: 0xff00
Setting flash status: 0x0000
After flash status: 0xff00
Hard resetting...
$
Any thoughts/solutions? What do the SPI flash status bits mean? And why can't it reset them? Thanks.
$ make -j 32 flash
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
Flashing binaries to serial port /COM7 (app at offset 0x10000)...
esptool.py v2.1
Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
Wrote 32768 bytes at 0x00001000 in 2.9 seconds (90.0 kbit/s)...
File md5: 080949b2e22ae4663b43068789233378
Flash md5: b57927e2a299d22002593e4cd309d763
MD5 of 0xFF is fb0d8f08f299b9d5a5a87d75bdfef241
A fatal error occurred: MD5 of file does not match data in flash!
make: *** [Makefile.projbuild:55: flash] Error 2
$ make -j 32 flash
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
Flashing binaries to serial port /COM7 (app at offset 0x10000)...
esptool.py v2.1
Connecting.......
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
Wrote 32768 bytes at 0x00001000 in 2.9 seconds (89.9 kbit/s)...
Hash of data verified.
Wrote 950272 bytes at 0x00010000 in 84.1 seconds (90.4 kbit/s)...
File md5: 7cf72d6f072c1c6a2c4e3c2e5b14bbaa
Flash md5: 373d45fa3eb34c14bae19cab9744889c
MD5 of 0xFF is 998b60ed802d5f8e9e0835b0a2459c83
A fatal error occurred: MD5 of file does not match data in flash!
make: *** [Makefile.projbuild:55: flash] Error 2
$ make -j 32 flash
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
project.mk:53: esp-idf build system only supports MSYS2 in "MINGW32" mode. Consult the ESP-IDF documentation for details.
Flashing binaries to serial port /COM7 (app at offset 0x10000)...
esptool.py v2.1
Connecting....
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 2MB
Wrote 32768 bytes at 0x00001000 in 2.9 seconds (89.6 kbit/s)...
File md5: 080949b2e22ae4663b43068789233378
Flash md5: 6cee48796391c29a95071e24ad733608
MD5 of 0xFF is fb0d8f08f299b9d5a5a87d75bdfef241
A fatal error occurred: MD5 of file does not match data in flash!
make: *** [Makefile.projbuild:55: flash] Error 2
$ python esptool.py --port /COM7 read_flash_status
esptool.py v2.1
Connecting........_____....._____.....
Detecting chip type... ESP32
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Status value: 0xff00
Hard resetting...
$ python esptool.py --port /COM7 flash_id
esptool.py v2.1
Connecting........_____....._____....._____....._____....._____....._____....._
Detecting chip type... ESP32
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Manufacturer: 9d
Device: 7015
Detected flash size: 2MB
Hard resetting...
$ python esptool.py --port /COM7 write_flash_status --non-volatile 0
esptool.py v2.1
Connecting......
Detecting chip type... ESP32
Chip is ESP32D2WDQ5 (revision 1)
Uploading stub...
Running stub...
Stub running...
Initial flash status: 0xff00
Setting flash status: 0x0000
After flash status: 0xff00
Hard resetting...
$
Any thoughts/solutions? What do the SPI flash status bits mean? And why can't it reset them? Thanks.