ESP32-S2 Mini: Error trying to compile and upload any code

Hi everyone,
I was coding in my ESP32S2 Mini and when I tried to compile and upload the code, it didn't work. The board reset but the code didn't run. Anyways the next message appeared in the console.

A serial exception error occurred: Cannot configure port, something went wrong. Original message: OSError(22, 'Se ha especificado un dispositivo que no existe.', None, 433) Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers. For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html Wrote 878592 bytes (566877 compressed) at 0x00010000 in 18.7 seconds (376.8 kbit/s). Hash of data verified. Hard resetting with a watchdog... Failed uploading: uploading error: exit status 1

Do you know why this is happening?

I've tried a many things:

  • Using another board
  • Update the drivers to the last version
  • Compile and upload another code

In all the cases the same error came out, so I don't know what else I can do.

Hi @yumik0_chan. I'm going to ask you to provide the full verbose output from an upload attempt.


:red_exclamation_mark: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to Show verbose output during: ☑ compile in the "Preferences" dialog.
  3. Check the box next to Show verbose output during: ☐ upload.
  4. Click the "OK" button.
    The "Preferences" dialog will close.
  5. Attempt an upload, as you did before.
  6. Wait for the upload to fail.
  7. You will see an "Upload error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  8. Open a reply here on this forum topic by clicking the "Reply" button.
  9. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  10. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the error output from the upload into the code block.
  11. Move the cursor outside of the code block markup before you add any additional text to your reply.
  12. Click the "Reply" button to publish the post.

Here is the full output of the fail upload

Sketch uses 955674 bytes (72%) of program storage space. Maximum is 1310720 bytes.
Global variables use 58080 bytes (17%) of dynamic memory, leaving 269600 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\Usuario\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\5.0.0/esptool.exe" --chip esp32s2 --port "COM3" --baud 921600  --before default-reset --after hard-reset write-flash  -z --flash-mode keep --flash-freq keep --flash-size keep 0x1000 "C:\Users\Usuario\AppData\Local\arduino\sketches\195667C389261BDD9FC9D9CE4A92C838/WebExplorer.ino.bootloader.bin" 0x8000 "C:\Users\Usuario\AppData\Local\arduino\sketches\195667C389261BDD9FC9D9CE4A92C838/WebExplorer.ino.partitions.bin" 0xe000 "C:\Users\Usuario\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.0/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\Usuario\AppData\Local\arduino\sketches\195667C389261BDD9FC9D9CE4A92C838/WebExplorer.ino.bin" 
esptool v5.0.0
Serial port COM3:
Connecting...
A serial exception error occurred: Cannot configure port, something went wrong. Original message: OSError(22, 'Se ha especificado un dispositivo que no existe.', None, 433)

Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 1

This error might be caused by having the wrong port selected from the Tools > Port menu in Arduino IDE.

Please perform this experiment to verify that the COM3 port you have selected is your Arduino board:

  1. Connect the Arduino board to your computer with a USB cable (if it is not already).
  2. Select Tools > Port from the Arduino IDE menus. If one of the ports in the menu is labeled as "ESP32 Family Device", that is the port of your Arduino board.

If you saw the port labeled with the board name in the Tools > Port menu, select that port and try uploading again.

If this doesn't solve the problem, please reply here on this forum topic with the answers to the following questions:

  • While following those instructions, did you see a port in the Tools > Port menu that was labeled with the board name?
  • If you did see a labeled port, was the upload successful after you selected that port?

The reason I'm suspicious about the port is because the output you shared in post #1 showed that the upload had actually completed:

But the output you shared in post #3 showed that the attempt to connect to the board via the serial port completely failed.

The only port that is accesible is the COM3 that is the ESP32S2 Dev Module, and I don't have more ports availables.

Here is the configuration that i'm using:

OK, great. That proves that COM3 is indeed the correct port. I was wrong about the "ESP32 Family Device" part. The other native USB ESP32 chips are labeled that way, but they are actually able to give the ESP32-S2 chip a more specific label due to the fact that, unlike the other chips, it apparently has a unique identifier.

Anyway, I can see from your screenshot that the most recent upload you did produced different output than the output you shared in post #3. Please follow the instructions I provided in post #2 once again so that we can see the output that is being produced now.

Here is the last error

