Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esptool 2.6 binaries errors on windows #445

Closed
denisfou opened this issue Jul 14, 2019 · 7 comments
Closed

esptool 2.6 binaries errors on windows #445

denisfou opened this issue Jul 14, 2019 · 7 comments

Comments

@denisfou
Copy link

denisfou commented Jul 14, 2019

Hello,

i can't have a working ESP device since esp2.6 (provided by ESP on arduino IDE by community package 2.5.1 and later)

  • Operating system: Windows 10 pro
  • ESP hardware in use: ESP01 or nodemcu v3

Full esptool.py command line as run:

C:\Users\denis\AppData\Local\Arduino15\packages\esp8266\tools\python\3.7.2-post1/python C:\Users\denis\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2/tools/upload.py --chip esp8266 --port COM3 --baud 115200 --trace version --end --chip esp8266 --port COM3 --baud 115200 --trace write_flash 0x0 C:\Users\denis\AppData\Local\Temp\arduino_build_52442/test.ino.bin --end

Full output from esptool.py (please copy and paste all lines of output)

Sketch uses 262480 bytes (52%) of program storage space. Maximum is 499696 bytes.
Global variables use 26664 bytes (32%) of dynamic memory, leaving 55256 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.6
2.6
esptool.py v2.6
Serial port COM3
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: 5c:cf:7f:84:80:25
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Flash params set to 0x0320
Compressed 266640 bytes to 194386...

Writing at 0x00000000... (8 %)
Writing at 0x00004000... (16 %)
Writing at 0x00008000... (25 %)
Writing at 0x0000c000... (33 %)
Writing at 0x00010000... (41 %)
Writing at 0x00014000... (50 %)
Writing at 0x00018000... (58 %)
Writing at 0x0001c000... (66 %)
Writing at 0x00020000... (75 %)
Writing at 0x00024000... (83 %)
Writing at 0x00028000... (91 %)
Writing at 0x0002c000... (100 %)
Wrote 266640 bytes (194386 compressed) at 0x00000000 in 17.2 seconds (effective 123.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

What is the expected behaviour?

the device must work, but it does nothing.

Do you have any other information from investigating this?

Version of esptool provided by package 2.5.0 of ESP8266 community package was working

Is there any other information you can think of which will help us reproduce this problem?

install ide on windows 10, update package ESP to 2.51 ou 2.52 => this doesn't work. Binaries are uploaded but the device is not working.

Same issues on ESP01 and nodemcu devices.

Source code :
source

options and package in 2.5.0
options_250
packages_250

compilation result in 2.5.0
compile250
and the device works fine

options and package in 2.5.2
options252
package252
compilation result in 2.5.2
compile252
and the device seems to be bricked, it never works

@denisfou denisfou changed the title esptool 2.6 binaries on windows esptool 2.6 binaries errors on windows Jul 14, 2019
@projectgus
Copy link
Contributor

Hi @denisfou ,

The output from esptool suggests that it wrote the data to flash OK, and it was read back and verified correctly. I think probably this is a problem when the Arduino firmware tries to start from the chip.

If you look at the serial output of the chip booting after reset with baud rate 74880, do you see any output?

One thing I noticed in the write_flash command is that the command line options for flash mode, flash size, and flash speed are not being passed to esptool.py by Arduino. This means in particular that esptool is setting the flash size param to 1MB (as this is the size detected by esptool), but in Arduino IDE the size is configured as 512KB. This may cause failure to flash.

You could try changing "Flash Size" to 1MB in Arduino IDE and see if this makes any difference. If so, this is a bug in ESP8266 Arduino (not setting the parameter) not a bug in esptool.

@denisfou
Copy link
Author

Thank you, I will try.
But i still wonder why version 2.5.0 works and 2.5.2 doesn't with the same IDE.

@projectgus
Copy link
Contributor

projectgus commented Jul 16, 2019

@denisfou ESP8266 Arduino project switched from esptool-ck flasher tool in 2.5.0 to using esptool.py in release 2.5.1. So 2.5.0 is using a totally different tool, different command line arguments, etc.

@denisfou
Copy link
Author

denisfou commented Aug 7, 2019

@denisfou ESP8266 Arduino project switched from esptool-ck flasher tool in 2.5.0 to using esptool.py in release 2.5.1. So 2.5.0 is using a totally different tool, different command line arguments, etc.

sorry, for late reply, i was in holidays.

I changed size of Flash, no effect, i changed baud rate, no effect. It looks like the ESP is bad flashed after transfert.

If tool for 2.5.1 is different maybe arguments produced by windows arduino IDE are not good.

@denisfou
Copy link
Author

denisfou commented Aug 8, 2019

Just tested on Centos7 64 bits and arduino ide 1.8.9.
I have exactly the same problem :(

2.5.0 works fine and 2.5.1, 2.5.2 fail.

All ESP devices using ESP8266 community board manager greater than 2.5.0 have the problem.

I don't know where to open an issue for that.

@projectgus
Copy link
Contributor

Hi @denisfou ,

Please open an issue with the ESP8266 Arduino project, here: https://github.com/esp8266/Arduino/issues

All esptool.py will do is write the bytes to flash that it is told to write. If what is written fails to boot the device, it's up to the caller of esptool.py to correct this (in this case, the caller is Arduino).

Angus

@denisfou
Copy link
Author

denisfou commented Aug 9, 2019

Thank you :)

I found a solution here.

esp8266/Arduino#6296

Hi @denisfou ,

Please open an issue with the ESP8266 Arduino project, here: https://github.com/esp8266/Arduino/issues

All esptool.py will do is write the bytes to flash that it is told to write. If what is written fails to boot the device, it's up to the caller of esptool.py to correct this (in this case, the caller is Arduino).

Angus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants