-->
Page 1 of 4

Upload error: espcomm_upload_mem failed from Arduino IDE

PostPosted: Wed Jul 27, 2016 12:51 am
by Remo
I am having trouble trying to upload any sketch using Arduino IDE to my NodeMCU module, I have IDE version 1.6.10 - I have installed ESP8266 version 2.3.0 in boards manager (I have also tried older versions of both), when trying to upload the Blink sketch I see a blue LED blink twice on my board then I get this error from the arduino IDE:

warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed

- I am using this board from Amazon, nothing is connected besides the microUSB to the USB slot on my laptop: https://www.amazon.com/HiLetgo-Version- ... 010O1G1ES/

- Here are my settings Image
Board: NodeMCU 1.0 (ESP-12E module) - I also tried various other options
CPU Frequency 80 MHz
Flash Size: 4M (3M SPIFFS)
Upload Speed: 115200 (tried 9600)

- When I connect my serial monitor and press the reset button I see this:
<Garbage> n't use use rtc mem data
Ai-Thinker Technology Co.,Ltd.
ready

- I tried using ESP8266Flasher with no luck, it gets stuck unable to find my board

- I tried a ton of various MicroUSB cables with no luck, also tried connecting to PC instead of laptop (just in case) - but still getting same error

Any help is greatly appreciated - I pasted in detailed log below in case it helps:

Arduino: 1.6.10 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"

Build options changed, rebuilding all

Sketch uses 222,205 bytes (21%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 31,572 bytes (38%) of dynamic memory, leaving 50,348 bytes for local variables. Maximum is 81,920 bytes.
C:\Users\rihams\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.9/esptool.exe -vv -cd nodemcu -cb 115200 -cp COM5 -ca 0x00000 -cf C:\Users\rihams\AppData\Local\Temp\build5dd4fe4d3448c8694b5114c65d7e9c04.tmp/Blink.ino.bin
esptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from COM1 to COM5
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
An error occurred while uploading the sketch
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Re: Upload error: espcomm_upload_mem failed from Arduino IDE

PostPosted: Tue Aug 09, 2016 6:40 pm
by gshoa
I seems having same error, not sure if you get resolved? I am using a ESP-12E WeMos D1 WiFi UNO based ESP8266 shield, I success upload the "Blink" program first time, but I try to upload second time, I get following errors:

Sketch uses 222,213 bytes (21%) of program storage space. Maximum is 1,044,464 bytes.
Global variables use 31,588 bytes (38%) of dynamic memory, leaving 50,332 bytes for local variables. Maximum is 81,920 bytes.
C:\Users\AppData\Local\Arduino15\packages\esp8266\tools\esptool\0.4.9/esptool.exe -vv -cd nodemcu -cb 115200 -cp COM7 -ca 0x00000 -cf C:\Users\AppData\Local\Temp\build248c0e3609e764c93fdfd37418496ed7.tmp/Blink.ino.bin
esptool v0.4.9 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 115200
setting port from COM1 to COM7
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
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 226368 bytes from C:\Users\AppData\Local\Temp\build248c0e3609e764c93fdfd37418496ed7.tmp/Blink.ino.bin to flash at 0x00000000
erasing flash
size: 037440 address: 000000
first_sector_index: 0
total_sector_count: 56
head_sector_count: 16
adjusted_sector_count: 40
erase_size: 028000
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
setting serial port timeouts to 15000 ms
read 0, requested 1
setting serial port timeouts to 1000 ms
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
closing bootloader
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
error: espcomm_upload_mem failed

Re: Upload error: espcomm_upload_mem failed from Arduino IDE

PostPosted: Sat Sep 03, 2016 5:07 pm
by cems
I see those errors when the IDE can't connect to the board. There's multiple reasons for this possible. The first thing to do is eliminate all the easy ways to make this mistake. (choosing the wrong board in the selector, not choosing the port, or choosing the wrong port, bad cable, some other program has locked the COMM port you want, reboot your computer....)

Then after elminating that what it possibly happening is that you have a program running that is constantly resetting the board before you can upload to it. But more likely you may have put it into deep sleep. For reasons I don't understand this watchdog timer setting is persistent. So what is happening is that you are sleeping it before the serial connection can talk to it.

To get it out of that situation google around for details but it basically involves driving the WAKE pin and the RESET Pin, While holding down the FLASH button until the IDE can upload a new script.

Re: Upload error: espcomm_upload_mem failed from Arduino IDE

PostPosted: Thu Oct 13, 2016 6:43 am
by lucaberta
Remo wrote:- When I connect my serial monitor and press the reset button I see this:
<Garbage> n't use use rtc mem data
Ai-Thinker Technology Co.,Ltd.
ready


that makes three of us who are having the same issue on a NodeMCU 1.0 module.

I have just added a message to this other thread, written from another user who is facing the same exact issue like you and I do.

viewtopic.php?f=6&t=11843

Have you had any progress on this issue?

Thanks, Luca