Sketch uses 955674 bytes (72%) of program storage space. Maximum is 1310720 bytes.
Global variables use 58080 bytes (17%) of dynamic memory, leaving 269600 bytes for local variables. Maximum is 327680 bytes.
"C:\Users\Usuario\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\5.0.0/esptool.exe" --chip esp32s2 --port "COM3" --baud 921600  --before default-reset --after hard-reset write-flash  -z --flash-mode keep --flash-freq keep --flash-size keep 0x1000 "C:\Users\Usuario\AppData\Local\arduino\sketches\195667C389261BDD9FC9D9CE4A92C838/WebExplorer.ino.bootloader.bin" 0x8000 "C:\Users\Usuario\AppData\Local\arduino\sketches\195667C389261BDD9FC9D9CE4A92C838/WebExplorer.ino.partitions.bin" 0xe000 "C:\Users\Usuario\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.3.0/tools/partitions/boot_app0.bin" 0x10000 "C:\Users\Usuario\AppData\Local\arduino\sketches\195667C389261BDD9FC9D9CE4A92C838/WebExplorer.ino.bin" 
esptool v5.0.0
Serial port COM3:
Connecting...
Connected to ESP32-S2 on COM3:
Chip type:          ESP32-S2FNR2 (revision v0.0)
Features:           Wi-Fi, Single Core, 240MHz, Embedded Flash 4MB, Embedded PSRAM 2MB, ADC and temperature sensor calibration in BLK2 of eFuse V2
Crystal frequency:  40MHz
USB mode:           USB-OTG
MAC:                48:27:e2:51:2e:bc

Uploading stub flasher...
Running stub flasher...
Stub flasher running.
Changing baud rate to 921600...
Changed.

Configuring flash size...
Flash will be erased from 0x00001000 to 0x00006fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Flash will be erased from 0x00010000 to 0x000f9fff...
Compressed 21184 bytes to 13584...

Writing at 0x00001000 [                              ]   0.0% 0/13584 bytes... 

Writing at 0x000022a3 [===>                          ]  15.1% 2048/13584 bytes... 

Writing at 0x00002df8 [========>                     ]  30.2% 4096/13584 bytes... 

Writing at 0x00003a44 [============>                 ]  45.2% 6144/13584 bytes... 

Writing at 0x000044bb [=================>            ]  60.3% 8192/13584 bytes... 

Writing at 0x00004ea5 [=====================>        ]  75.4% 10240/13584 bytes... 

Writing at 0x00005ab4 [==========================>   ]  90.5% 12288/13584 bytes... 

Writing at 0x000062c0 [==============================] 100.0% 13584/13584 bytes... 
Wrote 21184 bytes (13584 compressed) at 0x00001000 in 0.5 seconds (350.6 kbit/s).
Hash of data verified.
Compressed 3072 bytes to 146...

Writing at 0x00008000 [                              ]   0.0% 0/146 bytes... 

Writing at 0x00008c00 [==============================] 100.0% 146/146 bytes... 
Wrote 3072 bytes (146 compressed) at 0x00008000 in 0.1 seconds (220.7 kbit/s).
Hash of data verified.
Compressed 8192 bytes to 47...

Writing at 0x0000e000 [                              ]   0.0% 0/47 bytes... 

Writing at 0x00010000 [==============================] 100.0% 47/47 bytes... 
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (501.7 kbit/s).
Hash of data verified.
Compressed 955824 bytes to 611807...

Writing at 0x00010000 [                              ]   0.0% 0/611807 bytes... 

Writing at 0x00010d9d [                              ]   0.3% 2048/611807 bytes... 

Writing at 0x0001213e [                              ]   0.7% 4096/611807 bytes... 

Writing at 0x000137f2 [                              ]   1.0% 6144/611807 bytes... 

Writing at 0x00015414 [                              ]   1.3% 8192/611807 bytes... 

Writing at 0x00016cd5 [                              ]   1.7% 10240/611807 bytes... 

Writing at 0x000186ab [                              ]   2.0% 12288/611807 bytes... 

Writing at 0x0001a223 [                              ]   2.3% 14336/611807 bytes... 

Writing at 0x0001bd11 [                              ]   2.7% 16384/611807 bytes... 

Writing at 0x0001dacb [                              ]   3.0% 18432/611807 bytes... 

Writing at 0x0001f117 [>                             ]   3.3% 20480/611807 bytes... 

Writing at 0x000205a5 [>                             ]   3.7% 22528/611807 bytes... 

Writing at 0x000218cf [>                             ]   4.0% 24576/611807 bytes... 

Writing at 0x00022cca [>                             ]   4.4% 26624/611807 bytes... 

Writing at 0x00024283 [>                             ]   4.7% 28672/611807 bytes... 

Writing at 0x0002531e [>                             ]   5.0% 30720/611807 bytes... 

Writing at 0x00026709 [>                             ]   5.4% 32768/611807 bytes... 

Writing at 0x00027404 [>                             ]   5.7% 34816/611807 bytes... 

Writing at 0x00028021 [>                             ]   6.0% 36864/611807 bytes... 

Writing at 0x000287e9 [>                             ]   6.4% 38912/611807 bytes... 

Writing at 0x0002979c [=>                            ]   6.7% 40960/611807 bytes... 

Writing at 0x0002af2b [=>                            ]   7.0% 43008/611807 bytes... 

Writing at 0x0002c2f5 [=>                            ]   7.4% 45056/611807 bytes... 

