Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By Arthur Dalosto
#90872 I am using an esp8266 and a serial adapter, I had already written and the esp was working, but today I decided to make a modification in the code and when loading the following error appeared:



Arduino: 1.8.13 (Windows 10), Placa:"Generic ESP8266 Module, 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 1, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"


Executable segment sizes:

IROM : 250500 - code in flash (default or ICACHE_FLASH_ATTR)

IRAM : 28220 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)

DATA : 1312 ) - initialized variables (global, static) in RAM/HEAP

RODATA : 2280 ) / 81920 - constants (global, static) in RAM/HEAP

BSS : 26136 ) - zeroed variables (global, static) in RAM/HEAP

he sketch uses 282312 bytes (29%) of storage space for programs. The maximum is 958448 bytes.

Global variables use 29728 bytes (36%) of dynamic memory, leaving 52192 bytes for local variables. The maximum is 81920 bytes.

C:\Users\arthu\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3 C:\Users\arthu\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/upload.py --chip esp8266 --port COM5 --baud 115200 --before default_reset --after hard_reset write_flash 0x0 C:\Users\arthu\AppData\Local\Temp\arduino_build_229946/sketch_mar17a.ino.bin

esptool.py v2.8

Serial port COM5

Connecting....

Chip is ESP8266EX

Features: WiFi

Crystal is 26MHz

MAC: 84:f3:eb:4b:f2:fb

Uploading stub...

Running stub...

Stub running...

Configuring flash size...

Traceback (most recent call last):

File "C:\Users\arthu\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.4/tools/upload.py", line 65, in <module>

esptool.main(cmdline)

File "C:/Users/arthu/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 2933, in main

detect_flash_size(esp, args)

File "C:/Users/arthu/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 2241, in detect_flash_size

flash_id = esp.flash_id()

File "C:/Users/arthu/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 607, in flash_id

return self.run_spiflash_command(SPIFLASH_RDID, b"", 24)

File "C:/Users/arthu/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 853, in run_spiflash_command

old_spi_usr = self.read_reg(SPI_USR_REG)

File "C:/Users/arthu/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 490, in read_reg

val, data = self.command(self.ESP_READ_REG, struct.pack('<I', addr))

File "C:/Users/arthu/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 347, in command

p = self.read()

File "C:/Users/arthu/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 292, in read

return next(self._slip_reader)

File "C:/Users/arthu/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool\esptool.py", line 2045, in slip_reader

raise FatalError("Timed out waiting for packet %s" % waiting_for)

esptool.FatalError: Timed out waiting for packet header

esptool.FatalError: Timed out waiting for packet header


I already uninstalled and installed arduino but the error persists, I updated all libraries and checked the hardware, everything is correct!
You do not have the required permissions to view the files attached to this post.
User avatar
By QuickFix
#90887
Arthur Dalosto wrote:esptool.FatalError: Timed out waiting for packet header

esptool.FatalError: Timed out waiting for packet header

This generally occurs when the ESP cannot be set into flash-mode.

Since the ESP-01 adapter board like yours doesn't support (at least a similar one I have ) automatic flash/reset mode, you'll have to do it manually.
How are you putting the board into flash mode? :idea:
User avatar
By Arthur Dalosto
#90895
QuickFix wrote:
Arthur Dalosto wrote:esptool.FatalError: Timed out waiting for packet header

esptool.FatalError: Timed out waiting for packet header

This generally occurs when the ESP cannot be set into flash-mode.

Since the ESP-01 adapter board like yours doesn't support (at least a similar one I have ) automatic flash/reset mode, you'll have to do it manually.
How are you putting the board into flash mode? :idea:


I put the GPI0 port in contact with GND to enter the recording mode, I had already done this and it had worked perfectly, I think I will compare another ESP and another serial adapter
User avatar
By QuickFix
#90900 Procedure to put an ESP into flash-mode:

    Make sure that both the GPIO0 and RESET lines are pulled HIGH with 10k - 12k resistors (if not already present) in their default state.

  • Pull and hold GPIO0 LOW (press and hold flash)
  • Pull RESET LOW (press the reset button) and back HIGH again (release the reset button) to its default state
  • Pull GPIO0 HIGH (release the flash button) to its default state
  • Start flashing
There's nothing to it really: above description took more effort to write then to actually put an ESP into flash mode.
The "Secret" is that you hold GPIO0 LOW while pressing RESET and in the default, resting, state both GPIO0 and RESET should be pulled HIGH with resistors, so check if your adapter does that (IIRC mine does).