igrr / esptool-ck

ESP8266 build/flash helper tool by Christian Klippel
GNU General Public License v2.0
360 stars 123 forks source link

Erase flash function #18

Closed igrr closed 8 years ago

igrr commented 8 years ago

Implements #15

igrr commented 8 years ago

Need some feedback here: only tested on OS X with NodeMCU so far.

nkolban commented 8 years ago

Ok ... it compiled ... now how do I use it. I tried:

esptool -? esptool -help esptool /h

But none of them produced usage information

igrr commented 8 years ago

Right, i forgot about your pull request for the --help function. Will merge. Still, i have updated readme.md: https://github.com/igrr/esptool-ck/blob/feature/erase-flash/README.md. The command is -ce. There's even an example at the end of examples section.

nkolban commented 8 years ago

I tried to run on my Windows system and this is the issue/error I get:

C:\Users\IBM_ADMIN\git\esptool-ck>esptool -cp COM15 -cb 115200 -ce
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
error: failed reading byte
warning: espcomm_send_command: cant receive slip payload data
warning: espcomm_sync failed
error: espcomm_open failed

C:\Users\IBM_ADMIN\git\esptool-ck>

If there are other diagnostics I can send, please let me know. COM15 is the USB->UART to my own NodeMCU and nothing is currently holding/using COM15 at the time of run.

igrr commented 8 years ago

Which board are you using? If you don't put it into flash download mode manually, you need to specify an appropriate -cd option before -ce, e.g. -cd nodemcu, same as for flashing.

nkolban commented 8 years ago

That makes sense ... when I now run the command:

esptool -cp COM15 0cb 115200 -cd nodemcu -ce

we seem to get an exception. See attached screen shot.

2015-10-30_10-59-53
igrr commented 8 years ago

Tested the binaries from Appveyor on 64-bit Windows 10, didn't get them to crash. @Links2004 reported success as well.