Writing at 0x0002cdbe [=>                            ]   7.7% 47104/611807 bytes... 

Writing at 0x0002f07f [=>                            ]   8.0% 49152/611807 bytes... 

Writing at 0x00031b03 [=>                            ]   8.4% 51200/611807 bytes... 

Writing at 0x0003466c [=>                            ]   8.7% 53248/611807 bytes... 

Writing at 0x0003807c [=>                            ]   9.0% 55296/611807 bytes... 

Writing at 0x0003a4a9 [=>                            ]   9.4% 57344/611807 bytes... 

Writing at 0x0003b51f [=>                            ]   9.7% 59392/611807 bytes... 

Writing at 0x0003c751 [==>                           ]  10.0% 61440/611807 bytes... 

Writing at 0x0003d310 [==>                           ]  10.4% 63488/611807 bytes... 

Writing at 0x0003de40 [==>                           ]  10.7% 65536/611807 bytes... 

Writing at 0x0003e74d [==>                           ]  11.0% 67584/611807 bytes... 

Writing at 0x0003f37b [==>                           ]  11.4% 69632/611807 bytes... 

Writing at 0x0003fdfd [==>                           ]  11.7% 71680/611807 bytes... 

Writing at 0x00040a55 [==>                           ]  12.1% 73728/611807 bytes... 

Writing at 0x00041728 [==>                           ]  12.4% 75776/611807 bytes... 

Writing at 0x00042432 [==>                           ]  12.7% 77824/611807 bytes... 

Writing at 0x00043168 [==>                           ]  13.1% 79872/611807 bytes... 

Writing at 0x00043fd4 [===>                          ]  13.4% 81920/611807 bytes... 

Writing at 0x00044ab2 [===>                          ]  13.7% 83968/611807 bytes... 

Writing at 0x000454aa [===>                          ]  14.1% 86016/611807 bytes... 

Writing at 0x00045ec7 [===>                          ]  14.4% 88064/611807 bytes... 

Writing at 0x00046ae4 [===>                          ]  14.7% 90112/611807 bytes... 

Writing at 0x000475af [===>                          ]  15.1% 92160/611807 bytes... 

Writing at 0x00048411 [===>                          ]  15.4% 94208/611807 bytes... 

Writing at 0x000491c2 [===>                          ]  15.7% 96256/611807 bytes... 

Writing at 0x00049e9f [===>                          ]  16.1% 98304/611807 bytes... 

Writing at 0x0004ac81 [===>                          ]  16.4% 100352/611807 bytes... 

Writing at 0x0004b8d3 [====>                         ]  16.7% 102400/611807 bytes... 

Writing at 0x0004c4e9 [====>                         ]  17.1% 104448/611807 bytes... 

Writing at 0x0004cfd7 [====>                         ]  17.4% 106496/611807 bytes... 

Writing at 0x0004dd28 [====>                         ]  17.7% 108544/611807 bytes... 

Writing at 0x0004ea9b [====>                         ]  18.1% 110592/611807 bytes... 

Writing at 0x0004f59f [====>                         ]  18.4% 112640/611807 bytes... 

Writing at 0x00050088 [====>                         ]  18.7% 114688/611807 bytes... 

Writing at 0x00050d1b [====>                         ]  19.1% 116736/611807 bytes... 

Writing at 0x00051761 [====>                         ]  19.4% 118784/611807 bytes... 

Writing at 0x000522b3 [====>                         ]  19.8% 120832/611807 bytes... 

Writing at 0x00052d79 [=====>                        ]  20.1% 122880/611807 bytes... 

Writing at 0x00053862 [=====>                        ]  20.4% 124928/611807 bytes... 

Writing at 0x000541f1 [=====>                        ]  20.8% 126976/611807 bytes... 

Writing at 0x00054c0c [=====>                        ]  21.1% 129024/611807 bytes... 

Writing at 0x0005566f [=====>                        ]  21.4% 131072/611807 bytes... 

Writing at 0x00056102 [=====>                        ]  21.8% 133120/611807 bytes... 

Writing at 0x00056b66 [=====>                        ]  22.1% 135168/611807 bytes... 

Writing at 0x000574f0 [=====>                        ]  22.4% 137216/611807 bytes... 

Writing at 0x00057f6f [=====>                        ]  22.8% 139264/611807 bytes... 

Writing at 0x00058ab3 [=====>                        ]  23.1% 141312/611807 bytes... 

Writing at 0x000595e6 [======>                       ]  23.4% 143360/611807 bytes... 

Writing at 0x0005a0b2 [======>                       ]  23.8% 145408/611807 bytes... 

Writing at 0x0005ac15 [======>                       ]  24.1% 147456/611807 bytes... 

Writing at 0x0005b661 [======>                       ]  24.4% 149504/611807 bytes... 

Writing at 0x0005c0f7 [======>                       ]  24.8% 151552/611807 bytes... 

