Avrdude.conf how to make Arduino works

Hello everyone,
I read other topics similar to mine, but I can still not solve my problem.
It is something related to the avrdude.conf. I already tried to uninstall and re-install Arduino but nothing changed.
Arduino is not able to compile any scripts...

Someone has any ideas of what is happening and how can I solve my problem?

Blockquote
Arduino:1.8.15 (Windows 10), Scheda:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Lo sketch usa 6632 byte (2%) dello spazio disponibile per i programmi. Il massimo è 253952 byte.

Le variabili globali usano 407 byte (4%) di memoria dinamica, lasciando altri 7785 byte liberi per le variabili locali. Il massimo è 8192 byte.

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM3 -b115200 -D -Uflash:w:C:\Users\laura\AppData\Local\Temp\arduino_build_176300/Trial_OneRGBA.ino.hex:i

Errore durante il caricamento dello sketch

avrdude: Version 6.3-20190619

     Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

     Copyright (c) 2007-2014 Joerg Wunsch



     System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"



     Using Port                    : COM3

     Using Programmer              : wiring

     Overriding Baud Rate          : 115200

Blockquote

What makes you say that?

Because before getting this error the problem was the avrdude.conf not found.
I tried to re-install Arduino and now I am getting this..
Any idea?

Did you do anything else while attempting to fix that "avrdude.conf not found" problem?

No..
Now I lounched the arduino_debug.exe and I am trying to run the "Blink.ino" example.

Blockquote
Arduino:1.8.15 (Windows 10), Scheda:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Lo sketch usa 1536 byte (0%) dello spazio disponibile per i programmi. Il massimo è 253952 byte.

Le variabili globali usano 9 byte (0%) di memoria dinamica, lasciando altri 8183 byte liberi per le variabili locali. Il massimo è 8192 byte.

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM3 -b115200 -D -Uflash:w:C:\Users\laura\AppData\Local\Temp\arduino_build_873185/Blink.ino.hex:i

avrdude: Version 6.3-20190619

     Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

     Copyright (c) 2007-2014 Joerg Wunsch



     System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"



     Using Port                    : COM3

     Using Programmer              : wiring

     Overriding Baud Rate          : 115200

avrdude: ser_open(): can't open device "\.\COM3": Accesso negato.

avrdude: ser_drain(): read error: Handle non valido.

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: Handle non valido.

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: Handle non valido.

La porta seriale selezionata avrdude: stk500_send(): failed to send command to serial port

non esiste o la scheda non è connessa

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: Handle non valido.

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: Handle non valido.

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: Handle non valido.

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: ser_send(): write error: sorry no info avail

avrdude: stk500_send(): failed to send command to serial port

avrdude: ser_recv(): read error: Handle non valido.

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done. Thank you.

It's saying that it can't open .\COM3" port.

No idea on how to proceed.

Make sure you have selected the port of your Arduino board from the Arduino IDE's Tools > Port menu.

Sometimes the port will be labeled with the board name in the menu. Other times it will not. If you don’t know which port is your Arduino board, you can find it like this:

  1. Unplug your Arduino board from the computer.
  2. Select Tools > Port from the Arduino IDE's menus.
  3. Note the ports, if any, listed in the menu.
  4. Close the Tools menu. The ports list is only updated when the Tools menu is re-opened, so this step is essential.
  5. Plug your Arduino board into the computer.
  6. Select Tools > Port from the Arduino IDE's menus. - The new port listed in the menu is your Arduino board.

Is there a reason to change from windows froward slashes to UNIX backslash in the middle of the file name?

The reason is because the part of the path using \ path separators is provided by the system, and thus uses the system's native path separator style, but the part of the path using / path separators is hardcoded in the platform configuration file. Since that configuration is used on Linux and macOS as well, which do not support the \ path separator, the universally supported / path separators are used in the configuration file:
https://github.com/arduino/ArduinoCore-avr/blob/1.8.3/platform.txt#L95-L97

tools.avrdude.path={runtime.tools.avrdude.path}
tools.avrdude.cmd.path={path}/bin/avrdude
tools.avrdude.config.path={path}/etc/avrdude.conf

This runtime.tools.avrdude.path is provided by the system, but you can see that /etc/avrdude.conf is hardcoded.

All this is to say "these aren't the droids you're looking for". This is the way it is for every Windows user of Arduino, and works perfectly well. It does regularly act as a "red herring" when troubleshooting unrelated problems though.

Hello pert, thank you for this explanation.
I think I understood which is the problem. It is weird only that it never happened to me before.

Moreover, I am sure the port selected is the correct one.
What should I do to use the correct conf. path?

You already have the correct avrdude.conf path. Take a look at the command:

Note this part:

-CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf

This is telling AVRDUDE to use the configuration file at C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf.

Now look at the output:

So stop obsessing with avrdude.conf and start focusing on the real problem:

The "Access is denied" error happens when the port is open in another application.

Make sure you don't have any other applications running that might have the port open. Only one application can have a serial port open at a time.

If you don't have the port open in another application, try restarting your computer. Sometimes a glitch causes the port to get stuck open and restarting fixes that.

1 Like

Are you sure your Arduino MEGA is connected as COM3? Could you be in an account that doesn't have permission to use COM3?

1 Like

Hello everyon,
thank you all for the help.

You were right, my COM3 was correctly selected and used to communicate with Arudino, but it was used either for a bluetooth communication and this caused the error.

Thanks again,
Laura

1 Like

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.