First Flash broken, possible to boot from other address than 0x0?

Rimann
Posts: 1
Joined: Thu May 04, 2017 1:06 am

First Flash broken, possible to boot from other address than 0x0?

Postby Rimann » Thu May 04, 2017 1:23 am

Hi, I have an esp-12 and the first 512kb to 1Mb of the 4Mb Flash are broken. They can not be flashed, no matter which tool, or which settings or which image I use. I tried 5 flashers, all failed with timeout or error.
But I can flash it and successfully verify the flash at 0x100000 (1Mb). So my question is can I modify some of the config settings to set the boot base address to 0x100000 instead of 0x0?

Example Flashing output:
~/Downloads/ESPlorer$ esptool.py --port /dev/ttyUSB0 --baud 9600 write_flash --verify 0x0 nodemcu-master-11-modules-2017-05-01-15-51-01-integer_2.bin
esptool.py v1.3
Connecting....
Auto-detected Flash size: 32m
Running Cesanta flasher stub...
Flash params set to 0x0040
Writing 602112 @ 0x0... 0 (0 %)
A fatal error occurred: Timed out waiting for packet header

~/Downloads/ESPlorer$ esptool.py --port /dev/ttyUSB0 --baud 9600 write_flash --verify 0x100000 nodemcu-master-11-modules-2017-05-01-15-51-01-integer_2.bin
esptool.py v1.3
Connecting....
Auto-detected Flash size: 32m
Running Cesanta flasher stub...
Wrote 602112 bytes at 0x100000 in 626.4 seconds (7.7 kbit/s)...
Leaving...
Verifying just-written flash...
Verifying 0x92430 (599088) bytes @ 0x00100000 in flash against nodemcu-master-11-modules-2017-05-01-15-51-01-integer_2.bin...
-- verify OK (digest matched)

User avatar
pratik
Posts: 349
Joined: Wed Jun 29, 2016 7:17 pm
Location: India
Contact:

Re: First Flash broken, possible to boot from other address than 0x0?

Postby pratik » Sun May 14, 2017 8:16 pm

The code execution must start from the beginning of the flash map. From there, you may jump and execute code from other sections. So you must be able to flash 0x0000 with either boot.bin (for FOTA mode) or eagle_flash.bin.
So there is no way you can start from other than location 0x0000, sorry! :(
Regards,
Pratik Panda
Website: http://www.PratikPanda.com

Custom firmware, Knowledge base and freelancing (ESP8266/ESP32):
http://www.iot-bits.com

Who is online

Users browsing this forum: No registered users and 1 guest