Writing at 0x0005cc8b [======>                       ]  25.1% 153600/611807 bytes... 

Writing at 0x0005d760 [======>                       ]  25.4% 155648/611807 bytes... 

Writing at 0x0005e1e3 [======>                       ]  25.8% 157696/611807 bytes... 

Writing at 0x0005f02d [======>                       ]  26.1% 159744/611807 bytes... 

Writing at 0x0005f9f3 [======>                       ]  26.4% 161792/611807 bytes... 

Writing at 0x00060438 [=======>                      ]  26.8% 163840/611807 bytes... 

Writing at 0x00060df1 [=======>                      ]  27.1% 165888/611807 bytes... 

Writing at 0x00061842 [=======>                      ]  27.4% 167936/611807 bytes... 

Writing at 0x00062250 [=======>                      ]  27.8% 169984/611807 bytes... 

Writing at 0x00062c8c [=======>                      ]  28.1% 172032/611807 bytes... 

Writing at 0x000636cc [=======>                      ]  28.5% 174080/611807 bytes... 

Writing at 0x0006411d [=======>                      ]  28.8% 176128/611807 bytes... 

Writing at 0x00064bc0 [=======>                      ]  29.1% 178176/611807 bytes... 

Writing at 0x0006562e [=======>                      ]  29.5% 180224/611807 bytes... 

Writing at 0x00066037 [=======>                      ]  29.8% 182272/611807 bytes... 

Writing at 0x00066a27 [========>                     ]  30.1% 184320/611807 bytes... 

Writing at 0x000674df [========>                     ]  30.5% 186368/611807 bytes... 

Writing at 0x00067ffd [========>                     ]  30.8% 188416/611807 bytes... 

Writing at 0x00068afb [========>                     ]  31.1% 190464/611807 bytes... 

Writing at 0x00069537 [========>                     ]  31.5% 192512/611807 bytes... 

Writing at 0x00069f16 [========>                     ]  31.8% 194560/611807 bytes... 

Writing at 0x0006a99c [========>                     ]  32.1% 196608/611807 bytes... 

Writing at 0x0006b4b9 [========>                     ]  32.5% 198656/611807 bytes... 

Writing at 0x0006c010 [========>                     ]  32.8% 200704/611807 bytes... 

Writing at 0x0006c9bb [========>                     ]  33.1% 202752/611807 bytes... 

Writing at 0x0006d445 [=========>                    ]  33.5% 204800/611807 bytes... 

Writing at 0x0006df1b [=========>                    ]  33.8% 206848/611807 bytes... 

Writing at 0x0006e998 [=========>                    ]  34.1% 208896/611807 bytes... 

Writing at 0x0006f336 [=========>                    ]  34.5% 210944/611807 bytes... 

Writing at 0x0006fdf0 [=========>                    ]  34.8% 212992/611807 bytes... 

Writing at 0x0007095f [=========>                    ]  35.1% 215040/611807 bytes... 

Writing at 0x000713de [=========>                    ]  35.5% 217088/611807 bytes... 

Writing at 0x00071dfb [=========>                    ]  35.8% 219136/611807 bytes... 

Writing at 0x0007282e [=========>                    ]  36.2% 221184/611807 bytes... 

Writing at 0x00073315 [=========>                    ]  36.5% 223232/611807 bytes... 

Writing at 0x00073f20 [==========>                   ]  36.8% 225280/611807 bytes... 

Writing at 0x000749e7 [==========>                   ]  37.2% 227328/611807 bytes... 

Writing at 0x000754d1 [==========>                   ]  37.5% 229376/611807 bytes... 

Writing at 0x00075fd0 [==========>                   ]  37.8% 231424/611807 bytes... 

Writing at 0x00076b42 [==========>                   ]  38.2% 233472/611807 bytes... 

Writing at 0x00077654 [==========>                   ]  38.5% 235520/611807 bytes... 

Writing at 0x00078099 [==========>                   ]  38.8% 237568/611807 bytes... 

Writing at 0x00078ac7 [==========>                   ]  39.2% 239616/611807 bytes... 

Writing at 0x00079602 [==========>                   ]  39.5% 241664/611807 bytes... 

Writing at 0x0007a0a3 [==========>                   ]  39.8% 243712/611807 bytes... 

Writing at 0x0007aae5 [===========>                  ]  40.2% 245760/611807 bytes... 

Writing at 0x0007b515 [===========>                  ]  40.5% 247808/611807 bytes... 

Writing at 0x0007bef4 [===========>                  ]  40.8% 249856/611807 bytes... 

Writing at 0x0007c8d1 [===========>                  ]  41.2% 251904/611807 bytes... 

Writing at 0x0007d2c5 [===========>                  ]  41.5% 253952/611807 bytes... 

Writing at 0x0007ddbd [===========>                  ]  41.8% 256000/611807 bytes... 

