platformio / platform-espressif8266

Espressif 8266: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif8266
Apache License 2.0
327 stars 219 forks source link

Not able to flash ESP01_1M board #80

Closed DJManas closed 6 years ago

DJManas commented 6 years ago

Hello,

I have problems with flashing of ESP01_1M board. I keep getting this error:

> Executing task: platformio run --target upload <

[Sun Apr  1 21:19:20 2018] Processing esp01_1m (framework: arduino; platform: espressif8266; board: esp01_1m)
---------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Espressif 8266 > Espressif Generic ESP8266 ESP-01 1M
SYSTEM: ESP8266 80MHz 80KB RAM (1MB Flash)
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(light)
Collected 39 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ArduinoOTA> v1.0
|   |-- <ESP8266WiFi> v1.0
|   |-- <ESP8266mDNS>
|   |   |-- <ESP8266WiFi> v1.0
|-- <ESP8266mDNS>
|   |-- <ESP8266WiFi> v1.0
|-- <ESP8266WiFi> v1.0
Configuring upload protocol...
Looking for upload port...
Auto-detected: /dev/cu.usbserial-A50285BI
Uploading .pioenvs/esp01_1m/firmware.bin
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
*** [upload] Error 255
================================================================== [ERROR] Took 8.29 seconds ==================================================================

========================================================================== [SUMMARY] ==========================================================================
Environment esp01_1m    [ERROR]
================================================================== [ERROR] Took 8.29 seconds ==================================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

Arduino IDE configuration 2018-04-01_21-16-40

Arduino IDE - Upload log Expected result

esptool v0.4.13 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
    setting board to nodemcu
    setting baudrate from 115200 to 115200
    setting port from /dev/tty.usbserial to /dev/cu.usbserial-A50285BI
    setting address from 0x00000000 to 0x00000000
    espcomm_upload_file
    espcomm_upload_mem
opening port /dev/cu.usbserial-A50285BI at 115200
    tcgetattr
    tcsetattr
    serial open
opening bootloader
resetting board
trying to connect
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
trying to connect
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
    espcomm_send_command: receiving 2 bytes of data
Uploading 274208 bytes from /var/folders/n6/m9j893wd0qj2klmx2_1r32x80000gn/T/arduino_build_491183/OutsideTemperatureCollect.ino.bin to flash at 0x00000000
    erasing flash
    size: 042f20 address: 000000
    first_sector_index: 0
    total_sector_count: 67
    head_sector_count: 16
    adjusted_sector_count: 51
    erase_size: 033000
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    setting timeout 15000
    setting timeout 1000
    espcomm_send_command: receiving 2 bytes of data
    writing flash
................................................................................ [ 29% ]
................................................................................ [ 59% ]
................................................................................ [ 89% ]
............................                                                     [ 100% ]
starting app without reboot
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    espcomm_send_command: receiving 2 bytes of data
closing bootloader

PlatformIO.ini

[platformio]
env_default=esp01_1m
lib_extra_dirs = ${env.HOME}/Dropbox/Projekty/Arduino/__Libraries__/

[env:esp01_1m]
platform = espressif8266
board = esp01_1m
framework = arduino
monitor_baud = 115200
board_f_cpu = 80000000L
board_f_flash = 40000000L
board_flash_mode = dio
upload_resetmethod = nodemcu
build_flags = -Teagle.flash.1m0.ld
upload_speed = 115200

PlatformIO esptool version:

RinceWind:tool-esptool djmanas$ /Users/djmanas/.platformio/packages/tool-esptool/esptool -v
esptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>

MacOS 10.13.4 VSCode 1.21.1 Atom 1.25 Pio Home 0.9.3 Pio Core 3.5.3a7 ESP01 - NodeMCU firmware 2.1.0

ivankravets commented 6 years ago

Should be fixed in https://github.com/platformio/platform-espressif8266/commit/74e288aea8da6f91a10197ef59ae3ac1a1ec304f

Please re-test with upstream/development version http://docs.platformio.org/en/latest/platforms/espressif8266.html#stable-and-upstream-versions