Uncommon Exit Status 1

Good day to everyone. I have an issue with the exit status 1 error.

I am using a nrf24l01 radio module to beam back some sensor readings. With other UNOand MEGAs the code works fine and the radios work. However, when I use a specific UNO, I get the error:

Using Port                    : COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x0f
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x10
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x20
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x0f
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x10
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x0f
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x10
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x20

avrdude done.  Thank you.

Failed uploading: uploading error: exit status 1

This means that somehow the board and computer can't communicate. However, the board is detected by the IDE (version 2.3.6) and the windows device manager as a device connected to COM Port 5.

I looked around for a solution and everything seemed fine: the cable was working, the code was working (both verified with other UNO boards), the board was connected to the right COM port, the TX/RX pins were free (I even disconnected every module attached to the board), I tried -and failed- to upload a blink program... Nothing.

I did this Loopback test to see if there were comunicaton errors: there were not, the test was passed succesfully.

In short, everyting seems to be okay with the UNO, however I get the exit status 1 error.

Does anyone know why? Thank you very much.

When you press and release the reset button, do you get a few flashes of the L-LED in quick succession? If not, the boot loader is malfunctioning or the 328P is damaged.

Successful loop-back test would indicate that your board is an original or a true clone and does not use the CH340; can you confirm the serial-to-usb converter used on the board?

Hello, thanks for replying.

Do you get a few flashes of the L-LED in quick succession?

Yes I do, the board resets as per usual, with the flashes.

can you confirm the serial-to-usb converter used on the board?

The board I use is an Elegoo UNO, and while this datasheet says that the serial-to-usb chip is an Atmega 8u2, I checked my board and it features an Atmega 16u2 (original chip, presumably, since it has the Atmel logo).

Other boards from the same brand that I have used worked perfectly, this is the only one with issues.

Are you sure that COM5 is the correct port? Verify against Windows device manager.

Yes, the Windows device manager recognizes the board as Arduino Uno in COM5.

The IDE also identifies an Arduino UNO in COM 5.

Using the IDE version 1.8.19 the error message is

avrdude: ser_open(): can't open device "\\.\COM5": Access denied

Something is interfering in that port. Any clues?

Use process explorer to check what uses the port; see e.g. Exit error status 1 on Arduino uno - #15 by ptillisch . In that same topic (post #18) a list of what to filter for different serial-to-usb converters.