Writing at 0x0007e7eb [===========>                  ]  42.2% 258048/611807 bytes... 

Writing at 0x0007f1f4 [===========>                  ]  42.5% 260096/611807 bytes... 

Writing at 0x0007fce5 [===========>                  ]  42.8% 262144/611807 bytes... 

Writing at 0x000808ee [===========>                  ]  43.2% 264192/611807 bytes... 

Writing at 0x000812f9 [============>                 ]  43.5% 266240/611807 bytes... 

Writing at 0x00081db0 [============>                 ]  43.9% 268288/611807 bytes... 

Writing at 0x000827b8 [============>                 ]  44.2% 270336/611807 bytes... 

Writing at 0x0008315b [============>                 ]  44.5% 272384/611807 bytes... 

Writing at 0x00083b3b [============>                 ]  44.9% 274432/611807 bytes... 

Writing at 0x00084563 [============>                 ]  45.2% 276480/611807 bytes... 

Writing at 0x00084f73 [============>                 ]  45.5% 278528/611807 bytes... 

Writing at 0x000859ca [============>                 ]  45.9% 280576/611807 bytes... 

Writing at 0x000865c8 [============>                 ]  46.2% 282624/611807 bytes... 

Writing at 0x00087060 [============>                 ]  46.5% 284672/611807 bytes... 

Writing at 0x00087aeb [=============>                ]  46.9% 286720/611807 bytes... 

Writing at 0x00088577 [=============>                ]  47.2% 288768/611807 bytes... 

Writing at 0x000890e2 [=============>                ]  47.5% 290816/611807 bytes... 

Writing at 0x00089ba8 [=============>                ]  47.9% 292864/611807 bytes... 

Writing at 0x0008a6fc [=============>                ]  48.2% 294912/611807 bytes... 

Writing at 0x0008b089 [=============>                ]  48.5% 296960/611807 bytes... 

Writing at 0x0008ba34 [=============>                ]  48.9% 299008/611807 bytes... 

Writing at 0x0008c47b [=============>                ]  49.2% 301056/611807 bytes... 

Writing at 0x0008ce9a [=============>                ]  49.5% 303104/611807 bytes... 

Writing at 0x0008d986 [=============>                ]  49.9% 305152/611807 bytes... 

Writing at 0x0008e5aa [==============>               ]  50.2% 307200/611807 bytes... 

Writing at 0x0008efe4 [==============>               ]  50.5% 309248/611807 bytes... 

Writing at 0x0008fb5f [==============>               ]  50.9% 311296/611807 bytes... 

Writing at 0x00090684 [==============>               ]  51.2% 313344/611807 bytes... 

Writing at 0x00091160 [==============>               ]  51.6% 315392/611807 bytes... 

Writing at 0x00091ba7 [==============>               ]  51.9% 317440/611807 bytes... 

Writing at 0x000925c7 [==============>               ]  52.2% 319488/611807 bytes... 

Writing at 0x0009307c [==============>               ]  52.6% 321536/611807 bytes... 

Writing at 0x00093b60 [==============>               ]  52.9% 323584/611807 bytes... 

Writing at 0x000945e1 [==============>               ]  53.2% 325632/611807 bytes... 

Writing at 0x000950eb [===============>              ]  53.6% 327680/611807 bytes... 

Writing at 0x00095acb [===============>              ]  53.9% 329728/611807 bytes... 

Writing at 0x00096580 [===============>              ]  54.2% 331776/611807 bytes... 

Writing at 0x00096fff [===============>              ]  54.6% 333824/611807 bytes... 

Writing at 0x000979cf [===============>              ]  54.9% 335872/611807 bytes... 

Writing at 0x00098629 [===============>              ]  55.2% 337920/611807 bytes... 

Writing at 0x000990c1 [===============>              ]  55.6% 339968/611807 bytes... 

Writing at 0x00099be8 [===============>              ]  55.9% 342016/611807 bytes... 

Writing at 0x0009a6b9 [===============>              ]  56.2% 344064/611807 bytes... 

Writing at 0x0009b095 [===============>              ]  56.6% 346112/611807 bytes... 

Writing at 0x0009bacc [================>             ]  56.9% 348160/611807 bytes... 

Writing at 0x0009c62d [================>             ]  57.2% 350208/611807 bytes... 

Writing at 0x0009d062 [================>             ]  57.6% 352256/611807 bytes... 

Writing at 0x0009dab3 [================>             ]  57.9% 354304/611807 bytes... 

Writing at 0x0009e4ac [================>             ]  58.2% 356352/611807 bytes... 

Writing at 0x0009eff1 [================>             ]  58.6% 358400/611807 bytes... 

Writing at 0x0009fae9 [================>             ]  58.9% 360448/611807 bytes... 

Writing at 0x000a05f4 [================>             ]  59.3% 362496/611807 bytes... 

