The problem started while I was able to program and flash my ESP32Devkitc_v4 with no issues at all but I was trying to programm another board that is ESP32-S2-Solo and was not able to upload any thing to it I kept trying and installing drivers for it (CP210x from silicone lab) which I have no luck with it what so ever so I decided to use the original one for my new project but when I try to connect it and test upload program to it I found that it is always failing to upload with different errors each time.
Also I am not able to connect to the USB port through the serial monitor for more than few seconds then it stops showing any messages on the terminal.
I tried to uninstall the driver and revert back all the changes with no luck.
I am using IDE v2.3.2 on a mac pro running Sonoma and the CP210x is version 6.0
I'm going to ask you to provide the full verbose output from an upload attempt.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open.
Uncheck the box next to Show verbose output during: ☑ compile in the "Preferences" dialog.
Check the box next to Show verbose output during: ☐ upload.
Click the "OK" button.
The "Preferences" dialog will close.
Attempt an upload, as you did before.
Wait for the upload to fail.
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.
Open a forum reply here by clicking the "Reply" button.
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.
Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
This will paste the error output from the upload into the code block.
Move the cursor outside of the code block markup before you add any additional text to your reply.
Sketch uses 740853 bytes (56%) of program storage space. Maximum is 1310720 bytes.
Global variables use 45912 bytes (14%) of dynamic memory, leaving 281768 bytes for local variables. Maximum is 327680 bytes.
"/Users/ahmedamer/Library/Arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool" --chip esp32 --port "/dev/cu.usbserial-0001" --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 "/private/var/folders/hd/km_q9fr123d0m47pvv5f5ln40000gn/T/arduino/sketches/CFD734F8D5278FB592ADB907126AD9D2/SimpleTime.ino.bootloader.bin" 0x8000 "/private/var/folders/hd/km_q9fr123d0m47pvv5f5ln40000gn/T/arduino/sketches/CFD734F8D5278FB592ADB907126AD9D2/SimpleTime.ino.partitions.bin" 0xe000 "/Users/ahmedamer/Library/Arduino15/packages/esp32/hardware/esp32/2.0.16/tools/partitions/boot_app0.bin" 0x10000 "/private/var/folders/hd/km_q9fr123d0m47pvv5f5ln40000gn/T/arduino/sketches/CFD734F8D5278FB592ADB907126AD9D2/SimpleTime.ino.bin"
Traceback (most recent call last):
File "esptool.py", line 34, in <module>
File "esptool/__init__.py", line 1032, in _main
File "esptool/__init__.py", line 674, in main
File "esptool/__init__.py", line 920, in get_default_connected_device
File "esptool/loader.py", line 312, in __init__
File "esptool/loader.py", line 328, in _set_port_baudrate
File "serial/serialutil.py", line 299, in baudrate
File "serial/serialposix.py", line 517, in _reconfigure_port
termios.error: (22, 'Invalid argument')
[1609] Failed to execute script 'esptool' due to unhandled exception!
esptool.py v4.5.1
Serial port /dev/cu.usbserial-0001
Failed uploading: uploading error: exit status 1
Sketch uses 740853 bytes (56%) of program storage space. Maximum is 1310720 bytes.
Global variables use 45912 bytes (14%) of dynamic memory, leaving 281768 bytes for local variables. Maximum is 327680 bytes.
"/Users/ahmedamer/Library/Arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool" --chip esp32 --port "/dev/cu.SLAB_USBtoUART" --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 "/private/var/folders/hd/km_q9fr123d0m47pvv5f5ln40000gn/T/arduino/sketches/CFD734F8D5278FB592ADB907126AD9D2/SimpleTime.ino.bootloader.bin" 0x8000 "/private/var/folders/hd/km_q9fr123d0m47pvv5f5ln40000gn/T/arduino/sketches/CFD734F8D5278FB592ADB907126AD9D2/SimpleTime.ino.partitions.bin" 0xe000 "/Users/ahmedamer/Library/Arduino15/packages/esp32/hardware/esp32/2.0.16/tools/partitions/boot_app0.bin" 0x10000 "/private/var/folders/hd/km_q9fr123d0m47pvv5f5ln40000gn/T/arduino/sketches/CFD734F8D5278FB592ADB907126AD9D2/SimpleTime.ino.bin"
Traceback (most recent call last):
File "esptool.py", line 34, in <module>
File "esptool/__init__.py", line 1032, in _main
File "esptool/__init__.py", line 674, in main
File "esptool/__init__.py", line 920, in get_default_connected_device
File "esptool/loader.py", line 302, in __init__
File "serial/__init__.py", line 90, in serial_for_url
File "serial/serialposix.py", line 332, in open
File "serial/serialposix.py", line 517, in _reconfigure_port
termios.error: (22, 'Invalid argument')
[1753] Failed to execute script 'esptool' due to unhandled exception!
esptool.py v4.5.1
Serial port /dev/cu.SLAB_USBtoUART
Failed uploading: uploading error: exit status 1
Sketch uses 740853 bytes (56%) of program storage space. Maximum is 1310720 bytes.
Global variables use 45912 bytes (14%) of dynamic memory, leaving 281768 bytes for local variables. Maximum is 327680 bytes.
"/Users/ahmedamer/Library/Arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool" --chip esp32 --port "/dev/cu.usbserial-0001" --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x1000 "/private/var/folders/hd/km_q9fr123d0m47pvv5f5ln40000gn/T/arduino/sketches/CFD734F8D5278FB592ADB907126AD9D2/SimpleTime.ino.bootloader.bin" 0x8000 "/private/var/folders/hd/km_q9fr123d0m47pvv5f5ln40000gn/T/arduino/sketches/CFD734F8D5278FB592ADB907126AD9D2/SimpleTime.ino.partitions.bin" 0xe000 "/Users/ahmedamer/Library/Arduino15/packages/esp32/hardware/esp32/2.0.16/tools/partitions/boot_app0.bin" 0x10000 "/private/var/folders/hd/km_q9fr123d0m47pvv5f5ln40000gn/T/arduino/sketches/CFD734F8D5278FB592ADB907126AD9D2/SimpleTime.ino.bin"
esptool.py v4.5.1
Serial port /dev/cu.usbserial-0001
Connecting......................................
A fatal error occurred: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html
Failed uploading: uploading error: exit status 2
Hi @ptillisch I did some changes to the IDE (removed libraries and boards and reinstalled all again) then now I am able to upload the program to the board however program does not run correctly I am getting the below output
Congratulations on finding a solution! I'm glad you are able to upload now. Thank you for taking the time to post an update.
Unfortunately, although I have sometimes been able to help people with upload problems, I'm not at all knowledgeable on the subject matter of this new problem you are experiencing. So I don't know that I'll be able to advise you on this. Fortunately some of the other forum helpers are more knowledgeable so they might be able to provide assistance.
Since it is surely unrelated to the original subject of this forum topic, my recommendation is for you to create a forum topic about the problem. That will ensure it will be noticed by the forum helpers who are knowledgeable in the subject area.
I tried a lot of solution I found on the internet where I found all of them are already applied in my case then finally I installed the IDE on a windows machine that I have and tested the board from there and it worked flawlessly after several comparisons the only difference I noticed is the version of the ESP32 board manager on the mac it was 3.0.0 and on widows it was 2.0.16 I uninstalled version 3.0.0 and installed 2.0.16 and viola every thing started working with no issues.
Hope this may help some one else that experience similar issue.