Having Trouble Uploading Code to a Nano

Hello, I just set up this account because I couldn't find a solution from all my searches.

I have been using the Arduino IDE to program a Mega board for a while and had no problems. Now I purchased a Nano board to use for a more compact project and I was having trouble uploading my program. I decided to return to the basic blink sketch to narrow down where the issue is occurring and the same thing is happening. The error is posted below. This is with show verbose output during compilation and upload enabled. Also, the board is selected as the Nano, the processor is set at "ATmega328P" and the Nano is recognized in COM3.

Please let me know if you have any suggestions or if further clarification would help.

Arduino: 1.8.15 (Windows 10), Board: "Arduino Nano, ATmega328P"

Edit: If anyone finds this and needs a solution heres what I did. First my computer was recognizing that the board was plugged in, but not actually connecting it to the COM port, I needed to install the driver found here: CH341SER.EXE - 南京沁恒微电子股份有限公司 After that, I ran into more errors, found below. You then need to go to Tools > Processor > ATmega328P (Old Bootloader) I bought my board from Amazon which apparently runs some older code so I need to use this older driver. Good luck to anyone reading this :slight_smile:
Errors:

C:\Users\braed\Desktop\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Users\braed\Desktop\Arduino\hardware -tools C:\Users\braed\Desktop\Arduino\tools-builder -tools C:\Users\braed\Desktop\Arduino\hardware\tools\avr -built-in-libraries C:\Users\braed\Desktop\Arduino\libraries -libraries C:\Users\braed\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=0000_0000 -ide-version=10815 -build-path C:\Users\braed\AppData\Local\Temp\arduino_build_831165 -warnings=none -build-cache C:\Users\braed\AppData\Local\Temp\arduino_cache_87620 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -verbose C:\Users\braed\Desktop\Arduino\examples\01.Basics\Blink\Blink.ino

C:\Users\braed\Desktop\Arduino\arduino-builder -compile -logger=machine -hardware C:\Users\braed\Desktop\Arduino\hardware -tools C:\Users\braed\Desktop\Arduino\tools-builder -tools C:\Users\braed\Desktop\Arduino\hardware\tools\avr -built-in-libraries C:\Users\braed\Desktop\Arduino\libraries -libraries C:\Users\braed\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328 -vid-pid=0000_0000 -ide-version=10815 -build-path C:\Users\braed\AppData\Local\Temp\arduino_build_831165 -warnings=none -build-cache C:\Users\braed\AppData\Local\Temp\arduino_cache_87620 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\braed\Desktop\Arduino\hardware\tools\avr -verbose C:\Users\braed\Desktop\Arduino\examples\01.Basics\Blink\Blink.ino

Using board 'nano' from platform in folder: C:\Users\braed\Desktop\Arduino\hardware\arduino\avr

Using core 'arduino' from platform in folder: C:\Users\braed\Desktop\Arduino\hardware\arduino\avr

Detecting libraries used...

"C:\Users\braed\Desktop\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Users\braed\Desktop\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\braed\Desktop\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "C:\Users\braed\AppData\Local\Temp\arduino_build_831165\sketch\Blink.ino.cpp" -o nul

Generating function prototypes...

"C:\Users\braed\Desktop\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Users\braed\Desktop\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\braed\Desktop\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "C:\Users\braed\AppData\Local\Temp\arduino_build_831165\sketch\Blink.ino.cpp" -o "C:\Users\braed\AppData\Local\Temp\arduino_build_831165\preproc\ctags_target_for_gcc_minus_e.cpp"

"C:\Users\braed\Desktop\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\braed\AppData\Local\Temp\arduino_build_831165\preproc\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

"C:\Users\braed\Desktop\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10815 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Users\braed\Desktop\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Users\braed\Desktop\Arduino\hardware\arduino\avr\variants\eightanaloginputs" "C:\Users\braed\AppData\Local\Temp\arduino_build_831165\sketch\Blink.ino.cpp" -o "C:\Users\braed\AppData\Local\Temp\arduino_build_831165\sketch\Blink.ino.cpp.o"

Compiling libraries...

Compiling core...

Using precompiled core: C:\Users\braed\AppData\Local\Temp\arduino_cache_87620\core\core_arduino_avr_nano_cpu_atmega328_21c081cfae698bd222995f010c76b5a0.a

Linking everything together...

"C:\Users\braed\Desktop\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\Users\braed\AppData\Local\Temp\arduino_build_831165/Blink.ino.elf" "C:\Users\braed\AppData\Local\Temp\arduino_build_831165\sketch\Blink.ino.cpp.o" "C:\Users\braed\AppData\Local\Temp\arduino_build_831165/..\arduino_cache_87620\core\core_arduino_avr_nano_cpu_atmega328_21c081cfae698bd222995f010c76b5a0.a" "-LC:\Users\braed\AppData\Local\Temp\arduino_build_831165" -lm

"C:\Users\braed\Desktop\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\Users\braed\AppData\Local\Temp\arduino_build_831165/Blink.ino.elf" "C:\Users\braed\AppData\Local\Temp\arduino_build_831165/Blink.ino.eep"

"C:\Users\braed\Desktop\Arduino\hardware\tools\avr/bin/avr-objcopy" -O ihex -R .eeprom "C:\Users\braed\AppData\Local\Temp\arduino_build_831165/Blink.ino.elf" "C:\Users\braed\AppData\Local\Temp\arduino_build_831165/Blink.ino.hex"

"C:\Users\braed\Desktop\Arduino\hardware\tools\avr/bin/avr-size" -A "C:\Users\braed\AppData\Local\Temp\arduino_build_831165/Blink.ino.elf"

Sketch uses 924 bytes (3%) of program storage space. Maximum is 30720 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

C:\Users\braed\Desktop\Arduino\hardware\tools\avr/bin/avrdude -CC:\Users\braed\Desktop\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM3 -b115200 -D -Uflash:w:C:\Users\braed\AppData\Local\Temp\arduino_build_831165/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:\Users\braed\Desktop\Arduino\hardware\tools\avr/etc/avrdude.conf"



     Using Port                    : COM3

     Using Programmer              : arduino

     Overriding Baud Rate          : 115200

An error occurred while uploading the sketch

Arduino Nano are different. Give a photo of the board from each side.
Try also Processor: ATmega328P (Old Bootloader)

Okay, the photos are attached here. I solved the initial problem which seems to be that my laptop did not have the proper driver, so even though it was recognizing the Nano as connected, it wasn't assigning it to a COM port as I thought. Now that it has been connected correctly I am seeing this new error which Ill have to go investigate.

Error:

Arduino: 1.8.15 (Windows 10), Board: "Arduino Nano, ATmega328P"

Sketch uses 932 bytes (3%) of program storage space. Maximum is 30720 bytes.

Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

An error occurred while uploading the sketch

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x6c

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x6c

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x6c

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x6c

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x6c

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x6c

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x6c

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x6c

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x6c

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x6c


In the IDE, try Tools > Processor > ATmega328P (Old Bootloader), generic nano's often ship with the old version of the bootloader.

Beautiful. I missed that from Boffin's comment, but thank you both. We are off to the races now.

1 Like

It looks like you have CH340 as USB-UART bridge onboard.
You need appropriate driver for it. See How to Install CH340 Drivers, for example.
After the driver will be installed, see to your Device Manager.
You have to see USB-SERIAL CH340 (COMx), where x is your port number.
Then
Tools > Arduino Nano
Tools > Processor: ATmega328P (Old Bootloader)
Tools > COM3
Tools > Get Board Info
Nano Get Board Info
If this was successful you can upload.