Writing at 0x000a1193 [================>             ]  59.6% 364544/611807 bytes... 

Writing at 0x000a1cdd [================>             ]  59.9% 366592/611807 bytes... 

Writing at 0x000a274b [=================>            ]  60.3% 368640/611807 bytes... 

Writing at 0x000a3167 [=================>            ]  60.6% 370688/611807 bytes... 

Writing at 0x000a3b8b [=================>            ]  60.9% 372736/611807 bytes... 

Writing at 0x000a4498 [=================>            ]  61.3% 374784/611807 bytes... 

Writing at 0x000a4ec5 [=================>            ]  61.6% 376832/611807 bytes... 

Writing at 0x000a59ac [=================>            ]  61.9% 378880/611807 bytes... 

Writing at 0x000a6485 [=================>            ]  62.3% 380928/611807 bytes... 

Writing at 0x000a6ed7 [=================>            ]  62.6% 382976/611807 bytes... 

Writing at 0x000a7961 [=================>            ]  62.9% 385024/611807 bytes... 

Writing at 0x000a8394 [=================>            ]  63.3% 387072/611807 bytes... 

Writing at 0x000a8d2c [==================>           ]  63.6% 389120/611807 bytes... 

Writing at 0x000a9789 [==================>           ]  63.9% 391168/611807 bytes... 

Writing at 0x000aa13c [==================>           ]  64.3% 393216/611807 bytes... 

Writing at 0x000aab33 [==================>           ]  64.6% 395264/611807 bytes... 

Writing at 0x000ab4f2 [==================>           ]  64.9% 397312/611807 bytes... 

Writing at 0x000abf1e [==================>           ]  65.3% 399360/611807 bytes... 

Writing at 0x000ac91f [==================>           ]  65.6% 401408/611807 bytes... 

Writing at 0x000ad34a [==================>           ]  65.9% 403456/611807 bytes... 

Writing at 0x000adf4c [==================>           ]  66.3% 405504/611807 bytes... 

Writing at 0x000aeb36 [==================>           ]  66.6% 407552/611807 bytes... 

Writing at 0x000af7d5 [===================>          ]  66.9% 409600/611807 bytes... 

Writing at 0x000b0204 [===================>          ]  67.3% 411648/611807 bytes... 

Writing at 0x000b0cfb [===================>          ]  67.6% 413696/611807 bytes... 

Writing at 0x000b17bc [===================>          ]  68.0% 415744/611807 bytes... 

Writing at 0x000b228f [===================>          ]  68.3% 417792/611807 bytes... 

Writing at 0x000b2c8f [===================>          ]  68.6% 419840/611807 bytes... 

Writing at 0x000b38fa [===================>          ]  69.0% 421888/611807 bytes... 

Writing at 0x000b4401 [===================>          ]  69.3% 423936/611807 bytes... 

Writing at 0x000b4e42 [===================>          ]  69.6% 425984/611807 bytes... 

Writing at 0x000b5868 [===================>          ]  70.0% 428032/611807 bytes... 

Writing at 0x000b638c [====================>         ]  70.3% 430080/611807 bytes... 

Writing at 0x000b6eae [====================>         ]  70.6% 432128/611807 bytes... 

Writing at 0x000b7994 [====================>         ]  71.0% 434176/611807 bytes... 

Writing at 0x000b846b [====================>         ]  71.3% 436224/611807 bytes... 

Writing at 0x000b8f62 [====================>         ]  71.6% 438272/611807 bytes... 

Writing at 0x000b9980 [====================>         ]  72.0% 440320/611807 bytes... 

Writing at 0x000ba44b [====================>         ]  72.3% 442368/611807 bytes... 

Writing at 0x000bae79 [====================>         ]  72.6% 444416/611807 bytes... 

Writing at 0x000bb9b0 [====================>         ]  73.0% 446464/611807 bytes... 

Writing at 0x000bc4f9 [====================>         ]  73.3% 448512/611807 bytes... 

Writing at 0x000bcee4 [=====================>        ]  73.6% 450560/611807 bytes... 

Writing at 0x000bd908 [=====================>        ]  74.0% 452608/611807 bytes... 

Writing at 0x000be446 [=====================>        ]  74.3% 454656/611807 bytes... 

Writing at 0x000bee85 [=====================>        ]  74.6% 456704/611807 bytes... 

Writing at 0x000bf93f [=====================>        ]  75.0% 458752/611807 bytes... 

Writing at 0x000c03db [=====================>        ]  75.3% 460800/611807 bytes... 

Writing at 0x000c0df2 [=====================>        ]  75.7% 462848/611807 bytes... 

Writing at 0x000c1895 [=====================>        ]  76.0% 464896/611807 bytes... 

Writing at 0x000c22e5 [=====================>        ]  76.3% 466944/611807 bytes... 

Writing at 0x000c2dd2 [=====================>        ]  76.7% 468992/611807 bytes... 

