Using pio CLI, I cannot upload my firmware in a ESP32S3 board. It get stuck. I see that the esptool used in pio is 4.4, while the latest version is 4.7;
If I use directly esptool 4.7, I have no problems. How can I change the esptool used in pio to 4.7 ?
Here is the output using pio it was interrupted when stucked.
CURRENT: upload_protocol = esptool
Looking for upload port...
Using manually specified: /dev/cu.usbmodem113401
Forcing reset using 1200bps open/close on port /dev/cu.usbmodem113401
Waiting for the new upload port...
Uploading .pio/build/lolin_s3/firmware.bin
esptool.py v4.4
Serial port /dev/cu.usbmodem113401
^CConnecting...
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: f4:12:fa:cb:e3:d4
Traceback (most recent call last):
File "/Volumes/USERS/jxl/.platformio/packages/tool-esptoolpy/esptool.py", line 34, in <module>
esptool._main()
File "/Volumes/USERS/jxl/.platformio/packages/tool-esptoolpy/esptool/__init__.py", line 1026, in _main
Uploading stub...
Running stub...
main()
File "/Volumes/USERS/jxl/.platformio/packages/tool-esptoolpy/esptool/__init__.py", line 704, in main
esp = esp.run_stub()
^^^^^^^^^^^^^^
File "/Volumes/USERS/jxl/.platformio/packages/tool-esptoolpy/esptool/loader.py", line 938, in run_stub
p = self.read()
^^^^^^^^^^^
File "/Volumes/USERS/jxl/.platformio/packages/tool-esptoolpy/esptool/loader.py", line 308, in read
return next(self._slip_reader)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Volumes/USERS/jxl/.platformio/packages/tool-esptoolpy/esptool/loader.py", line 1471, in slip_reader
read_bytes = port.read(1 if waiting == 0 else waiting)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/serial/serialposix.py", line 565, in read
ready, _, _ = select.select([self.fd, self.pipe_abort_read_r], [], [], timeout.time_left())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
*** [upload] Build interrupted.
AbortedByUser: Aborted by user
Here is the output using esptool 4.7
esptool.py --port /dev/cu.usbmodem113401 write_flash 0 .pio/build/lolin_s3/firmware.bin
esptool.py v4.7.0
Serial port /dev/cu.usbmodem113401
Connecting...
Detecting chip type... ESP32-S3
Chip is ESP32-S3 (QFN56) (revision v0.1)
Features: WiFi, BLE, Embedded PSRAM 8MB (AP_3v3)
Crystal is 40MHz
MAC: f4:12:fa:cb:e3:d4
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x0003cfff...
Compressed 247472 bytes to 138287...
Wrote 247472 bytes (138287 compressed) at 0x00000000 in 2.6 seconds (effective 759.9 kbit/s)...
Hash of data verified.