- Sat Jun 10, 2017 8:33 am
Sadly I do not have the programming skills to put effort to find this "dastardly save-crash-reboot problem" as I named it in another post.
Here is how I have so far avoided serious problems.
1. Avoid the use of the EDIT function. I obviously DO have to open the EDIT window in order to save new versions of my code. Once I open the EDIT window I leave it open and TRY to remember not to close it during the working session. I always edit my code in a separate app (either notepad+ or regular notepad) Then do a copy/paste when I have something new to try. This has the extra (important) benefit of having saved versions of my code in the form of regular text files.
2. When I do want to run my newly saved code I RIGHT click on the RUN and select "open in new tab", thus leaving the EDIT window open and un-affected by a possible crash.
3. If the SAVE causes a crash then I either wait for the esp module to reboot or, better yet, I reset it or power cycle and when I see the module has re-acquired an IP address I simply click SAVE again in the already open EDIT window.
4. When developing code I always have a serial port (in the case of the esp-01) connected to the tx/rx or I simply watch the serial output (in the case of nodemcu module, which has inbuilt serial/usb) and thus it is easy to see when the rebooted module has re-acquired an IP adrs as well as other importaint feedback from the serial output.
I have several esp-01 modules running code that causes the save-crash-reboot but if I have followed the above method they still run flawlessly. (But possibly my code has not grown large or complex enough to exhibit all the problems you mention)
I have upgraded the flash size, by replacing the flash chip, on a few esp-01's from either 0.5M/1M to both 2M and 4M with good results..
I have been thinking lately that it would be nice if Mike (or anyone who knows how) could put together a tutorial on how the espbasic is compiled. It would really be an awesome enhancement if one could just go down a menu list of code modules and pick/choose what you need in the final build of espbasic. ie if you don't need TFT stuff for your project then don't put it in there, etc, etc.
I'd be willing to test some code that you have had to abandon and see if my method works. Or better yet give my method a try and post results.
Bottom line is Mike has asked for help and so far no one has offered to help. We need someone with the right coding and debugging skills, like CICCIOCB who (I believe) helped make many major improvements to this awesome espbasic, to jump in and help out. I'd even be willing to join a group of us here who could donate money to pay a programmer to find and correct this bug. I believe if this bug was corrected this espbasic would be very close to being complete and stable.
Thoughts or feedback on my method are encouraged.