Writing at 0x000c37ba [======================>       ]  77.0% 471040/611807 bytes... 

Writing at 0x000c42d5 [======================>       ]  77.3% 473088/611807 bytes... 

Writing at 0x000c4f44 [======================>       ]  77.7% 475136/611807 bytes... 

Writing at 0x000c59cf [======================>       ]  78.0% 477184/611807 bytes... 

Writing at 0x000c64b8 [======================>       ]  78.3% 479232/611807 bytes... 

Writing at 0x000c700a [======================>       ]  78.7% 481280/611807 bytes... 

Writing at 0x000c7aa4 [======================>       ]  79.0% 483328/611807 bytes... 

Writing at 0x000c855a [======================>       ]  79.3% 485376/611807 bytes... 

Writing at 0x000c9119 [======================>       ]  79.7% 487424/611807 bytes... 

Writing at 0x000c9db5 [=======================>      ]  80.0% 489472/611807 bytes... 

Writing at 0x000cac09 [=======================>      ]  80.3% 491520/611807 bytes... 

Writing at 0x000cb81b [=======================>      ]  80.7% 493568/611807 bytes... 

Writing at 0x000cc542 [=======================>      ]  81.0% 495616/611807 bytes... 

Writing at 0x000cd04f [=======================>      ]  81.3% 497664/611807 bytes... 

Writing at 0x000cdde6 [=======================>      ]  81.7% 499712/611807 bytes... 

Writing at 0x000ce867 [=======================>      ]  82.0% 501760/611807 bytes... 

Writing at 0x000cf2bb [=======================>      ]  82.3% 503808/611807 bytes... 

Writing at 0x000cfd1d [=======================>      ]  82.7% 505856/611807 bytes... 

Writing at 0x000d07df [=======================>      ]  83.0% 507904/611807 bytes... 

Writing at 0x000d119e [========================>     ]  83.4% 509952/611807 bytes... 

Writing at 0x000d1bb6 [========================>     ]  83.7% 512000/611807 bytes... 

Writing at 0x000d2635 [========================>     ]  84.0% 514048/611807 bytes... 

Writing at 0x000d31e1 [========================>     ]  84.4% 516096/611807 bytes... 

Writing at 0x000d3d75 [========================>     ]  84.7% 518144/611807 bytes... 

Writing at 0x000d4953 [========================>     ]  85.0% 520192/611807 bytes... 

Writing at 0x000d52f2 [========================>     ]  85.4% 522240/611807 bytes... 

Writing at 0x000d60fb [========================>     ]  85.7% 524288/611807 bytes... 

Writing at 0x000d7931 [========================>     ]  86.0% 526336/611807 bytes... 

Writing at 0x000d8638 [========================>     ]  86.4% 528384/611807 bytes... 

Writing at 0x000d9b0b [=========================>    ]  86.7% 530432/611807 bytes... 

Writing at 0x000db5ce [=========================>    ]  87.0% 532480/611807 bytes... 

Writing at 0x000dde11 [=========================>    ]  87.4% 534528/611807 bytes... 

Writing at 0x000df5e3 [=========================>    ]  87.7% 536576/611807 bytes... 

Writing at 0x000e00cf [=========================>    ]  88.0% 538624/611807 bytes... 

Writing at 0x000e0ed0 [=========================>    ]  88.4% 540672/611807 bytes... 

Writing at 0x000e1bdb [=========================>    ]  88.7% 542720/611807 bytes... 

Writing at 0x000e27da [=========================>    ]  89.0% 544768/611807 bytes... 

Writing at 0x000e334a [=========================>    ]  89.4% 546816/611807 bytes... 

Writing at 0x000e3e4c [=========================>    ]  89.7% 548864/611807 bytes... 

Writing at 0x000e484d [==========================>   ]  90.0% 550912/611807 bytes... 

Writing at 0x000e5241 [==========================>   ]  90.4% 552960/611807 bytes... 

Writing at 0x000e5cab [==========================>   ]  90.7% 555008/611807 bytes... 

Writing at 0x000e66ce [==========================>   ]  91.1% 557056/611807 bytes... 

Writing at 0x000e7171 [==========================>   ]  91.4% 559104/611807 bytes... 

Writing at 0x000e7b99 [==========================>   ]  91.7% 561152/611807 bytes... 

Writing at 0x000e85bc [==========================>   ]  92.1% 563200/611807 bytes... 

Writing at 0x000e8f52 [==========================>   ]  92.4% 565248/611807 bytes... 

Writing at 0x000e9953 [==========================>   ]  92.7% 567296/611807 bytes... 

Writing at 0x000ea39a [==========================>   ]  93.1% 569344/611807 bytes... 

Writing at 0x000eadf0 [===========================>  ]  93.4% 571392/611807 bytes... 

Writing at 0x000eb814 [===========================>  ]  93.7% 573440/611807 bytes... 

