I am using Arduino Nano ESP32 S3. I tries uploading the code multiple times. Tried different cables and also tried uploading just the blink examples. Gone through all the post as well on the forum. Tried all the alternatives. There was one that was working for me which is connecting B1 and Gnd and then flashing in the bootloader mode but I need to change the program on the go which is not possible with this method.
That is the cause of the "PermissionError(13, 'A device attached to the system is not functioning.', None, 31)" upload error you encountered.
Leave the configuration as "Normal mode (TinyUSB)" and then do a standard upload (either by clicking the "Upload" button on the Arduino IDE toolbar, or by selecting Sketch > Upload from the Arduino IDE menus), not an "Upload Using Programmer".
Let us know if the upload still fails when you do the standard upload.
Still upload error. Thanks for the suggestion though @kmin@ptillisch . Please let me know if there’s any other way. Even after buying through official channel to ensure the device is not a fake, I didn’t expect it to be so hard to make it flash in the least.
I'm going to ask you to provide the full verbose output from a normal 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 reply here on this forum topic 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.