Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By martinayotte
#26747 Check the ESP package in the folder such as ~/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/.
If there is more folder like the previous path, it because the BoardManager doesn't uninstall previous version, simply install newer one, confusing the IDE. In such case, do a backup just in case, and delete the older one. Restart the IDE, and try again if esptool is producing 1 or 2 binaries.
User avatar
By Barnabybear
#26749
Code: Select allUploading 211328 bytes from C:\Users\Paul\AppData\Local\Temp\build3134885239438669845.tmp/sketch_aug21a.cpp.bin to flash at 0x00000000
.warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04

I've just managed to dulipcate you error message. Got that with the "upload speed" set to 9600 as oppossed to the 115200 that I normaly use (having tried all speeds to duplicate your fault, those were the only upload speeds that returned the fault & worked respectively).
Code: Select allUploading 31712 bytes from C:\Users\?????\AppData\Local\Temp\build1788008010057933035.tmp/Test_21_08.cpp_00000.bin to flash at 0x00000000
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_DATA) failed
warning: espcomm_send_command: wrong direction/command: 0x01 0x03, expected 0x01 0x04

And only a single binary, but there may have been a second if this had flashed.

@martinayotte
Check the ESP package in the folder such as ~/.arduino15/packages/esp8266/hardware/esp8266/1.6.5-947-g39819f0/.
If there is more folder like the previous path, it because the BoardManager doesn't uninstall previous version, simply install newer one, confusing the IDE. In such case, do a backup just in case, and delete the older one. Restart the IDE, and try again if esptool is producing 1 or 2 binaries.

I'll check that tomorrow. Thanks.
User avatar
By PaulRB
#26899 Today I attempted to revert to IDE 1.6.4 in case upgrading to 1.6.5 is what has been causing my issues. If so, it might explain why, at one point, I was able to upload and run sketches on my desktop PC but not my laptop. Perhaps I had forgotten which versions were installed on each machine. Maybe the desktop was on 1.6.4 and the laptop on 1.6.5, and sketches uploaded on the desktop ran but sketches uploaded in the laptop did not. Maybe I then upgraded the desktop to 1.6.5 and sketches uploaded with that machine stopped running too.

However, have run into a problem. I installed 1.6.4, selected "Generic esp8266" and attempted to compile a simple sketch but got:
Code: Select allCannot run program "/home/paul/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" (in directory "."): error=2, No such file or directory


Thinking this was a problem between 1.6.4 and the current esp package, I re-installed 1.6.5, but still got the same message.

Can anyone suggest how I fix this?

Thanks
User avatar
By PaulRB
#26901 OK, I fixed that error. The directories under /home/paul/.arduino15/packages/esp8266 had got messed up somehow. I deleted them and re-installed the esp package using Board Manager. Sketches compile again with 1.6.5.

So... I removed 1.6.5 and installed 1.6.4. Its no different to 1.6.5 in that my sketch uploads but does not run.