ESP32 S3 - Stuck with Manual Uploading & Resetting

@ptillisch From the postings, it looks like that you are the person to go to for troubleshooting ESP32-S3 issues, so I hope that you can help with the issue below.

I am using a UM Feather S3 on a Windows 11 PC and Arduino 2.0.4, and with the help of UM Discord and this web page USB CDC and DFU Flashing — Arduino-ESP32 2.0.6 documentation , I have managed to upload and run my sketches OK. But every time that I want to upload/run a sketch I have to follow this "manual" procedure:

  1. Manually put this board into UPLOAD Mode (via holding down BOOT and then tapping on RESET and also switching to the "updated" JTAG USB COM port on the Arduino IDE side. Then I can download OK.

  2. Next, I have to push on RESET button to get the board to run my sketch, at that time the IDE would helpfully and automatically switch to the "RUN" COM Port so that I can use Serial Monitor.

Below is a screen of my Settings for this board:

Do those settings look OK to you? If they are, am I stuck with this manual process for every time that I want to upload/run a new sketch?

Also I noticed a discrepancy that I don't know if it is significant:

  • When the board is in RUN mode, using "Get Board Info" would yield the "correct" board

BoardInfoCorrect

  • When the board is in UPLOAD mode, using "Get Board Info" would yield the "incorrect" board

BoardInfo_Error

Same VID, but different PID.

Thank you!

Update 3/2/2023

I was curious, so I used IDE 1.8.19 instead with this board, and now I got to see the S/N when the board in RUN mode or in LOAD mode:

BoardInfoCorrect_IDE_1_COM4

BoardInfoCorrect_IDE_1

The board did get changed to "more proper" ESP32S3 Dev Module when it is set into LOAD mode.

Alas! No luck still have to do that manual procedure in IDE 1.8.19!

Also some of my older codes will run properly only if I used the IDE 1.8.19. Not sure why.

Update 3/2/2023

Strange things just happened in the last few hours to my IDE 1.8.19 and 2.0.4! About 8 hours ago, I could use both IDE 1.8.19 and IDE 2.0.4 for some of my existing sketches for Adafruit Feather ESP32 V2 and UM Feather ESP32 S3. But not now apparently, I can only run ESP32 related sketches only with IDE 2.0.4 and they compiled and ran as they should (so I am not complaining here). At present, on IDE 1.18.19, I cannot even run Blink.ino, if I choose either of my ESP32 boards. Blink would compile fine, find the COM Port and then a JAVA error during uploading of the sketch (see last part of log below):

Sketch uses 252309 bytes (7%) of program storage space. Maximum is 3342336 bytes.
Global variables use 22128 bytes (6%) of dynamic memory, leaving 305552 bytes for local variables. Maximum is 327680 bytes.
___REMOVE___/esptool.exe --chip esp32 --port COM8 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 8MB 0x1000 C:\Users\user1\AppData\Local\Temp\arduino_build_580856/Blink.ino.bootloader.bin 0x8000 C:\Users\user1\AppData\Local\Temp\arduino_build_580856/Blink.ino.partitions.bin 0xe000 C:\Users\user1\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.7/tools/partitions/boot_app0.bin 0x10000 C:\Users\user1\AppData\Local\Temp\arduino_build_580856/Blink.ino.bin 
java.io.IOException: Cannot run program "___REMOVE___/esptool.exe": CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)
	at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)
	at cc.arduino.packages.uploaders.SerialUploader.runCommand(SerialUploader.java:383)
	at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:197)
	at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77)
	at processing.app.SketchController.upload(SketchController.java:732)
	at processing.app.SketchController.exportApplet(SketchController.java:703)
	at processing.app.Editor$UploadHandler.run(Editor.java:2061)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(ProcessImpl.java:386)
	at java.lang.ProcessImpl.start(ProcessImpl.java:137)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 9 more
An error occurred while uploading the sketch

If I use IDE 2.0.4, then Blink would compile, upload and run fine. Is my Windows 11 PC going bonkers, or is this a hint that I should use only IDE 2.0.4 from now on for my ESP32 needs?

Hi @roboteer22

