docs/esp32: Use new esptool syntax.
Summary
This updates references esptool arguments to use kebab-case (write-flash) instead of snake_case (write_flash). The latter seems deprecated and shows warnings.
$ esptool write_flash
Warning: Deprecated: Command 'write_flash' is deprecated. Use 'write-flash' instead.
esptool v5.0.1
From what I can tell, the IDF is still using esptool.py v4.x which does not support the new naming style. So I think we need to keep the old style around for some time.
I see! The instructions however suggest installing it from source or with pip which will install the latest version, I believe that's why I ran into the issue
The instructions however suggest installing it from source or with
pipwhich will install the latest version
Yes, indeed they do.
But if we change it to use the new syntax, it won't work at all with old versions (< version 5) or with the esptool that is installed by the current version of ESP32 IDF that we use.
The only thing I could suggest at this stage is to put a note that newer versions will give a warning unless you use the newer syntax.
put a note that newer versions will give a warning unless you use the newer syntax.
Will do!
it won't work at all with old versions (< version 5)
I think in one case I got an error in the new version when using the old syntax, but I can't remember where (it was a while back). I'll try to reproduce but either way will just add a note for now.