Go Down

Topic: Can only successfully upload to Nano by selecting Uno board in IDE??? (Read 1 time) previous topic - next topic

Part0

I have used Uno and Nano boards in the past without problems. I just purchased a genuine Nano board, and tried to upload a sketch  and the following error was reported.

avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Arduino software\arduino-1.8.1\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x28
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x2c
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x31
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x35
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x30
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x2c
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x31
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x37
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x37
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x2c

avrdude done.  Thank you.


I am using IDE ver 1.8.1. i tried using an earlier version of the IDE ver 1.0.5 and the same error was reported. After trying various things I tried selecting the Uno board from the Tools drop down menu  in IDE ver 1.8.1 and the sketch uploaded without error. I then verified that the sketch was working as expected on the Nano board in my project. I then tried to upload the sketch again this time selecting the Nano board from the Tools drop down menu. The same error as above was reported again. I then selected the Uno board from the Tools drop down menu and the sketch uploaded without error. Can anyone tell me what is going on here????

   

spycatcher2k

Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

sterretje

The problem is that you have a genuine Nano that since the beginning of 2018 ships with a new boot loader.

You will have to upgrade the board manager to version 1.6.21 (at the time of writing this, higher versions have a bug). You can use the 328P option once you have upgraded the board manager.

Board manager 1.6.21 will also give you the above mentioned 'old bootloader' option that you can use for older genuine Nanos and for clones.

Note:
There is nothing against selecting the Uno to program the Nano.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Part0

Thanks Spycatcher 2K and Sterretje for your comments. I have  changed the Board manager to ver 1.6.21 and used the 'old bootloader' option as you suggested to upload my sketch while selecting the Nano board. The sketch does not upload and reports the error I originally posted.  I am not overly concerned as I can upload the sketch using the Uno  option from the Tools drop down instead of Nano but I would like to find out why this is happening. If you have any other ideas I would like to hear them.   :smiley-confuse:

sterretje

and used the 'old bootloader' option as you suggested to upload my sketch while selecting the Nano board.
You will have to upgrade the board manager to version 1.6.21 (at the time of writing this, higher versions have a bug). You can use the 328P option once you have upgraded the board manager.
I did not tell you to use the 'old boot loader' in your scenario; see above. I only referred to 'old boot loader' in the below

Board manager 1.6.21 will also give you the above mentioned 'old bootloader' option that you can use for older genuine Nanos and for clones.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

sterretje

but I would like to find out why this is happening. If you have any other ideas I would like to hear them.   :smiley-confuse:
The problem is that you have a genuine Nano that since the beginning of 2018 ships with a new boot loader.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

DrAzzy

You can run into trouble using Uno board def because it will think it has 1.5k more space than it actually does, and depending on where the binary starts (ie, if it starts where the uno bootloader does and just leaves BOOTRST at the same location as the nano, I think you can break the bootloader by uploading a sketch larger than the nano could accept. If it starts the bootloader where the nano bootloader starts (and leaves 1.5k open after it), then it would just fail to finish the upload, leaving a partly broken application uploaded.

The correct settings for your board are 1.6.21 of the avr board package and Nano, with the 328p (not old bootloader - old bootloader is what you get if selecting the 328p option on pre-1.6.21 board package)

Or connect it to an ISP programmer and bootload it as an uno, and thereafter call it an uno (as that's what it will be, effectively) - this will give you the extra 1.5k of available flash and let you use it.
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

Part0

Thanks sterretje and DrAzzy for your help. Your info sorted me out.

aliceegger

I think you should use 328 with old bootloader and retry.

sterretje

I think you should use 328 with old bootloader and retry.
I think OP should not; read the complete thread.
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.

Go Up