Upload to a Nano doesn't complete

Hi folks.

I tested a sketch in my new Nano and it worked as it should, so my older board was to blame for former problems. But when I tried to upload another version of sketch to the new Nano it refused to upload with the following verbose upload:

------msg start-----
Binary sketch size: 6.566 bytes (of a 30.720 byte maximum)
D:\Arquivos de programas\Arduino\hardware/tools/avr/bin/avrdude -CD:\Arquivos de programas\Arduino\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\.\COM6 -b57600 -D -Uflash:w:C:\DOCUME~1\PAULOS~1\CONFIG~1\Temp\build2378337081564321522.tmp\Flipeflope.cpp.hex:i

avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "D:\Arquivos de programas\Arduino\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM6
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: . [00]
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done. Thank you.
------msg end------

Then I tryied to upload Blink but got almost the same message:

------msg start------
Binary sketch size: 1.082 bytes (of a 30.720 byte maximum)
D:\Arquivos de programas\Arduino\hardware/tools/avr/bin/avrdude -CD:\Arquivos de programas\Arduino\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -carduino -P\.\COM6 -b57600 -D -Uflash:w:C:\DOCUME~1\PAULOS~1\CONFIG~1\Temp\build2378337081564321522.tmp\Blink.cpp.hex:i

avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "D:\Arquivos de programas\Arduino\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM6
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: . [00]
avrdude: stk500_getsync(): not in sync: resp=0x00

avrdude done. Thank you.
------msg end------

I double checked port both in IDE and Device Manager and it shows ok (COM6) without any warning.

It's worth noting I did upload sketches to this very same board, on the same PC and USB port yesterday without problems. I was very happy to be able to play with it again.

I can't remember any changes to the system, what can I been doing wrong now? Hope you can help me.

As the new Nano worked ok, I got back to my Win XP computer wich sits at my workshop to leave the other one free for business matters.

So the above info regards to a Win XP laptop, not a Win 7 one.

What have you got Tools/Processor set to in the IDE ? "Old Bootloader", perhaps ? Have you tried changing it ?

The 57600 baud rate would indicate you have the IDE set to use the old bootloader. You mentioned a computer with Windows XP, you may not have an option for the new bootloader if you are using an older version of the Arduino IDE.

Thank you guys for your help. Indeed I have 2 laptops, one with WxP where I use 1.0.6 IDE and the other running w7 and latest version IDE. Only this one presents OldBootLoader option but it also refused to upload, although with a different error message, that one wich tries 10 times to upload before failing.

I'd rather use the XP machine+1.0.6 IDE to spare the other laptop mainly for business matters. I plugged both boards (UNO@cOM7 and Nano@COM6).

Then I managed to upload Blink to Nano, it was easy to see it worked as it started blinking, so it changed former sketch. My UNO clone, however, has no pin13 LED so I attached a multimeter to GND and pin13 but it showed no voltage activity after trying to upload Blink to it.

Later I tried to stop Nano from blinking by uploading BareMinimum to it, but the LED stays blinking. Here is verbose upload log for the apparently failed operation:
-----msg start-----
Binary sketch size: 472 bytes (of a 14.336 byte maximum)
D:\Arquivos de programas\Arduino\hardware/tools/avr/bin/avrdude -CD:\Arquivos de programas\Arduino\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega168 -carduino -P\.\COM6 -b19200 -D -Uflash:w:C:\DOCUME~1\PAULOS~1\CONFIG~1\Temp\build4180883198051466680.tmp\BareMinimum.cpp.hex:i

avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "D:\Arquivos de programas\Arduino\hardware/tools/avr/etc/avrdude.conf"

Using Port : \.\COM6
Using Programmer : arduino
Overriding Baud Rate : 19200
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: f [66]
avrdude: stk500_getsync(): not in sync: resp=0x66

avrdude done. Thank you.
-----msg end-----

Unfortunately I overwite successful upload log but it seemed to me it was about the same.

I'm confused since both boards are presenting different behaviours and I'm not able to tell where am I messing up. Was it expected Nano stop blinking by uploading BareMinimum? Does connecting two boards simulaneously can confund IDE (I noticed changing board/port in one IDE instance affected the other as well)?

Updating my trials:

Plugging each board individually onto any USB of Windows 7 laptop + IDE 1.18.13 uploads flawlessly any sketch to both boards, even when I forgot to change from UNO to Nano.

Still configuring both boards simultaneously as UNO and changing only from COM3 to COM9 I managed to upload whichever sketch to whichever board.

For me it's clear the problem is related to the Windows XP + IDE 1.0.6 combination.

I'll keep trying to use my old XP computer because I don't want to mix hobby with business. As a matter of fact, I have two XP laptops begging for a worthy retirement. The smaller of them was my favorite but it fails to find an appropriate driver. That's why I tried the one that al least found all drivers, but is failing to upload sketches.

I still have 1.0.6 on my Laptop, recently changed from Win7Pro to Win10.
I also have versions of 1.8.4, I had 1.8.12 until a test card I bought installed 1.8.4 and deleted 1.8.12.

If you don't mind the slow start, jump up to a new version.
Why does it take 2 minutes for the IDE to start (just timed it again to confirm)?
1.0.6 only took 18 seconds to start.

Great news! My smaller XP computer finally agreed to upload sketches!

