Arduino MEGA 2560 programming problems with IDE 1.8.5

Hello all,

I encounter a problem when trying to upload a sketch (even a simple or empty sample) in my ARDUINO MEGA 2560.

I'm able to do that on one computer, but not on my current laptop (Windows 7).

I do the follwing :

  • the board 2560 is well recognized by Windows and appears as a COM28
  • In the IDE, I correctly choose the board type ("Arduino/Guenino Mega or Mega2560"), then the processor ("Atmega 2560 (MEGA2560)", as read on the chip itself), and finally the Com port ("COM28 Arduino/Guenino Mega or Mega2560" in my case). That's all.
  • when I read information from the IDE, all is OK and it returns right informations about the board, so it seems that the communication is OK.

But when I try to transfer the sketch to the board, the following messages appears and programming is not made. I also tried to perform a reset on the board with th dedicated switch.

Here are the messages :

Arduino : 1.8.5 (Windows 7), Carte : "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"
Le croquis utilise 656 octets (0%) de l'espace de stockage de programmes. Le maximum est de 253952 octets.
Les variables globales utilisent 9 octets (0%) de mémoire dynamique, ce qui laisse 8183 octets pour les variables locales. Le maximum est de 8192 octets.
java.io.IOException: Cannot run program "C:\Users\Patrick\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude": CreateProcess error=2, Le fichier spécifié est introuvable

  • at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)*
  • at processing.app.helpers.ProcessUtils.exec(ProcessUtils.java:26)*
  • at cc.arduino.packages.Uploader.executeUploadCommand(Uploader.java:129)*
  • at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:207)*
  • at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)*
  • at processing.app.SketchController.upload(SketchController.java:713)*
  • at processing.app.SketchController.exportApplet(SketchController.java:686)*
  • at processing.app.Editor$DefaultExportHandler.run(Editor.java:2168)*
  • at java.lang.Thread.run(Thread.java:748)*
    Caused by: java.io.IOException: CreateProcess error=2, Le fichier spécifié est introuvable
  • at java.lang.ProcessImpl.create(Native Method)*
  • at java.lang.ProcessImpl.(ProcessImpl.java:386)*
  • at java.lang.ProcessImpl.start(ProcessImpl.java:137)*
  • at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)*
  • ... 8 more*
    Une erreur est survenue lors du transfert du croquis
    Ce rapport pourrait être plus détaillé avec
    l'option "Afficher les résultats détaillés de la compilation"
    activée dans Fichier -> Préférences.

Do someone has an idea ?

THank you everyone for any help.
Have a nice day !

That is a bizzare error; it looks like the IDE is failing to run builder (at all, it would appear)

I would uninstall the IDE, delete C:/Users/(your username)/AppData/Local/Arduino15 and C:/Users/(your username)/AppData/Roaming/Arduino15 (if present), then reinstall it, and see if that resolves the issue - this often fixes stuff like that.

Hello again,

I tried several times to uninstall IDE, also uninstall and remove drivers.
None of my tries solve the problem.

Finally I tested on my other computer, wher I already programmed several time the same board, and I now encounter the same problem.

I guess the bootloader is out....

What do you think about that ?

Regards

Hello hello, it's me again...
Just to add a few more information about the status for this issue :

Things has change a little bit since my first post :

The board is an ARDUINO MEGA 2560 R3.

I successfully programmed this board several times, but it has now become impossible.
When I try to transfer the sketch to the board, the following messages now appears and programming is not made :

Arduino : 1.8.4 (Windows 10), Carte : "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Archiving built core (caching) in: C:\Users\PATRIC~1\AppData\Local\Temp\arduino_cache_868385\core\core_arduino_avr_mega_cpu_atmega2560_0c812875ac70eb4a9b385d8fb077f54c.a
Le croquis utilise 7572 octets (2%) de l'espace de stockage de programmes. Le maximum est de 253952 octets.
Les variables globales utilisent 480 octets (5%) de mémoire dynamique, ce qui laisse 7712 octets pour les variables locales. Le maximum est de 8192 octets.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM7 -b115200 -D -Uflash:w:C:\Users\PATRIC~1\AppData\Local\Temp\arduino_build_451072/A017_005_FirmwareMesBul_v003.ino.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
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 : COM7
Using Programmer : wiring
Overriding Baud Rate : 115200
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done. Thank you.

I checked several points and made different trials :

  • The board 2560 is well recognized by Windows and appears as a COM7 in the device manager.
  • In the IDE, I correctly choose the board type ("Arduino/Guenino Mega or Mega2560"), then the processor ("Atmega 2560 (MEGA2560)", as read on the chip itself), and finally the Com port ("COM7 Arduino/Guenino Mega or Mega2560" in my case). That's all.
  • When I read “board information” from the IDE, all is OK and it returns right information about the board, so it seems that the communication is OK.
  • I tried to perform a reset on the board with the dedicated switch.
  • I also tried to uninstall both the IDE software and the drivers, then install again.
  • Last trial was to use a different computer (PC, laptop), and different OS (Windows 7 and Windows 10), and also other IDE releases (1.8.5, 1.8.4 and 1.6.10)
  • I observed that the RX LED blinks just one time, and then ea few time corresponding to te moment where the timeout error message is displayed.
    None of them were able to solve may problem.

Finally, I guess there is a problem with the bootloader in the 16U2 chip….
So I wanted to program the original one, again.
I have read several tutorials about how to program bootloader, but I can’t go on with the procedure….
I downloaded FILP 3.4.7 from ATMEL, tried to place the MEGA 2560 board in DFU mode to program it.
But :

  • I have an error message about a DLL (AtLibUsbDfu.dll not found). I checked this, and the DLL is present in the program location folder (I also tried to add it in the System32 and SywWow folders (see enclosed file Capture.JPG).
  • I’m not sure the board is really in DFU mode… In the “device manager” it still appears as a COM MEGA2560 peripheral, while it should be an unknown peripheral or an At16U2 peripheral.
  • I tried to cut the RESET_EN track on the PCB and then force a reset of the 16U2 at ICSP1 connector (temporarily strapping pins 5 and 6).
  • I also tried to unplug USB, strap ICSP1.5-6, connect USB, then release ICSP1.5-6, as I have read somewhere in the forum.

None of those tests allows to solve the DLL problem.

Do someone has an idea ????

THank's

The symptoms described in the last post do not indicate any issue with the 16u2, they indicate an issue with the atmega2560, or that some external device was connected to pins 0, 1 or reset. It is extremely rare that anything happens to the 16u2 other than the chip being flat out trashed abusing the power rails.

The symptoms described earlier are unrelated to the bootloader or the hardware at all and were some mysterious software issue interfering with the compile process - those errors were happening before it made any attempt to talk to the board.

Probably a little bit late, but I had the same issue, and I solved it by selecting the 'Arduino Nano' Board with the 'ATmega 328P' processor.

SanMiguel137:
Probably a little bit late, but I had the same issue, and I solved it by selecting the 'Arduino Nano' Board with the 'ATmega 328P' processor.

That only works for Nanos. Did you try it on a Mega?