When it try uploading a file to my new elegoo arduino nano i get the following error:
Using Port : COM8
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xfb
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xfb
avrdude: ser_recv(): read error: Access is denied.
I have tried looking at other guides but am unsure what to do any advice would be appreciated.
@sterretje When I use the ATmega328p processor I get the following error message.
c:/users/joery/appdata/local/arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/../lib/gcc/avr/7.3.0/../../../../avr/lib/avr5/crtatmega328p.o:(.init9+0x0): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
There should be no difference between 'old bootloader' and '328P' when it comes to that error; the only difference is in the upload, not the compiling/linking.
Please enable verbose output during compilation in file / preferences. Compile the blink example with the 'old bootloader' setting and post the results here. Next compile with the '328P' setting and post the result here as well.
/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
This is the result when using the old bootloader option
FQBN: arduino:avr:nano:cpu=atmega328old
Using board 'nano' from platform in folder: C:\Users\joery\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\joery\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Detecting libraries used...
C:\Users\joery\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Users\joery\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\joery\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\eightanaloginputs C:\Users\joery\AppData\Local\Temp\arduino\sketches\A4EF6F4406D3E7BB3EED85664BF6E542\sketch\Blink.ino.cpp -o nul
Generating function prototypes...
C:\Users\joery\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR -IC:\Users\joery\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino -IC:\Users\joery\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\eightanaloginputs C:\Users\joery\AppData\Local\Temp\arduino\sketches\A4EF6F4406D3E7BB3EED85664BF6E542\sketch\Blink.ino.cpp -o C:\Users\joery\AppData\Local\Temp\2086058556\sketch_merged.cpp
C:\Users\joery\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\joery\AppData\Local\Temp\2086058556\sketch_merged.cpp
Compiling sketch...
"C:\\Users\\joery\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/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=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\joery\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\joery\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\eightanaloginputs" "C:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542\\sketch\\Blink.ino.cpp" -o "C:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542\\sketch\\Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core: C:\Users\joery\AppData\Local\Temp\arduino\cores\arduino_avr_nano_cpu_atmega328old_a53ecebce414ae04cd0fe51c1bd30e9c\core.a
Linking everything together...
"C:\\Users\\joery\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542/Blink.ino.elf" "C:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542\\sketch\\Blink.ino.cpp.o" "C:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542/..\\..\\cores\\arduino_avr_nano_cpu_atmega328old_a53ecebce414ae04cd0fe51c1bd30e9c\\core.a" "-LC:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542" -lm
"C:\\Users\\joery\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542/Blink.ino.elf" "C:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542/Blink.ino.eep"
"C:\\Users\\joery\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-objcopy" -O ihex -R .eeprom "C:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542/Blink.ino.elf" "C:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542/Blink.ino.hex"
"C:\\Users\\joery\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-size" -A "C:\\Users\\joery\\AppData\\Local\\Temp\\arduino\\sketches\\A4EF6F4406D3E7BB3EED85664BF6E542/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\joery\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\joery\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM8" -b57600 -D "-Uflash:w:C:\Users\joery\AppData\Local\Temp\arduino\sketches\A4EF6F4406D3E7BB3EED85664BF6E542/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\joery\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM8
Using Programmer : arduino
Overriding Baud Rate : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x2f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x2f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x2f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x2f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x2f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x2f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x2f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x2f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x2f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x2f
avrdude done. Thank you.
Failed uploading: uploading error: exit status 1```
And here is the output when I use the newer bootloader option
I don't have access to a system with IDE2.x. From memory the directory 'C:\Users\joery\AppData\Local\Temp\arduino' contains two directories, cores and sketches. I would delete those 2 directories; or to play it safe, delete the content of each. Close the IDE first.
Next compile again with the '328P' option; post the output if you get the same error again.