-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
**SOLVED** Has anyone else experienced "flakey" uploads? (ESPtool.exe is broken) - read to bottom #95
Comments
I forgot to specify - Windows build, will try a fresh clone tonight- |
Hi I'm now having issues like this too. Everything was fine but now it appears From what little I've been able to understand, the 'gobbledygook' is a It's not the PSU - have tried 3 and they're all 3.3 +/- 0.03V. I'm running Windows XP with the 1.6.1-p1 release from GitHub (I can't There's an occasional "4j - Error when starting" type error when I restart It might (though not guaranteed) be helpful to read the bootloader message From what I can understand, it appears that either the 1.6.1-p1 IDE is All help and advice gratefully received....... On 22 April 2015 at 04:27, tim-in-oakton [email protected] wrote:
|
Your description matches mine exactly, thanks for the 76800bps tip, I may look into that (did not know the magic number was 76800!). I tried a third module late last night - same behavior... first upload works, second LOOKS fine uploading, but doesn't work. Resetting after upload shows "gobbletygook" in the serial monitor.... AFAIK I changed NOTHING in my upload environment, and I have 3 PCs used for development - all are behaving in this manner (or, changing to a different PC doesn't seem to change the upload-not-working behavior). All PC's are WIndows7, using the earlier 1.6.1 Zip download with patched libs for the UDP port issue (thanks IGRR). Once in this state, it doesn't appear that I can upload a functioning "minimal sketch" to a module either - although this problem seemed to "grow over time" - from an occasional failed upload to "can't upload at all anymore". Very strange, the common factors would seem to be the IDE/uploader code, the host OS (windows7 with auto-updates) & the power supply in my case... I'll have a better bench supply this evening UMT-5 to test with. Anyone else seeing flakiness? If so, can you share your system/project specs? |
I don't get the "first upload works, second LOOKS fine uploading, but I'm limited to one (rather ancient) Win XP laptop using "1.6.1 Zip If you discover a way of adding 76800 into the options for the serial On 22 April 2015 at 13:41, tim-in-oakton [email protected] wrote:
|
Heh, my debug output works at 77400. :) My devices are all VERY voltage-sensitive; they pull too much current for the 3.3V lines on most of my serial adapters. My advice would be to grab PuTTY, monitor the serial port, and try to restart the module in to flash mode. If you see a boot mode of anything but (1,7) in the debug output, something's wrong. First number is the boot type - 1 means boot from UART (aka flash over serial), 3 means boot from SPI flash (aka normal startup), 5 means boot from SDIO (aka...nobody's doing this yet.) The second number appears to be related to whether or not the chip started cleanly - 7 is good, anything less and you might not be able to flash. |
Thanks for joining in Alexander Hmmm... In my case, I'm running a 5V 1.2A wall wart (stable +/- 0.1V according to a I'll try and get PuTTY installed and hope that provides an answer to the One thing I'm wondering relates to tim-in-oakton and I both using the Just a thought... On 22 April 2015 at 22:52, Alexander [email protected] wrote:
|
Yeah, I don't think it's your power supply - which is significantly more stable than mine - I just got VERY similar problems when I had a flaky power supply. PuTTY should be the easiest way to get a terminal open - no install necessary, you can get it as a standalone executable. The underlying flash tools probably haven't changed, and that appears to be where the issue lies if it isn't the chip; I'm not familiar with this particular project but I'm fairly familiar at this point (in that when one falls out of a tree, one becomes familiar with many branches) with the ESP8266 and the Arduino platform in general. I'll dig deeper once I get home. |
Yup, the belief that USB can power anything and you can always get 3.3V I could try a chunky electrolytic close to the ESP but I really doubt it I can't rule out ESP chip failure, but at the attrition rate I've
Ho hum............... On 22 April 2015 at 23:35, Alexander [email protected] wrote:
|
...but it says 3.3 right on the board! I've done some moderately heinous things to my ESPs - the flashing process is flaky, and without the debug info at that magical baud rate it's really hard to tell what's failing. I suspect your chips are fine. Looking forward to seeing what you get out of PuTTY :) |
Thank goodness Im not the only with this problem - I thought I was going crazy last night. I started to notice problems when I was experimenting with deepsleep. I would change nothing, simply click verify then upload, and randomly it would work. I still have not found a solution, but I think its the problem you guys are having as i believe it is programmer related. My setup: |
Alexander Yep, it does say 3.3V and usually it is - but it depends on what you're
Running an Arduino off USB is often a primary source of 'unexplained Back to the problem in hand... I can't get PuTTY to work - due, I'm sure, to total incompetence and lack The USB adaptor is on Com8 so, in the Connection/Serial part of the PuTTY Serial Line: COM8 Hitting "Open" gives me a 'Windows Bong' (feel like I could use a bong at What am I doing wrong??? On 23 April 2015 at 02:01, Alexander [email protected] wrote:
|
Although not directly related to "the problem", I tripped over this on the "Did you a add a capacitor across Vcc and GND near the ESP?I also I also read something else about pickup on connecting leads causing all Where I'm living in Spain, there is no mains earth anywhere in the house Several schematics I've seen include a resistor and capacitor (to add a One thing I have concluded in my trawling today is that there do appear to For those who are very techie: Is there anything in the 1.6.1-p1 zip Just thinking out loud...! On 23 April 2015 at 13:02, Duncan Amos [email protected] wrote:
|
I did experience flakyness the very first few times (long ago) with the esp8266 and so the cap+resistors fixed it. Its now standard in all my ESP work. I think this is somehow related to the compiler or the programmer (esptool). Im trying to make it happen again so I can grab the crash report and post it for more knowleadgeable people to figure out. But to no avail. Does this method of programming (arduino ide) also make use of the bank 0/1 concept of the ESP; that is, does it program the same file to both banks ? |
ABL - thanks for the Putty recommendation, I didn't even thin to use it for Serial!! Reset results after a “apparently successful flash upload” (Arduino IDE output): /* connect PUTTY set for 76800bps, reset while still in “upload” mode w GPIO0 pulled low / /* Now reboot/power cycle with the GPIO left to flow high – which normally SHOULD execute the previously uploaded code*/ /* This is repeatable – power cycle 5X and see the same exact output 5X. Previously (last week) this EXACT process worked more than half the time – my code booted up and performed great. Any other ideas? When life (work, wife, kids, etc) permits, I'm going to try to use a Linux box as the IDE host and uploader instead of the WIndows boxes used to date, and I'm planning on putting a pair of caps right on the PCB to make sure power is clean. I may also wire other GPIO leads high as a hedge. I did verify with a 'sillyscope that my power is solid and clean - at least at the power supply (rock solid 3.3v, no noticeable ripple). I don't think that this is power issue now, but I'll throw some caps on to be sure. Again - my environment was always a little flakey (maybe one upload in 5-10 failed), but it degraded over time to now be unusable - on any of the machines I'm using. It FEELS like I hit some threshold where the upload process is breaking - setting the wrong jump vectors, putting the code in the wrong place..... dunno. |
Had time on a break to set up on Ubuntu - compiles and uploads without complaints but STILL doesn't run - After uploading using Linux Arduino IDE and rebooting without GPIO held low I see (at 76800bps): ets Jan 8 2013,rst cause:1, boot mode:(3,7) load 0x40100000, len 31024, room 16 It seems a little notable that it compiles to different sizes, but I don't expect that is the root issue - I may try with a minimal sketch as well, but this is replicated behavior - two modules, four computers, two different IDE host OS's (Win7&Ubuntu 14something). Next up is caps & terminating ALL inputs.... still think this is an upload tool issue though. |
codewise-nicolas: Things are getting a bit too technical for me but I'll My setup' is Win XP Pro with the ESP8266/Arduino .zip 1.6.1-p1 version - It certainly appears to upload in two blocks, as shown in tim-in-oakton's I think it's probably an issue with esptools but the occasional Thanks to all for the inputs so far. On 23 April 2015 at 20:25, tim-in-oakton [email protected] wrote:
|
Tim... Alexander wrote in his first post in this thread: " You're seeing 3.7, which would (I think) imply that it's not reacting yo Yes? No? Maybe? Rapidly losing the will to live? On 23 April 2015 at 22:28, Duncan Amos [email protected] wrote:
|
@duncan-a something else probably has your serial port captured - I find it helps to unplug, reboot, start PuTTY, and then plug in. Windows doesn't make that easy. I'm happy to set up a Teamviewer session or something to help debug, if you'd like! @tim-in-oakton yep, @duncan-a is correct: boot mode (3,7) is a normal boot, so your GPIOs are not being pulled the way they need to be pulled. https://github.com/esp8266/esp8266-wiki/wiki/Boot-Process details this a bit - you want UART mode, which is GPIO15 low, GPIO0 low, and GPIO2 high. |
don´t connect GPIO2 to VCC, in boot-loader mode its an alternative TX connect it to VCC can damage the chip! |
Still, a 10k pull-up on GPIO2 has improved stability (both upload time and run time) in my case. |
Also, regarding the degraded upload performance — could this be related to increased flash erase time? |
I was unclear - let me try again...... After I upload (see above details, looks fine and it HAS worked maybe 500+ times before), I let GPIO0 float and reset the board. Using PUTTY to listen, the board then says: load 0x40100000, len 31024, room 16 I will try a local cap and pulling GPIO2 high with a 10K resistor & report back. |
OK, I'm feeling more & more confident this is an uploader issue - I put a 470uF cap between power & gnd, pulled up GPIO0&2 w 10K resistors, and zero change in behavior. ets Jan 8 2013,rst cause:1, boot mode:(3,7) load 0x40100000, len 26644, room 16 And no longer runs or loops. My thesis is that at a certain point/code size the uploader/bootloader steps on something on the module that breaks the normal bootup process, and as it is written to flash it gets "stuck". Ivan - I don't have a logic analyzer handy, I do have a scope and an extra FTDI module that I could use to watch the interaction during an upload (now that I know the bitrate and that PUTTY speaks it)... Could I suggest that someone on the ESP team look into the uploader Python and bootloader code to see if there is an obvious failure to
I have a couple more modules on order to see if I can reliably flash smaller sketches before flashing my project (larger) sketch which seems to have killed three modules now (in the same manner). I'll bet a beer that it's something in the upload process at this point - here is a wall of text from "uploading" in verbose mode..... The only thing that looks like a warning is the line "serialport_receive_C0: 1C instead of C0".... any idea if that is normal or a clue? The upload takes just under 12s at 115kbps, and the "erasing flash" line takes a surprisingly SHORT amount of time. Sketch uses 178,876 bytes (34%) of program storage space. Maximum is 524,288 bytes. flush complete |
There are so many different ideas on how the pins go. The following works every time for me and has been used by folk from our http://www.sheffieldhardwarehackers.org.uk/wordpress/ Pull up = 10K resistor to Vcc (3v3) ESP8266-01 Using 10K resistors Pull up, GPIO0 To program using the esp bootloader (like you are doing with the arduino Short GPIO0 to Gnd for the duration of loading the code. This puts the bootloader into listening mode and you can then load your When loading is complete Remove the Gnd short on GPIO0 and do a reset again. Board comes up and runs your app fine. This also works fine on other of the variants of the ESP8266 like 03 and https://hackaday.io/project/3253-esp8266-native/log/11726-deep-sleep 10K is a weak pull up/down value that will not do the device any harm if Warning if you leave a pin floating (Unconnected) it can be in any of Do not put capacitors unnecessarily across pins, they are not pull ups. The little bit of effort taken to pull the important pins reliably into Dunno if this is useful or already known but thought it worth repeating Cheers Andy Kirby On 24/04/15 13:30, tim-in-oakton wrote:
|
Tim I'm close to being convinced irs an uploader issue, but I don't have the It seems to me that it's only affecting those who are working from the Andy Why did you, and the people at your hackspace, reject the idea of The capacitor being referred to, of which you disapprove, was a 'chunky The Olimex modules come with 2Ks built-in (default high with a soldered This is definitely a three pipe problem..........! On 24 April 2015 at 15:40, Andy Kirby [email protected] wrote:
|
Although this thread #101 isn't
I may be totally wrong about this so feel free to correct me - or better On 24 April 2015 at 23:46, Duncan Amos [email protected] wrote:
|
Iam using the latest version from git, and have the problem. For those having the problem intermitently, try archiving the build bins, so that when you find a compile/upload that has problems you can compare with the same code in a working .bin. This will help determine if its a compile thing or an upload thing. |
That sounds easy - I'll try that tomorrow (it's 2am now and I was up at 6am I've been wallowing in a swamp of jargon in various posts - pull requests The problem (in all cases, I think) appears to be uploading as what did As it's completely dead with me now, I'll need to leave it to one of the On 25 April 2015 at 01:01, codewise-nicolas [email protected]
|
Could this be relevant - it relates to compiling...? I'd be quite happy to have an ESP-Only Arduino IDE (and call it ESP-Ard or On 25 April 2015 at 02:08, Duncan Amos [email protected] wrote:
|
Stupid boy, Pike....... Forgot the link: #110 On 25 April 2015 at 02:15, Duncan Amos [email protected] wrote:
|
sticilface - well spotted. That was left over from being a debug when Sorry to hear that you're now suffering 'the problem'... On 1 May 2015 at 14:13, sticilface [email protected] wrote:
|
According to the schematic, the Olimex modules are fitted with the On 1 May 2015 at 14:50, Duncan Amos [email protected] wrote:
|
W25Q16BVSSIG is an 16Mbit ship --> 2MB working version of esptool.py: |
OK, thanks for that. Presumably there's a good reason that it's capped at I noticed another post "#149", from On 1 May 2015 at 15:19, Markus [email protected] wrote:
|
to use the more flash you need to add "-fs 16m" as parameter to the esptool.py then you can access the memory by the SDK api like EEPROM does it. |
OK, thanks - I'll eventualy get to the point of understanding!!! On 1 May 2015 at 15:31, Markus [email protected] wrote:
|
Just erased an 01, uploaded a sketch and it ran OK. On 1 May 2015 at 16:22, Duncan Amos [email protected] wrote:
|
Just a question, but may (in another universe) be relevant... The message pane says: Sketch uses 196080 bytes (37%) if program storage space. Maximum is 524,288 Uploading 160536 bytes from 35584 + 160536 = 196120, not 196080 What are the extra 40 bytes for? Is this also saying that the 01 module is a half-megabyte chip? It appears On the basis that the 25Q16 fitted to the Olimex boards is 16MB, this could On 1 May 2015 at 16:26, Duncan Amos [email protected] wrote:
|
Hi Duncan Gerry |
Thanks Gerry I was wondering if the 40 Bytes might in some way connect with the On 1 May 2015 at 17:59, GerryKeely [email protected] wrote:
|
Hi Duncan Gerry |
Hopefully final followup - I had another couple of "hung modules", compounding issues seemed to be code size and occasionally interrupted uploads. From the beginning it felt like a bug in the erase/upload process, who would have thought it was a firmware issue! |
Will this be included in the next 'Release' version for Win32 (currently I don't understand enough to do it any other way (tried and failed On 7 May 2015 at 14:25, tim-in-oakton [email protected] wrote:
|
what is "this" you are referring to? |
'Esptool.py updated to work around a bug in the SPIEraseArea ROM function' Due to my complete inability to understand Git, I'm way behind on bug fixes Sorry if this doesn't make a lot of sense, but I'm not that tech-savvy... On 7 May 2015 at 15:54, Ivan Grokhotkov [email protected] wrote:
|
I'm reluctant to bundle esptool.py because that would require bundling Python as well... which would be going a bit overboard in terms of size. |
OK, I think I follow that... I've had, and still have, the upload problems from the IDE so I struggled What I, and I suspect others, want is to be able to upload from the IDE If that can be achieved by other means then that's fine, but I keep seeing I love the work that's being done - hats off to all involved - but as a What we have with ESP running Arduino is a complete game-changer.......... On 7 May 2015 at 18:28, Ivan Grokhotkov [email protected] wrote:
|
I only it worked reliably. Either I have a bad device, or the IDE still needs some work. I can't get simple code to upload and run reliably, when the only change is "int foo;" as a global, for instance. |
I promised earlier to post the kegerator code that uses the ESP and this IDE module to make signed calls on the AWS platfrom - it is athttps://github.com/tim-in-oakton/ESP8266Kegerator This project uses the ESP8266 to become an AP and web server if it is unconfigured or can't access wifi to allow user to provide credentials/ssid/pw/etc. It then NTP's to get the time, and then sends SNS events to AWS based upon detection of beer flowing through Adafruit flow sensors. $2 module making secure, signed calls to AWS - please take this and do something cooler with it! |
For a similar approach to configuring the Network and other parameters, like IP and server prot, but one which used a secured AP, with the password as a QR code attached to the device |
@tim-in-oakton I don't think this is a Windows-specific issue, I was running in Ubuntu 14.04 when I ran into this (purely using the Arduino IDE)... |
Hi, A fatal error occurred: Failed to connect to ESP8266 I tried also with the button of GPIO0 and Reset and nothing solved the problem. Can anybody help me? |
I think I know in what was the problem, the cable TDI Usb to Serial was not genius and Windows update their drivers which blocking usage of fake stuff. |
I am gonna chime in here for posterity, I just had this erase issue happen again, so im not sure if its sitll an issue in esptool.exe 0.4.6 win 32. started getting looping exception restarts, had to use pyesptool and do an erase_flash to fix it. This is what my stack looked like , hope it helps someone.
|
The problem seems to be related with low quality ftdi adapters without chrystal oscillators. in esptool.py change to and i orderd a new usb2TTL adapter. :) edit: got my brand new usb2serial adapter :) no more flaky uploads. Everything works as intended now. |
Closing as it is marked as solved due to bad usb2serial adapter. |
Allow the user to set an empty password in order to make an open AP
My config is as follows:
On my first module I successfully compiled and uploaded maybe 500 times - occasionally I would need to upload twice if the first upload failed to execute correctly. This got worse over time, it seemed like restarting the Arduino IDE and rebooting my PC was some help (hard to prove, it was intemittent). I did try to reflash with a minimal sketch as well, that didn't really seem to help.
The program is a datalogging app for a Beer Keg - maybe 1000 lines of code or so. Not very big.
Recently it got harder & harder to get a "good" upload (I used the serial monitor & wireless behavior to confirm if it was "working"). This morning I was completely unable to get an upload to work - the upload using the Arduino IDE would complete with no errors, but the uploaded executable image would not execute.
Using the Python ESPTool uploader, I was able to "erase" the flash, but not upload the 512K "blank" file - it would consistenly fail at 32% (hex800000).
I replaced the ESP module with another, the FIRST upload worked fine and executed perfectly, when I made a minor change to the code however it would upload with no errors but not execute. Frustrating.
The IDE reports:
Sketch uses 205,912 bytes (39%) of program storage space. Maximum is 524,288 bytes.
warning: unsupported baud rate: 115200, using 115200
Uploading 38112 bytes from C:\Users\timm\AppData\Local\Temp\build7944810091012342573.tmp/Kegerator-v4.3.cpp_00000.bin to flash at 0x00000000
......................................
Uploading 167848 bytes from C:\Users\timm\AppData\Local\Temp\build7944810091012342573.tmp/Kegerator-v4.3.cpp_40000.bin to flash at 0x00040000
....................................................................................................................................................................
I will try to upgrade the power supply to something I trust more than an off-brand Arduino-style regulator, but is this something that others have seen? Are there any tricks to reliable upload&execute?
I am using the 1.6.3 IDE with a GIT pull from maybe 2 weeks ago - have there been any changes to the upload functionality or to the linker directives?
Any thoughts? Not sure if I have a bug or a PEBCAK issue- are there any known "gotchas" to be aware of that complicate uploading?
thanks!
tim
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: