micropython icon indicating copy to clipboard operation
micropython copied to clipboard

docs/esp32: Use new esptool syntax.

Open nmattia opened this issue 4 months ago • 4 comments

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

nmattia avatar Aug 03 '25 21:08 nmattia

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.

dpgeorge avatar Nov 26 '25 03:11 dpgeorge

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

nmattia avatar Nov 27 '25 10:11 nmattia

The instructions however suggest installing it from source or with pip which 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.

dpgeorge avatar Nov 27 '25 11:11 dpgeorge

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.

nmattia avatar Nov 27 '25 12:11 nmattia