I did some investigation and found the cause of the error was a change made to the ESP32 package index:

You can restore the platform to a functional state by uninstalling and then reinstalling it:

  1. Select Tools > Board > Boards Manager from the Arduino IDE menus.
    A "Boards Manager" dialog will appear.
  2. Wait for the updates to finish, as shown by the messages printed at the bottom of the "Boards Manager" dialog.
  3. Scroll down through the list of boards platforms until you find the "esp32 by Espressif Systems" entry. Click on it.
    Some buttons will appear on the entry.
  4. Click the Remove button on the "esp32 by Espressif Systems" entry.
  5. Wait for the removal to finish.
  6. Click the Install button on the "esp32 by Espressif Systems" entry.
  7. Wait for the installation to finish.
  8. Click the Close button on the "Boards Manager" dialog.

Hello @ptillisch,

That did it! Thank you very much for the help with reinstalling ESP32 Boards V.2.0.7.

Regarding the needed "manual" BOOT+RESET buttons procedure to upload and run sketches on ESP32 S3 (my original issue), I guess that there is no relief for that in the near future?

Unfortunately I don't have any experience with the ESP32-S3. I have it on my shopping list, but don't have one on hand at this time.

Some of the other forum helpers know more about the subject. Hopefully one of them will be able to be of more assistance.

This statement in the Espressif docs makes me think it should not be required:

This procedure enables the flashing and monitoring thought the internal USB and does not requires you to manually enter into the download mode or to do the manual reset after flashing.

The platform author can associate a board definition with identifying information from the port. If there is a board definition associated with the port, the board name is shown in this "Board Info" dialog.

Although any arbitrary identification properties are supported by the Arduino platform framework, most platforms use the USB VID/PID pair, as is the case here. It seems the boards based on the ESP32-S3 (and ESP32-C3 as well!) typically have the VID/PID pair 303a:1001. I don't know much about this chip, but I know 0x303a is the VID owned by the chip manufacturer Espressif. So I would guess this is either hardcoded into the ROM or else simply offered as an optional manufacturer provided VID/PID for chip buyers who don't want to procure their own dedicated VID/PID (similar to what FTDI does with the VID/PID on the FT232R chip).

Typically in this case where a property is not uniquely identifying, the platform would not associate it with the board. For example, Arduino does not associate the 0403:6001 VID/PID pair supplied by FTDI for the FT232R chip with definition of the classic Nano board because this would cause the ports of other boards using the FT232R to be incorrectly associated with the Nano board definition in Arduino IDE.

But there is nothing in the Arduino boards platform framework to prevent each platform author from associating non-unique properties with their board definitions. That is what the ESP32 boards platform developers did. They associated many different board definitions with the VID/PID pair 303a:1001. For example:

... and so on.

So it is not clear what Arduino IDE should do in this case. It just picks the name of one of the multiple associated boards to show in the dialog and other parts of the Arduino IDE UI. Apparently there is some non-deterministic behavior in terms of which board Arduino IDE 2.x selects, so you might see the name change.

Thank you very much for the thorough reply.

I have read about the 1-time only BOOT/RESET "claimed" procedure from several makers of the S3 board, but that did not happen in my case though. And I had tried different USB cable lengths too. I am going to try different computers next to see if I get better luck.

UPDATE: 3/4/2023
I just tried Arduino and this board on another PC that never had Arduino installed, and the same "manual" procedure had to be used also.

UPDATE: 3/9/2023
I just got an Adafruit Feather S3, and it got the same issues as with the UM board: i.e., having to push Buttons BOOT/RESET to get into LOAD mode and also to set into RUN mode after LOAD. So it looks that all the S3 boards have this "feature" (at least on my Windows 11 PC) .

According to GitHub, this issue had been discussed since May 2022 (https://github.com/espressif/arduino-esp32/issues/6762). But it is not fixed yet, apparently. Don't know if the ball in Espressif's court or in Arduino's court.

@ptillisch , In the future, when you get your S3 board, I would be interested in your experiences with it, and hope that you can figure out some work-arounds. Otherwise, these S3 board are working fine for my needs.

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.