Can only successfully upload to Nano by selecting Uno board in IDE???

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????

(deleted)

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.

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. :confused:

Part0:
and used the 'old bootloader' option as you suggested to upload my sketch while selecting the Nano board.

sterretje:
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

sterretje:
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.

Part0:
but I would like to find out why this is happening. If you have any other ideas I would like to hear them. :confused:

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

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.

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

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

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

I think OP should not; read the complete thread.