Upload error after upload - looks like a dead board!

Hi,

EDIT - looks like a dead board. I bought two (Thank God), and the second one works.
I did nothing weird; powered from the Mac; not using 5V anywhere; only one sensor device connected and it outputs a verified 3.3V, and 5 LEDs with a 100R resistor each. No static, mounted on a breadboard... this is very disappointing. I buy genuine Arduino hardware because it's meant to be reliable. So: anyone any idea?

Original post:

I am making a little project that is, so far, going well, with an Arduino ESP32.

All of a sudden, I can no longer successfully upload. That is, the upload goes fine, up to 100% etc, and then I get an error. And indeed my new code is not activated.

Only slightly panicking here... so any help, as always, much appreciated.

This is on an iMac (M1); zero changes since midway through the evening when suddenly it started doing this after the upload:

Sketch uses 825105 bytes (26%) of program storage space. Maximum is 3145728 bytes.
Global variables use 57192 bytes (17%) of dynamic memory, leaving 270488 bytes for local variables. Maximum is 327680 bytes.
"/Users/michael/Library/Arduino15/packages/arduino/tools/dfu-util/0.11.0-arduino5/dfu-util" --device 0x2341:0x0070 -D "/private/var/folders/2r/gj8grnbs1z53j1c2mn6yp2jh0000gn/T/arduino/sketches/E07B98EDE247A2E669E68711C8FD5EAA/esp32_test_sketch_aug3a.ino.bin" -Q
dfu-util 0.11-arduino4

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Opening DFU capable USB device...
Device ID 2341:0070
Device DFU version 0101
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0101
Device returned transfer size 4096
Copying data from PC to DFU device

Download	[                         ]   0%            0 bytes
Download	[                         ]   2%        20480 bytes
Download	[=                        ]   4%        36864 bytes
Download	[=                        ]   7%        65536 bytes
Download	[==                       ]   8%        69632 bytes
Download	[===                      ]  12%       102400 bytes
Download	[===                      ]  13%       110592 bytes
Download	[====                     ]  16%       135168 bytes
Download	[====                     ]  18%       151552 bytes
Download	[=====                    ]  20%       167936 bytes
Download	[======                   ]  24%       200704 bytes
Download	[=======                  ]  28%       233472 bytes
Download	[=======                  ]  28%       237568 bytes
Download	[========                 ]  32%       266240 bytes
Download	[========                 ]  34%       282624 bytes
Download	[=========                ]  36%       299008 bytes
Download	[=========                ]  39%       327680 bytes
Download	[==========               ]  40%       335872 bytes
Download	[===========              ]  44%       368640 bytes
Download	[===========              ]  44%       372736 bytes
Download	[============             ]  48%       401408 bytes
Download	[============             ]  49%       409600 bytes
Download	[=============            ]  52%       434176 bytes
Download	[=============            ]  55%       458752 bytes
Download	[==============           ]  56%       466944 bytes
Download	[===============          ]  60%       499712 bytes
Download	[================         ]  64%       532480 bytes
Download	[================         ]  65%       544768 bytes
Download	[=================        ]  68%       565248 bytes
Download	[=================        ]  71%       589824 bytes
Download	[==================       ]  72%       598016 bytes
Download	[===================      ]  76%       630784 bytes
Download	[====================     ]  80%       667648 bytes
Download	[====================     ]  80%       671744 bytes
Download	[=====================    ]  84%       700416 bytes
Download	[=====================    ]  86%       720896 bytes
Download	[======================   ]  88%       733184 bytes
Download	[======================   ]  91%       761856 bytes
Download	[=======================  ]  92%       765952 bytes
Download	[======================== ]  96%       798720 bytes
Download	[======================== ]  97%       806912 bytes
Download	[=========================] 100%       825472 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
dfu-util: unable to read DFU status after completion (LIBUSB_ERROR_NO_DEVICE)
Failed uploading: uploading error: exit status 74```



Any ideas? Why suddenly?

Of course I have powered down the nano, etc etc

@michaelwillems

Did you by any chance upload the sketch accidentally selecting another esp32 board?

Try this:

  1. Unplug board
  2. Short B1 and GND and leave the jumper on
  3. Replug
  4. Select the correct board
  5. Tools > programmer > esptool
  6. Sketch > upload using programmer
  7. Unplug
  8. Remove jumper

Let me kmow

There is no other ESP32 board. And at the end of the failed upload, the nano DOES reset. So I am pretty sure it is exactly the right board.

Still, tonight I will try your suggestions of course.

Thanks for your help.

Michael

Well - select the correct board means the nano. When I follow your instructions, that fails:

Sketch uses 825105 bytes (26%) of program storage space. Maximum is 3145728 bytes.
Global variables use 57192 bytes (17%) of dynamic memory, leaving 270488 bytes for local variables. Maximum is 327680 bytes.
Failed programming: no upload port provided

But when I now look at the available boards, that shows "ESP32C3Dev module", instead.

If I select THAT, then I get a warning:

The "esp32 [v 2.0.11]" core has to be installed for the currently selected "ESP32C3 Dev Module" board. Do you want to install it now?

I installed that library.

But still, if I then try to upload again to this, I see:

Sketch uses 833610 bytes (63%) of program storage space. Maximum is 1310720 bytes.
Global variables use 39492 bytes (12%) of dynamic memory, leaving 288188 bytes for local variables. Maximum is 327680 bytes.
"/Users/michael/Library/Arduino15/packages/esp32/tools/esptool_py/4.5.1/esptool" --chip esp32c3 --port "/dev/cu.usbmodem2401" --baud 921600  --before default_reset --after hard_reset write_flash  -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 "/private/var/folders/2r/gj8grnbs1z53j1c2mn6yp2jh0000gn/T/arduino/sketches/E07B98EDE247A2E669E68711C8FD5EAA/esp32_test_sketch_aug3a.ino.bootloader.bin" 0x8000 "/private/var/folders/2r/gj8grnbs1z53j1c2mn6yp2jh0000gn/T/arduino/sketches/E07B98EDE247A2E669E68711C8FD5EAA/esp32_test_sketch_aug3a.ino.partitions.bin" 0xe000 "/Users/michael/Library/Arduino15/packages/esp32/hardware/esp32/2.0.11/tools/partitions/boot_app0.bin" 0x10000 "/private/var/folders/2r/gj8grnbs1z53j1c2mn6yp2jh0000gn/T/arduino/sketches/E07B98EDE247A2E669E68711C8FD5EAA/esp32_test_sketch_aug3a.ino.bin" 
esptool.py v4.5.1
Serial port /dev/cu.usbmodem2401
Connecting...

A fatal error occurred: This chip is ESP32-S3 not ESP32-C3. Wrong --chip argument?
Failed uploading: uploading error: exit status 2

So now?

You have things this way --

This is a Mac. Different options.

Well, that clears that much up.

1 Like

Also this worked fine until half way through an evening it didn’t. And when I plugged in the other Arduino, it worked again. And when I plug in the original, it Durant work. And so on.

The boats is faulty, I’m pretty sure.

Have you tried my instructions to the letter once selected the correct board?
We have a glitch in board reselection in IDE 2, which may automatically select the wrong board especially when both Arduino and Espressif's platforms are installed.

You should really bridge that B1 to GND and select "upload using programmer"

If you have then I'll get someone from support get back to you for a replacement :slight_smile:

Yes, I did exactly that. To the letter.

Michael

thank you for confirming
let me hand this thread to support :slight_smile:

@michaelwillems Please contact Arduino Customer Support via Contact us
[include this forum thread in your message].

1 Like