Writing at 0x000ec27a [===========================>  ]  94.1% 575488/611807 bytes... 

Writing at 0x000ece53 [===========================>  ]  94.4% 577536/611807 bytes... 

Writing at 0x000ed987 [===========================>  ]  94.7% 579584/611807 bytes... 

Writing at 0x000ee69a [===========================>  ]  95.1% 581632/611807 bytes... 

Writing at 0x000ef2e6 [===========================>  ]  95.4% 583680/611807 bytes... 

Writing at 0x000efe71 [===========================>  ]  95.7% 585728/611807 bytes... 

Writing at 0x000f0a85 [===========================>  ]  96.1% 587776/611807 bytes... 

Writing at 0x000f1490 [===========================>  ]  96.4% 589824/611807 bytes... 

Writing at 0x000f202c [============================> ]  96.7% 591872/611807 bytes... 

Writing at 0x000f2b01 [============================> ]  97.1% 593920/611807 bytes... 

Writing at 0x000f384d [============================> ]  97.4% 595968/611807 bytes... 

Writing at 0x000f4416 [============================> ]  97.7% 598016/611807 bytes... 

Writing at 0x000f5127 [============================> ]  98.1% 600064/611807 bytes... 

Writing at 0x000f600d [============================> ]  98.4% 602112/611807 bytes... 

Writing at 0x000f6a26 [============================> ]  98.8% 604160/611807 bytes... 

Writing at 0x000f74a1 [============================> ]  99.1% 606208/611807 bytes... 

Writing at 0x000f7f74 [============================> ]  99.4% 608256/611807 bytes... 

Writing at 0x000f8bd3 [============================> ]  99.8% 610304/611807 bytes... 

Writing at 0x000f95b0 [==============================] 100.0% 611807/611807 bytes... 

A serial exception error occurred: Cannot configure port, something went wrong. Original message: OSError(22, 'Se ha especificado un dispositivo que no existe.', None, 433)
Note: This error originates from pySerial. It is likely not a problem with esptool, but with the hardware connection or drivers.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Wrote 955824 bytes (611807 compressed) at 0x00010000 in 20.3 seconds (377.5 kbit/s).
Hash of data verified.

Hard resetting with a watchdog...
Failed uploading: uploading error: exit status 1

I had a similar problem but it was with a seed studio XIAO s3 board.
i had to completely remove the device drivers, and retry again. Some of these in addition to the device driver, you have to download the driver for the specific chip used to interface to the COM port. you can find the tiny little chip with a magnifying glass to be sure you have the correct driver.
Finally sometimes mine would boot sometimes not. Adding a 0.1uF capacitor on the power feed solved that.
I hope that this helps you in some way.
Finally i have had zero troubles from boards from Freenove boards, and even better ones from Espressif. you can buy the Espressif ones on digikey at a reasonable price

I also tried to remove the drivers but nothing happend. Also, I tried to upgrade the drivers but it says that the drivers are in the earliest version.

OK, great. In this output the upload was successful. It seems the "OSError(22, 'Se ha especificado un dispositivo que no existe.', None, 433)" error message is either spurious, or is caused by something that does not impact the upload.

I did see a report about the spurious message here:

However, the claim there was that the bug was fixed in version 5.0.0 of the esptool tool that is used to upload sketches to the ESP32 boards, yet you are still encountering it even though version 5.0.0 is in use:

So I'm not sure what is going on. But I also suspect it is not related to the other problem you reported:

So I suggest we shift our focus to trying to troubleshoot that "code didn't run" problem. If we can solve the "code didn't run" problem, then you can simply ignore the spurious "OSError(22, 'Se ha especificado un dispositivo que no existe.', None, 433)" error message and carry on with your Arduino projects.

Please provide a detailed description of what led you to the conclusion that the code is not running on the board.

Make sure to include the following information:

  • What did you do?
  • What were the results you expected from doing that thing?
  • What were the results you observed that did not match your expectations?

I was programming a Web server on the ESP32. So, when I connect the ESP32 it suposse to expose a Wifi signal that you can be able to connect, once you are connect to that signal you can go to and specific rute, were you can find a web for upload and download .txt files.

The code don't seem to have any problem. About the board, there is a light when I connect it (when it works properly), in this case no light is visible.

I can tell you also that code from ESP32 classic is not completely compatible with the S2, and the S3 even.
For instance to use SPI bus on the S3 you must enable FSPI otherwise the chip will not boot. It will compile but the LEDS wont light up.
Espressifs website can get you on track im sure of that

I don't think that the problem is the connection, I can compile and upload code in the Esp32S2 outside the Arduino IDE, (using a website). Both boards worked with that way, but using the IDE no, so I think that it's a wrong configuration in the arduino ide.

Perhaps it is only the error message that is wrong? It looks like the program was 100% loaded. Does it run if you press the reset button?