Since the problem with this one was not finding correct CH340 USB driver, I Googled it and downloaded the CH340 executable USBSER.exe and it did the trick.

The only caveat was it only worked for UNO board, not for the Nano. But recalling my Windows 7 mistake of not changing the board from UNO to Nano I decided to fool the XP machine into thinking it was a UNO instead of a Nano. Sure enough he took the bait, and I ended up with just needing a COM port change to switch between boards!

It sounds too good to be true, is there any risk in this cheating?

pauloscheidegger:
It sounds too good to be true, is there any risk in this cheating?

Yes. The fact that you can upload to your Nano with the Uno setting shows that your Nano has the new bootloader. The bootloader is the same as the Uno's bootloader, this is why it works. However, due to a oversight, the boot section size on the Nanos that have the new bootloader is not the same as the boot section size on the Uno. This means that the maximum sketch size you can upload to the Uno is 31.5 kB, while the maximum sketch size you can upload to the Nano is 30 kB. So if you upload a large sketch to your Nano with the Uno board selection, you can write application code into the boot section and "brick" the Nano.

So you need to do this:

  • Install Arduino IDE 1.8.9. This is the newest version of Arduino IDE that supports Windows XP.
  • Tools > Board > Boards Manager
  • Wait for the downloads to finish.
  • From the list of boards platforms, select "Arduino AVR Boards".
  • Click the 'Install" button.
  • Wait for the installation to finish.
  • Click the "Close" button.
  • Tools > Board > Arduino Nano

The alternative if you are set on continuing to use Arduino IDE 1.0.6:

  • Connect an ISP programmer to your Nano.
  • Tools > Programmer > select the appropriate programmer
  • Tools > Board > Arduino Uno
  • Tools > Burn Bootloader - If this completes successfully, your Nano's boot section will be configured correctly and you can then safely use the Nano as an Uno.

I should add that you can have Arduino IDE 1.8.9 and Arduino IDE 1.0.6 installed at the same time. Just use the "Windows" download link instead of the "Windows Installer" link for Arduino IDE 1.8.9 on the downloads page:

Then all you need to do to install Arduino IDE 1.8.9 is unzip the downloaded file to any convenient location. After that, just run the "arduino.exe" executable that's insize that unzipped folder to start the IDE. You can create a shortcut in your start menu for that file if you want to make it more accessible.

Thank you so much, pert! I'll absolutely follow your advice. To help me decide wich IDE version to use can you tell me if 1.8.9 is still supported as 1.0.6 is?

Neither IDE version is officially supported by Arduino. Despite the impression you might get from the "Previous IDE Releases" page, you don't have the slightest hope of getting official support for Arduino IDE 1.0.6. That thing is 6 years out of date. They just never bothered to restructure that page.

Here on the forum, we will try to provide support no matter which IDE version you're using, but there are very few people still using that ancient IDE version, and some of the forum regulars weren't even involved with Arduino 6 years ago, so you're more likely to just get told to update your IDE instead of getting help with 1.0.6. 1.8.9 is recent enough that there isn't any major difference from the latest IDE release.

It is possible to modify the installation of 1.0.6 to use with your new bootloader Nano safely, and I'm happy to provide instructions for that, but it just doesn't seem worth the effort. If you stick with 1.0.6 you're going to find that many libraries won't work. You're not going to be able to use any of the new boards or 3rd party board platforms.

The problem with newer IDE versions is they require the last Java Virtual Machine, wich is not compatible with WinXP anymore.
I think I'll try to use IDE 1.8.9 to see if it matches my WinXP. Or else I'll ask your help in modifiyng the bootloader as a last resource.
Many thanks for your availability.

Yep, it's unfortunate that XP support had to be dropped. Arduino did take measures to retain that support as long as possible, but there were good reasons for finally having to let it go. This is why I recommended Arduino IDE 1.8.9. My notes indicate this was the last version of the IDE that is compatible with Windows XP.

pauloscheidegger:
I'll ask your help in modifiyng the bootloader as a last resource.

Fortunately, the bootloader wouldn't need to be modified. All that needs to be modified is a file named boards.txt that defines the configuration for each Arduino board, including the maximum program size.

It would be a shame to get rid of such a cute laptop.

Picture.jpg

Hmmm... looks a bit scaring, I followed your link but it seemed rather complex to edit manually the file. My boards.txt dates from September 16th, 2014. I am afraid of messing up the things and require going back to uninstall/reinstall procedure many times.

Great advice, @pert! IDE 1.8.9 installed in winXP ok and uploaded sketches tomy new Nano ok. Thank you so much by your patience and support!

pauloscheidegger:
Hmmm... looks a bit scaring, I followed your link but it seemed rather complex to edit manually the file. My boards.txt dates from September 16th, 2014. I am afraid of messing up the things and require going back to uninstall/reinstall procedure many times.

Haha, yeah, you're right. That specification is targeted to boards platform developers, not to users. It's actually not so complicated to modify boards.txt, but unless you're really interested in understanding how boards platforms work, it's best to just leave those files alone and spend the time on more fun things like writing Arduino sketches and making cool circuits.

pauloscheidegger:
IDE 1.8.9 installed in winXP ok and uploaded sketches tomy new Nano ok. Thank you so much by your patience and support!

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