avrdude: stk500_getsync() attempt ...: not in sync

supposed to come here and give you errors to fix problems:
avrdude:stk500-getsync() not in sync resp=)x15 and stk500-recv() programmer not responding.

Told to go to replay after doing File>preferences>show verbose outputting during:>compilation(uncheck) upload (check) )K

I've split your post out to its own topic @ZEKEWIGG.

Please always post the exact error text. Use copy and paste:

Remove any connections to pins 0 and 1 on your Arduino board. These pins are used for communication with your computer, including uploads. Connecting anything to these pins can interfere with uploads.

Make sure you have the correct board selected from the Tools > Board menu.

Make sure you have selected the port of your Arduino board from the Tools > Port menu.

Sometimes the port will be labeled with the board name in the menu. Other times it will not. If you don’t know which port is your Arduino, you can find it like this:

  • Unplug your Arduino board from the computer.
  • Tools > Port
  • Note the ports, if any, listed in the menu.
  • Close the Tools menu.
  • Plug your Arduino board into the computer.
  • Tools > Port - The new port listed in the menu is your Arduino board.

I am getting the same error. My UNO and Nano boards were working fine until I upgraded to IDE version 1.8.11. After upgrading, I kept getting "Error compiling for board Arduino Nano" or the same with the UNO. I un-installed 1.8.11 and re-installed 1.8.9. When I did this, the comilation works fine but the upload fails. I enabled verbose output and the error message is as follows :-

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

Sketch uses 444 bytes (1%) 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\Arvind Kale\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Arvind Kale\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM21 -b115200 -D -Uflash:w:C:\Users\ARVIND~1\AppData\Local\Temp\arduino_build_385020/sketch_jan29a.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\Arvind Kale\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

Using Port : COM21
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x7e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x7e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x7e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x7e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x7e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x7e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x7e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x7e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x7e
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x7e

avrdude done. Thank you.

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Can someone please help ? I am a newbie and confused because the boards were working fine earlier and now they do not.

Arvk:
Arduino: 1.8.9 (Windows 10), Board: "Arduino Nano, ATmega328P"

Select Tools > Processor > ATmega328P (Old Bootloader) and then try uploading again.

Arvk:
I upgraded to IDE version 1.8.11. After upgrading, I kept getting "Error compiling for board Arduino Nano" or the same with the UNO.

If you ever want to try 1.8.11 again, we can try to help you get it working. We'd need you to provide the full error message though.

Thanks Pert
I cannot see anything like ATmega328P(old Board) in the list of boards. There is a Arduino Nano every, whatever that is, but that seems to make things worse.

I am wondering if I should just uninstall everything and delete all files including the entire Arduino 15 folder and start from scratch by installing 1.5.11 as if I am loading the IDE for the first time.

Can you suggest if this is a good approach ?

I do not think that both my UNO and Nano boards have somehow got hardware faults, they appear to be OK,

Arvk:
I cannot see anything like ATmega328P(old Board) in the list of boards

It's not in the list of boards. Do this:

  • Click the "Tools" menu. This will open the Tools menu.
  • From the "Tools" menu, click the "Processors" item. This will open the Processors menu.
  • From the "Processors" menu, click on "ATmega328P (Old Bootloader)"

Clipboard01.png

Arvk:
There is a Arduino Nano every, whatever that is, but that seems to make things worse.

The Nano Every uses a completely different microcontroller than the classic Nano:
https://store.arduino.cc/nano-every

Arvk:
I am wondering if I should just uninstall everything and delete all files including the entire Arduino 15 folder and start from scratch by installing 1.5.11 as if I am loading the IDE for the first time.

Can you suggest if this is a good approach ?

Did you mean to write "1.8.11" instead of "1.5.11"? If so, updating isn't a bad idea, but I don't think it will help with the problem you're having. You are a problem using the AVRDUDE upload tool, and that is related to your installed version of Arduino AVR Boards, not the version of the IDE.

Clipboard01.png

Thanks again Pert

I am a dummy. I think I used to select the old board for the processor before, I just clean had a blank in my brain.

That fixed the upload problem altogether for the Nano. Have not yet tried the UNO, but feel that will work as well.

Yes, I meant upgrading to 1.8.11. I see taht the AVR board come up with an option to select a version. Is that important or should I just go with the default ?

Also does the version of avrdude get upgraded or is that quite independent of the IDE ?

You have been a great help, thanks again.

Arvk:
Have not yet tried the UNO, but feel that will work as well.

There is no "ATmega328P (Old Bootloader)" option for the Uno (because the Unos only come with one bootloader type), so that same technique can't be used to fix a problem uploading to an Uno. If you still have problems uploading to your Uno, post the error here and we'll try to help you out.

Arvk:
I see taht the AVR board come up with an option to select a version. Is that important or should I just go with the default ?

Unless you are having a problem with it, always use the newest version of Arduino AVR Boards. If you see an "Update" button in Boards Manager when you click on "Arduino AVR Boards", that means there is a newer version available. If there is no "Update" button, you already have the newest version.

Arvk:
Also does the version of avrdude get upgraded

Each version of Arduino AVR Boards will install the version of avrdude it requires. So sometimes when you update Arduino AVR Boards, it will also update avrdude. But not always, because sometimes a new version of Arduino AVR Boards still uses the same version of avrdude as the previous Arduino AVR Boards version. The Arduino IDE takes care of everything for you automatically, so you don't need to worry about whether you have the right version of avrdude installed. Just keep you Arduino AVR Boards updated and you're set.

Arvk:
is that quite independent of the IDE ?

In the case of Arduino AVR Boards, not quite. The reason is that the Arduino IDE comes with a bundled copy of Arduino AVR Boards. This is done because the AVR boards are the most popular with beginners and Arduino wants beginners to be able to start using their board immediately after installing the IDE, without having to go through another step of installing Arduino AVR Boards. But Boards Manager allows you to use any version of Arduino AVR Boards (and thus any version of avrdude) with any version of the Arduino IDE. When you update Arduino AVR Boards via Boards Manager, it is installed to a different location than the copy of Arduino AVR Boards bundled with the Arduino IDE, and that copy is used from then on.

So if you never updated Arduino AVR Boards via Boards Manager and you update the Arduino IDE, you also updated Arduino AVR Boards along with the IDE. But if you have ever updated Arduino AVR Boards via Boards Manager, updating the Arduino IDE will have no effect on the version of Arduino AVR Boards you are using.

A bit confusing, I know. Fortunately, you probably don't need to know all these details.

Pert, you have been such a great help and taught me a lot of things and I know I have a lot more to learn. I have in the past played with Picaxe, and Maximite and Micromite. Even had a Raspberry Pi,

Finally, I have decided to stick with the Arduino, because a) the IDE is so good and b0 the software availble is almost endless.

This experience has been good for me, because I still have the ESP8266/ESP32 and some mo0dules like the Bluetooth and 3DOF sensor modules.

I am encouraged by the help from persons like yoy and will be posting results or problems, whatever.

I'm glad if I was able to be of assistance. Enjoy!
Per