{"action":"created","issue":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/95","labels_url":"https://api.github.com/repos/esp8266/Arduino/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/esp8266/Arduino/issues/95/comments","events_url":"https://api.github.com/repos/esp8266/Arduino/issues/95/events","html_url":"https://github.com/esp8266/Arduino/issues/95","id":70001779,"number":95,"title":"**SOLVED** Has anyone else experienced \"flakey\" uploads?  (ESPtool.exe is broken) - read to bottom","user":{"login":"tim-in-oakton","id":11150888,"avatar_url":"https://avatars.githubusercontent.com/u/11150888?v=3","gravatar_id":"","url":"https://api.github.com/users/tim-in-oakton","html_url":"https://github.com/tim-in-oakton","followers_url":"https://api.github.com/users/tim-in-oakton/followers","following_url":"https://api.github.com/users/tim-in-oakton/following{/other_user}","gists_url":"https://api.github.com/users/tim-in-oakton/gists{/gist_id}","starred_url":"https://api.github.com/users/tim-in-oakton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tim-in-oakton/subscriptions","organizations_url":"https://api.github.com/users/tim-in-oakton/orgs","repos_url":"https://api.github.com/users/tim-in-oakton/repos","events_url":"https://api.github.com/users/tim-in-oakton/events{/privacy}","received_events_url":"https://api.github.com/users/tim-in-oakton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":63,"created_at":"2015-04-22T02:24:53Z","updated_at":"2015-04-30T20:40:44Z","closed_at":null,"body":"My config is as follows:\r\n* ESP8266 -03 modules\r\n* Regulated 3.3v supply - arduino style battery input/USB regulator thing\r\n* 3.3v FTDI USB:serial converter\r\n\r\nOn 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.\r\nThe program is a datalogging app for a Beer Keg - maybe 1000 lines of code or so.  Not very big.\r\n\r\nRecently 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.\r\n\r\nUsing 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).\r\nI 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.\r\n\r\nThe IDE reports:\r\nSketch uses 205,912 bytes (39%) of program storage space. Maximum is 524,288 bytes.\r\nwarning: unsupported baud rate: 115200, using 115200\r\nUploading 38112 bytes from C:\\Users\\timm\\AppData\\Local\\Temp\\build7944810091012342573.tmp/Kegerator-v4.3.cpp_00000.bin to flash at 0x00000000\r\n......................................\r\nUploading 167848 bytes from C:\\Users\\timm\\AppData\\Local\\Temp\\build7944810091012342573.tmp/Kegerator-v4.3.cpp_40000.bin to flash at 0x00040000\r\n....................................................................................................................................................................\r\n\r\nI 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?\r\n\r\nI 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?\r\n\r\nAny thoughts?  Not sure if I have a bug or a PEBCAK issue- are there any known \"gotchas\" to be aware of that complicate uploading?\r\nthanks!\r\ntim"},"comment":{"url":"https://api.github.com/repos/esp8266/Arduino/issues/comments/97960362","html_url":"https://github.com/esp8266/Arduino/issues/95#issuecomment-97960362","issue_url":"https://api.github.com/repos/esp8266/Arduino/issues/95","id":97960362,"user":{"login":"duncan-a","id":11795653,"avatar_url":"https://avatars.githubusercontent.com/u/11795653?v=3","gravatar_id":"","url":"https://api.github.com/users/duncan-a","html_url":"https://github.com/duncan-a","followers_url":"https://api.github.com/users/duncan-a/followers","following_url":"https://api.github.com/users/duncan-a/following{/other_user}","gists_url":"https://api.github.com/users/duncan-a/gists{/gist_id}","starred_url":"https://api.github.com/users/duncan-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/duncan-a/subscriptions","organizations_url":"https://api.github.com/users/duncan-a/orgs","repos_url":"https://api.github.com/users/duncan-a/repos","events_url":"https://api.github.com/users/duncan-a/events{/privacy}","received_events_url":"https://api.github.com/users/duncan-a/received_events","type":"User","site_admin":false},"created_at":"2015-04-30T20:40:44Z","updated_at":"2015-04-30T20:40:44Z","body":"*Tim*\n\nI thought it was all too good to be true!!!\n\nGoing out on a limb (and probably talking from my bottom), you said \"seems\nto fail at the same address\" does this 'point of failure' relate to a\ntransition between 'blocks of memory'?\n\nI read something about that being a problem somewhere in a GitHub post but,\nas it was over my head (somewhat predictably), I passed over it - I think\nthere was a fix but I might be wrong. There was also something about\nproblems within the 'as shipped' firmware but... you know the last bit!!!\n\nMy current plan is to blow a set of modules with the lowest common\ndenominator of firmware (GPIO0 & GPIO2 as switched outputs using one of the\nsketches in the Marco Schwartz book) and then try and work out how to get\nan ESP to send a command, via the network, to another ESP to perform the\nswitching - think 2 pushbuttons on one, controlling two outputs on another\nand an Arduino somewhere in the system recording current set states,\noverriding the pushbuttons, sending data to the web, lighting indicator\nleds, whatever...\n\nAlthough my requirements for the module the firmware may evolve a bit\nlater, this will get me going for a while to try and build a basic 'system'\nwhilst the IDE and manufacturer firmware are having regular biopsies and I\n(hopefully) learn a bit more and home in on the final requirements.\n\nAnd just as I finished writing this - the 'test module' has died - the code\nis still running (the webpage it's serving is reacting correctly, with\n'buttons' changing) but the actual GPIO output has stopped switching!!!\n\nIf I had any beer in the house, I'd be downing one at this point!!!!!!!!!!!!\n\nOn 30 April 2015 at 20:18, tim-in-oakton <notifications@github.com> wrote:\n\n> Mine continued working for days and maybe 100 uploads flawlessly - none\n> one hiccup or failed upload, until today. Upload \"hung\" using esptool.exe\n> from the IDE (midway through second file upload to 0X40000), and now it is\n> bricked again as before - uploads SAY they work, but don't actually\n> execute. When I run the esptool.py manually to erase the module it\n> completes immediately but doesn't address the behavior, and manually\n> uploading the same files that exptool.exe claimed to upload generates:\n>\n> C:\\Users\\timmeyer\\Documents\\Arduino\\PythonESPTool>python esptool.py --port\n> COM6\n> write_flash 0x00000\n> C:\\Users\\timmeyer\\AppData\\Local\\Temp\\build78864237285263200\n> 67.tmp\\BareMinimumtim_.cpp_00000.bin 0x40000\n> C:\\Users\\timmeyer\\AppData\\Local\\Te\n> mp\\build7886423728526320067.tmp\\BareMinimumtim_.cpp_40000.bin\n> Connecting...\n> Erasing flash...\n> Writing at 0x00007400... (100 %)\n> Erasing flash...\n> Writing at 0x0005dc00... (82 %)\n> Traceback (most recent call last):\n> File \"esptool.py\", line 538, in\n> esp.flash_block(block, seq)\n> File \"esptool.py\", line 198, in flash_block\n> raise Exception('Failed to write to target Flash')\n> Exception: Failed to write to target Flash\n>\n> seems to fail at the same address when attempted repeatedly.\n> FWIW, previously when I saw \"flaky\" intermittent behavior, leaving it\n> powered down overnight (no FTDI plugged in, no battery) did seem to\n> \"magically\" get things working... I never mentioned it as it seemed well,\n> \"magical\".\n>\n> Will try another host later tonight- but a Gremlin in their host firmware\n> could explain this!\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/esp8266/Arduino/issues/95#issuecomment-97904865>.\n>\n"}}