- Thu Jun 02, 2016 2:23 am
#48435
eduperez wrote:esptool.py (https://github.com/themadinventor/espto ... esptool.py) does not talk to the firmware (and does not use AT commands), but the bootloader: when you boot the ESP into "upload mode", it is the bootloader who listens to the serial connection and flashes the firmware; the interpreter for the AT commands is stored in the firmware, and gets wiped out each time you upload a new firmware.
Here's snippet of esptool.py
Code: Select all""" Send a request and read the response """
def command(self, op=None, data=None, chk=0):
if op is not None:
pkt = struct.pack('<BBHI', 0x00, op, len(data), chk) + data
self.write(pkt) esptool.py uses a serial port to write packet out to esp device based on the command op .
So, it got to have something on the esp device side to interprete what's esptool.py wanting to do. right?
So, if not the AT firmware interpreter then what is?
The function to program flash is SDK function SPI_flash_write.
My point is the flash itself cannot be empty, it got to have interpreter to figure what esptool.py wants to do. and it got to have SDK lib in flash to provide SPI_flash_write function to actually program the flash.
So, I am saying it cannot have esptool.py to program a blank flash device.