Arduino Forum

Using Arduino => Avrdude, stk500, Bootloader issues => Topic started by: Martyair on Feb 22, 2018, 10:45 am

Title: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: Martyair on Feb 22, 2018, 10:45 am
Code cannot be loaded to the Arduino
"avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00"

Arduino Nano
ATmega328P
COM 6

The Arduino Nano worked before.
I tried another Arduino Nano --> no upload possible.
The Code shows no failure.
Serial Monitor / Plotter shows return Data from the Arduino from previous version of the Programm.
The "Blink" Sketch kannot be uploaded as well.

So... the programms are good, the Arduino is connected (shows serial return data), the Arduino hardware is good (tried another one).

What ellse could be the reason for the failed code upload?

Thanks Martin!
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: DrAzzy on Feb 22, 2018, 09:01 pm
Sounds like either wrong board is selected, or it's not resetting for some reason.

When you open serial monitor, does it reset the board? ie, do you see the bootloader blinking the light?

Is anything connected to reset pin?
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: callmebob on Feb 24, 2018, 02:55 am
I tried getting started with attiny85 and followed the current instructions at these sites http://highlowtech.org/    http://hlt.media.mit.edu/?p=1695     https://github.com/damellis/attiny

It broke my Arduino installation on three different computers and I got similar errors on Nanos that worked previously. Silly me tried to install the attiny85 software on three different computers thinking it must have been bad hardware. Yes I'm a fool. It was the software and it took me a day or two to figure out what was going on.

I uninstalled, restarted, re-installed the Arduino IDE thinking that was sufficient, but noooooo.  I had to track down three or four different folders manually that were affected by the installation and delete any trace of attiny and I got the uploads and my Nanos to work again -- yes, on all three computers (a desktop Win10, a laptop Win10 and a desktop Win7).
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: CrossRoads on Feb 24, 2018, 03:15 am
When you get your IDE sorted out, try adding this to it for the Attiny
https://github.com/SpenceKonde/ATTinyCore (https://github.com/SpenceKonde/ATTinyCore)
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: callmebob on Feb 24, 2018, 04:26 am
Thanks I'll give that one a try next time I need some punishment :)
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: Passo on Feb 27, 2018, 03:43 pm
I had the same failure on my elegoo uno R3, after changed fuses and burned bootloader.
I checked com ports, board "uno", and programmer "avrisp mk2". But i cant upload the data anymore. I tried with another real "arduino uno" board with my atmega328p. the Failure was the same. But with another atmega328p with arduino bootloader was working on the both boards. Also i decided to throw away the defectivly atmega328p and bought an atmega328p without arduino bootloader.
The new Ic didnt work, too. An bootloader upload on the new ic wasnt possible.
 Also i decided to check the fuses with atmel studio and STK500 board instead with command avrdude and uno r3 board.
I programmed the original fuses and upload the bootloader with atmel studio. now it works fine.
I never trust the bootloader upload of arduino ide. because it doesnt work fine.
I thought i could help you.
Another way is to check the fuses(if changed) and set to original settings with command avrdude. and burn a new bootloader with another uno board (inlcuding functional atmega328p with arduino bootloader).


If you decided to buy a new board, then buy a board from atmel for example stk 500 or stk600. its very easy to programm fuses and burn bootlader. I will never miss the stk500.

When you use C-code then its a good investment in a good compiler.
Arduino compiler dont understand the c code cleary, but atmel studio compiler do it.

Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: GabNet on Feb 27, 2018, 07:29 pm
I had this problem yesterday with my nanos... I solve it to downgrading to AVR Boards 1.6.20. A temporal solution... I guess.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: callmebob on Mar 03, 2018, 03:50 am
I'm back to having that problem after finally getting it solved (I thought).

I will continue to troubleshoot it, but I'm wondering if there is a way to reduce the number of tries of:

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x3c

10 attempts seem like overkill and a big waste of time. It seems that a couple of tries are sufficient. After two attempts it looks like we can pretty much predict the outcome.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: NealB on Mar 03, 2018, 06:21 pm
I have also experienced the same problem.
The problem started when I received a notification of a board updates whilst in the Arduino IDE. The update was for Uno's, Nano's etc. I tried various things including drivers, re-installing the IDE etc.

The solution is to fully remove the IDE and removing the Arduino folder from the app data folder, then re-installing the Arduino IDE.

To prove the solution I have tried updating the boards again and the problem re appeared, and after apply the fix again - all is fixed again. I have since tried it on another PC and again the fault appeared and was fixed with my solution.

Hope this helps someone else.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Mar 03, 2018, 06:27 pm
The problem as it occurs with uploading to Nano with Arduino AVR Boards 1.6.21 can be solved by simply selecting Tools > Board > ATmega328P (Old Bootloader). There's no need to uninstall or downgrade anything.

The problem as it occurs for other boards will have a different cause and a different solution.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: callmebob on Mar 04, 2018, 12:07 am
I solved my problem by messing around with choosing different boards from the menu choices (Tools > Board > ATmega328P  -- and Tools > Board > ATmega328P (Old Bootloader), and a few other menu options, and opening and closing different sketches and magically it started working again with ATmega328 menu choice.

I think my problem re-occurred because I used a different Nano that must not need the Old Bootloader where the previous Nano I had plugged in did need it. With Nano #2 the IDE finally started working with the ATmega328P choice... not the 'Old Bootloader' choice. But it took a bunch of poking around.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Mar 04, 2018, 02:25 am
If you have an official Arduino Nano that was recently purchased then ATmega328P is the correct selection.

If you have an official Arduino Nano that was purchased some time ago then ATmega328P (Old Bootloader) is the correct selection.

If you have a clone or counterfeit Nano then almost certainly ATmega328P (Old Bootloader) is the correct selection but they might start shipping some of those with the new bootloader eventually.

If you have successfully done a Tools > Burn Bootloader on your Nano then you need to select whatever you had selected when you burned the bootloader.

The best (though more complex) solution is to Burn Bootloader with Arduino/Genuino Uno selected and then use the Nano as an Uno from then on. This will install the same bootloader as the new Nanos, end the confusion as to which Nano option to select, and free up 1.5 kB of program memory. There are tons of tutorials available on how to do the Burn Bootloader process. You need an ISP programmer or an extra Arduino board to use as an "Arduino as ISP".
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: Lars81 on Mar 04, 2018, 09:52 pm
I have a similar problem.

I've tried programming an Atmega328p at both 16MHz (external) and 8MHz internal ("Atmega328 on a breadboard"). Using the ISP I'm able to burn the bootloader on both setups, and install a simple sketch for blinking a led and writing data to the serial port. When I connect an FTDI-device to the chip I'm able to receive the serial data on both setups (suggesting that the ftdi-device works, as well as that the frequency is correct). However when I try to install a sketch over serial (DTR connected to RST via 0.1uF as well as a 10k pullup on RST) I get this error message: "avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00".

Any suggestions? I could probe the RST pin on an oscilloscope, but what should I look for?

For comparison I hooked up a working Arduino UNO (original) and probed the RST pin there, and the signal was identical to the one I got on the "barebone arduino", suggesting that the reset signal is working fine as well.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: JaeKar99 on Mar 07, 2018, 07:56 pm
After about a hour of beating on this Nano 3.0 I realized it has a   M168PA chip..  I will not be buying from this seller again...
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Mar 08, 2018, 01:55 am
After about a hour of beating on this Nano 3.0 I realized it has a   M168PA chip..  I will not be buying from this seller again...
That is strange. If it was an ATmega168 you could use it by simply selecting Tools > Processor > ATmega168 but the ATmega168PA has a different signature than ATmega168 so you can't do that with your Nano. Luckily the excellent MiniCore supports ATmega168PA so you can still easily use your Nano:
https://github.com/MCUdude/MiniCore (https://github.com/MCUdude/MiniCore)
Actually I believe the ATmega168PA has some superior specs compared to the ATmega168. Of course it's also inferior to the ATmega328P used on most Nanos due to having 1/2 the flash and SRAM.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: vmsysprog on Aug 17, 2018, 03:50 am
I'm having a similar problem with two Audrino NANO's I just bought.  I've got two different Windows machines I use  Win7 and Win8.1 neither will load sketches to the NANO.  Further, there are enough comments here that it seems to me this is a problem.  A problem which Arduino should fix.  We shouldn't have to jump through hoops to get these things to work properly.
Steve
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Aug 17, 2018, 07:04 am
I'm having a similar problem with two Audrino NANO's I just bought.
Please do this:
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: sterretje on Aug 17, 2018, 09:03 am
We shouldn't have to jump through hoops to get these things to work properly.
As you're the one that does not provide usefull info, why would we jump through hoops to figure out what you have installed, which Nano you excactly bought etc. ?

A problem which Arduino should fix.
Arduino did fix it for their newer Nanos. Just install board manager version 1.6.21 and select the 328P option under processors. If it's a clone, there is no reason why Arduino should do anything.

Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: nnangeroni on Aug 17, 2018, 11:37 pm
The problem as it occurs with uploading to Nano with Arduino AVR Boards 1.6.21 can be solved by simply selecting Tools > Board > ATmega328P (Old Bootloader). There's no need to uninstall or downgrade anything.
This worked for me, thank you so much!!!!
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: AndrewCarr on Sep 07, 2018, 11:53 am
I tried the ATmega328P (Old Bootloader) and success - thanks to pert for this.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: RyugaRedoc on Sep 17, 2018, 06:01 pm
I have the same issue while uploading program to my arduino uno board.I tried almost every suggestions available but none of them worked.I am only able to upload the blink program n make changes to it.

Please help me.It's a request.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: sterretje on Sep 17, 2018, 06:27 pm
I have the same issue while uploading program to my arduino uno board.I tried almost every suggestions available but none of them worked.I am only able to upload the blink program n make changes to it.

Please help me.It's a request.
Which operation system (and version)?
Which version of the IDE?
Was it working before?
Is the board recognised in Windows device manager (or Linux/Mac equivalents)?
Correct board selected in IDE?
Correct port selected in IDE?
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: Nickrpb on Sep 20, 2018, 08:08 am
Hi I have a duinotech Nano Atmga328P
and get this message when i try to upload it

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

avrdude: stk500_recv(): programmer is not responding

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


help needed

what do i do

I using a mac and running Chrome
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: fliesskomma on Sep 30, 2018, 02:08 pm
Hi folks,
I also have the same problems with
Code: [Select]
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xb7
with a breadboard ATMEGA328P-PU.

Peculiarely this only happens only from on the second flash of an application.
i.e.,

Then I flashed the bootloader again and things repeat as above.
Flashing sketches per SPI works fine too, every time. But via TX/RX works only once after a freshly flashed bootloader.

Flashing bootloaders works very reliable every time. So my hardwareconstruction seems to be in good condition (Short wires, good Gnd, blocking caps, Reset-Pullup,...). I tried 2 different bootloaders. The one with 8MHz-internal oszillator and the Arduino-IDE-supplied one for the Pro Mini, 8MHz external/3.3V. Driving things with 5V though.

It seems for me, right after bootloaderflashing, the ATMEGA is and stays in waitingcondition for beeing flashed by RX/TX. My LED on PB5 (The LedPin 13, Arduino uses for onboard LED) indicates this state, by flashing.
When the IDE starts flashing the first application (Blink, ...) it says "upload" and the RX/TX Leds on the USB/TTL-UART converter flash continously. Then, on the second flash of a sketch, there is no USB/TTL-UART Led-flashing. No wonder, timeout errormessage "...not responding" occurs.

I'm using Win10, Arduino IDE 1.8.15.0, an UNO-Clone with SMD-ATMEGA328p-PU as ISP-flasher.
I'm gonna get 2 UNOs with DIP-Pin ATMEGAS this afternoon for testing.

Oh and... I flashed another sketch with 115200Bd serial communication in both directions. The communication did well. So the quirk should be no matter of TX/TX-timing. And I tried grounding Reset, with releasing when the IDE says "uploading" -Didn't help :((

My questions are:

I googled mostly successless all night for answers.

Thanks for reading all this and thinking,... And maybe answering
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: fliesskomma on Sep 30, 2018, 09:32 pm
Hi there,
I'm here again, after testing with UNO Clones, which have DIP ATMEGA328.

So, using one Uno as programmer, programming the other, worked as intended and flashing several sketches on the target ATMEGA afterwards also.
However both UNOs have 16MHz crystals, but in my problem as above, 8MHz were used. So there's no one-by-one compare possible here.

Since these UNO's crystals have the size of a flea, they are actually not interchangable with my big ones, I use with the breadboard. As a "half workaround", I flashed ones bootloader with the two 16MHz UNOs, using "8MHz  external crystal" settings and put the so flashed ATMEGA on the breadboard with the 8MHz crystal.

Then again, I was at the same place as before, since...
Flashing the first sketch was OK.
Flashing the second ended up with the "...not responding" error message, as before.

Therefore, as last hope I looked at a Pro-Minis pins, with a FTDI232 Board plugged in on its short side. The Pro Minis six pins: Gnd, Gnd,Vcc, Rx, Tx, Rst. Looking at the FTDIs pins, I saw the DTR connected to the Pro-Minis Reset. Connecting the same at my Breadboard-FTDI connection didn't help though. :(((

Well, then I got all my different USB/UART-TTL-converter and gave them a try. As there were a PL2303, a CH340G and a CP2102. Finally the PL2303 worked!!!!
After hitting upload at the Arduino IDE, I grounded the ATMEGAs reset and released it as the IDE started uploading to the ATMEGA. This procedure worked every time I tried.
I'm not very happy with this, but it works.

I think I will try some Resistors between the RX/TX inbetween  the Pro Mini an the USB/UART-TTL Converter. I saw this at other places, like at NodeMCU. Maybe this helps.

So far for now.
Does anbody have more and better ideas?
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: af1812 on Oct 03, 2018, 12:40 am
This out of sync business is driving me nuts. Recently on both Mac and Pi3, I upgraded to IDE 1.8.7. None of ny Uno nor Nano can upload my sketches except for Mega. I havn't figured out why yet but I suspect it is 1.8.7 bug or some thing. Do you use 1.8.7?
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Oct 03, 2018, 12:43 am
This out of sync business is driving me nuts. Recently on both Mac and Pi3, I upgraded to IDE 1.8.7. None of ny Uno nor Nano can upload my sketches except for Mega. I havn't figured out why yet but I suspect it is 1.8.7 bug or some thing. Do you use 1.8.7?
For the Nano, try selecting Tools > Processor > ATmega328P (Old bootloader).
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: williams303 on Oct 23, 2018, 07:06 pm
Arduino: 1.8.7 (Windows 10), Board: "Arduino Nano, ATmega328P"

Sketch uses 14496 bytes (47%) of program storage space. Maximum is 30720 bytes.
Global variables use 912 bytes (44%) of dynamic memory, leaving 1136 bytes for local variables. Maximum is 2048 bytes.
C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM6 -b115200 -D -Uflash:w:C:\Users\Manni\AppData\Local\Temp\arduino_build_750153/BADDY_EMBEDDED_CODE_ARDUINO_V01.ino.hex:i

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

avrdude done.  Thank you.

An error occurred while uploading the sketch

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: sterretje on Oct 23, 2018, 07:49 pm
...
...
Did you read reply #26? Did it solve the problem?
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: jmailer01 on Oct 26, 2018, 06:45 pm
I had the same problem and fixed it by downgrading to AVR Boards 1.6.20. Before I did this I tried selecting ATmega328P (Old Bootloader), but this gave a compile error. This is a cheap Chinese nano with the CH340 driver.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: sterretje on Oct 26, 2018, 06:57 pm
The selected boot loader should not have an influence on the compiler.

Please provide exact error message if you encounter the problem again.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: danai5001 on Nov 17, 2018, 03:59 pm
I was fixed the problem by changing  usb cable.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: regmason on Nov 17, 2018, 08:40 pm
Hello all,

   I recently upgraded to IDE 1.8.7. I use mostly Arducam Nanos with the legal FTDI232 chips in all of my projects for the last two years. When I tried to download a sketch, I got the same error messages that everyone has been talking about. I investigated the problem by checking for up to date drivers, changing cables, trying downloading on several other PC platforms.  What I finally found was that downloading worked fine on Mega2560 and other UNO boards.  The only one that didn't work was my Nanos! I remedied the problem by re-installing IDE 1.8.5. Works fine. So I reloaded IDE1.8.7 back on another platform and noticed the old bootloader selection that wasn't in the 1.8.5 list. As suggested by someone in an earlier post, it worked. Something has changed in the new IDE load that has caused a problem. This has go to be why the Old Bootloader is now a selection. How about letting the rest of us know about it. It certainly would save some sleepless nights and panic attacks trying to re-establish communication with my Nano boards.

Reg Mason
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: sterretje on Nov 17, 2018, 11:04 pm
There are hundreds of threads here about the problem. You just found the wrong one ;)

To sort it in the IDE 1.8.5, upgrade the board manager to version 1.6.21.

IDE 1.8.7 uses a higher version than 1.6.21 and that version has a bug in the tool chain that you might or might not encounter one day. You can downgrade the board manager to version 1.6.21
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Nov 18, 2018, 01:36 am
It's also in the official documentation for the Nano:
https://www.arduino.cc/en/Guide/ArduinoNano#toc4 (https://www.arduino.cc/en/Guide/ArduinoNano#toc4)
Quote
NOTE: We have updated the NANO board with a fresh bootloader. Boards sold from us from January 2018 have this new bootloader, while boards manufactured before that date have the old bootloader. First, make sure you have the Arduino AVR Core 1.16.21 or later looking at the Board Manager. Then, to program the NEW Arduino NANO boards you need to chose Processor > "ATmega328P". To program old boards you need to choose Processor > "ATmega328P (Old Bootloader)". If you get an error while uploading or you are not sure which bootloader you have, try each type of processor 328P until your board gets properly programmed.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: mostly_human on Nov 24, 2018, 01:44 pm
And if all the other suggestions don't work then its avrdude trying to connect to your arduino board at the wrong speed.
I upgraded Ubuntu and had to reinstall the IDE. Ended up with IDE version 1.8.7 and found I had this problem except responce was generally not 0x00. Obviously my boards were OK because I could programme then on another computer. Finally figured it out as being a speed issue. I guess someone decided to change the default avrdude speed to 115200. File ->preferences and tick the box for show verbose output during upload to see the speed used.
To change the speed for programming (on Ubuntu 18.04 at least) edit /home/<username>/arduino-1.8.7/hardware/arduino/avr/boards.txt
then change nano.menu.cpu.atmega328.upload.speed=115200
to nano.menu.cpu.atmega328.upload.speed=57600
of coarse you will need to search for your device rather than the atmega328 used on my Nano's.

I hope this saves someone hours of searching and pointless downgrades, re-installs or changing boards.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Nov 24, 2018, 01:49 pm
I guess you didn't read what I wrote in my last reply. You don't need to edit boards.txt. You only needed to select Tools > Processor > ATmega328P (Old Bootloader).

The old bootloader communicates at 57600. The new bootloader communicates at 115200.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: freddie43 on Nov 28, 2018, 11:39 pm
Thank you pert for the solution.

I upgraded from IDE 1.8.5 to 1.8.7 a few days ago, but it was only today when I wanted to amend an old Nano program that I fell down this pothole. Fortunately after a very frustrating hour or two I ended up here.

Funny really. A few days ago I posted a topic The need for speedy access to known solutions (http://forum.arduino.cc/index.php?topic=581613.msg3959195#msg3959195) and a plea for full revision histories of software libraries. pert was one of the few people who could see what I was getting at.

Of course the answer to this Nano problem is hidden away in 12,500 words of Arduino Software Release Notes (https://www.arduino.cc/en/Main/ReleaseNotes). But who would think of looking there?

This is one of the annoying aspects of the Arduino. Although it is great fun, it is so 1960's - when weekly updates used to arrive highlighting the effect of changes that had been made weeks or months before.

Somewhere someone must have known that this update was going to affect people with Nanos, but without speedy access to known solutions a whole crowd of people (looks like more than 26,000!!!) have been floundering around. I rest my case.

Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Nov 29, 2018, 12:22 pm
I'm glad if I was able to be of assistance.

I think this issue provides a much better argument for what you proposed. This is a problem that has appeared so many times over the last year that I have a canned reply saved in a file so I don't need to type it out every time. There are quite a few other potential causes of this error message so you might not get very good search results just by typing it into Google, especially earlier in the year before we had managed to saturate the Internet with answers for people having this problem. That leads to a vicious cycle where searching for existing answers is difficult so people just make a new post on the forum and we repeat the same thing over and over again.

Some time ago, I created a Troubleshooting page on the Arduino forum that was intended to be a collection of answers to the most common problems:
https://playground.arduino.cc/Main/Troubleshooting (https://playground.arduino.cc/Main/Troubleshooting)
There is an official Troubleshooting page (https://www.arduino.cc/en/Guide/Troubleshooting), which the IDE even recommends reading in some cases when an upload fails, but it's really low quality and outdated. I have a pretty good "to do" list of things I was planning to add to the Playground page but now that they're planning to ruin the Playground by making it read-only (http://forum.arduino.cc/index.php?topic=580991), I don't know if I'll bother. I did go ahead and add the Nano issue mentioned here since I was thinking about it.

Of course the answer to this Nano problem is hidden away in 12,500 words of Arduino Software Release Notes (https://www.arduino.cc/en/Main/ReleaseNotes). But who would think of looking there?

This is one of the annoying aspects of the Arduino. Although it is great fun, it is so 1960's - when weekly updates used to arrive highlighting the effect of changes that had been made weeks or months before.

Somewhere someone must have known that this update was going to affect people with Nanos, but without speedy access to known solutions a whole crowd of people (looks like more than 26,000!!!) have been floundering around. I rest my case.
I must point out that this is also documented in the "Getting Started" page for the Nano:
https://www.arduino.cc/en/Guide/ArduinoNano#toc4 (https://www.arduino.cc/en/Guide/ArduinoNano#toc4)
I think it's reasonable for someone who just bought a Nano to look for help. However, it might be so obvious for someone who's Nano was working fine until they updated to a new version of Arduino AVR Boards.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: freddie43 on Nov 30, 2018, 09:26 am
pert Thanks for that very interesting reply, although I think there is a 'not' missing from your final sentence ;-). Also, wasn't it a new IDE that caught people out?

Thanks also for the link to the Getting Started (https://www.arduino.cc/en/Guide/HomePage) pages. How come in 3 years on Arduinos I never looked there? I guess it is because none of the books I have got out of the library or pdfs I downloaded ever mentioned it. I can see I also need to explore the Playground area!

Your Troubleshooting page is certainly a good idea and I would like to contribute to it and see it transferred to this forum. It could include a link to the Getting Started pages.

Maybe our last few posts deserve a new topic to attract a wider audience?
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Nov 30, 2018, 09:42 am
I think there is a 'not' missing from your final sentence ;-)
Oops, you're correct.

wasn't it a new IDE that caught people out?
No, the change was made in Arduino AVR Boards:
https://github.com/arduino/ArduinoCore-avr/commit/1b14cc07331268e95eddcce2cc67e29ed667e62f (https://github.com/arduino/ArduinoCore-avr/commit/1b14cc07331268e95eddcce2cc67e29ed667e62f)
The same problem will occur with any IDE version if they install Arduino AVR Boards 1.6.21 or newer. You might think it's related to an Arduino IDE version because the IDE comes with the latest version of Arduino AVR Boards at the time. So if you install Arduino IDE 1.8.6 or newer, you get the Arduino AVR Boards with the new Nano bootloader. But ever since the introduction of Boards Manager, it doesn't really make sense to associate a specific Arduino AVR Boards version to an IDE version since any Arduino AVR Boards version can now be used with any IDE version.

Your Troubleshooting page is certainly a good idea and I would like to contribute to it
There will probably only be one more month left to do that before they make it read-only.

see it transferred to this forum.
I don't think the forum is an appropriate platform for this content. If I was to continue with the project, I would probably use a GitHub wiki, though it's not the greatest. I'll eventually try to do a big rewrite of the official Troubleshooting page and incorporate some of the more general content from the Playground page.

Maybe our last few posts deserve a new topic to attract a wider audience?
I think your other thread (http://forum.arduino.cc/index.php?topic=581613) is fine for that. No need to create a new one.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: freddie43 on Nov 30, 2018, 10:43 am
Whatever they did with the boards it was the (consequential) change to the IDE that caught me out. I thought that was true for most other people too.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Nov 30, 2018, 11:11 am
There was no change to the IDE. The commit I linked in my last reply is the only change that was made.

It was the Arduino AVR Boards 1.6.21 release that caused the problem for most people because that was done 6 months before the first release of an IDE version that contained an Arduino AVR Boards version with the new Nano bootloader. By default, the Arduino IDE notifies you when a new Arduino AVR Boards version is available and prompts you to update. It continues doing this forever until you either update or disable the checks in preferences. So a lot of people just clicked the update and then found they could no longer upload to their Nano. Other people bought the new official Nano boards and found they could not upload to them because they were still using the old version of Arduino AVR Boards.

It was those first couple months when the problem was popping up so frequently. By the time Arduino IDE 1.8.6 was released, the word had mostly gotten out that you needed to select the correct Tools > Processor item for the Nano.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: freddie43 on Nov 30, 2018, 12:35 pm
Sorry. We seem to be talking at cross purposes here. I thought we were agreed with the release notes for 1.8.6

core]
* AVR: Set Optiboot as default bootloader for Nano. This is the bootloader installed on new
       Arduino Nano boards. If you have a Nano with the old bootloader you must select
       Tools > Processor > ATmega328P (Old Bootloader) to upload.

It was when I upgraded that I hit this problem on an old Nano
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Nov 30, 2018, 12:44 pm
No. I understand exactly what you're saying. You're just not understanding what I'm saying. I'm quite aware of that part of the release notes because I wrote it (https://github.com/arduino/Arduino/pull/7330/files). I think if you go back and carefully read my previous replies it should be clear to you.

The release notes system goes back to the days before Boards Manager, when the Arduino AVR Boards version was directly tied to the IDE version since they were always released together as a single package. That is no longer the case. They should have separate release notes for each of the official hardware packages (Arduino AVR Boards, Arduino SAMD Boards, etc.) but they don't. The closest thing to that is the commit history on their GitHub repositories.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: freddie43 on Nov 30, 2018, 06:16 pm
pert. I am away from home at the moment so I do not have access to a Nano or an IDE.

I do hear what you say and I accept it. But what I am saying is that however it got there, the first time I hit the problem was when I updated the  IDE from 1.8.5 to 1.8.7. That is my experience and you cannot deny that is why I see things the way I do (and probably why others do too). If I had not updated I would not have known of the problem or be in this thread. But thank you for the explanation of how and when it got there. I am grateful for your clarification of how it got there, but can we leave it at that?

By comparison David Prentice has managed to identify the wide range of controller chips that are put on seemingly identical mcufriend TFT LCD shields and has worked hard to provide software to drive them all.

Sadly, unlike my genuine Arduinos, all my clone Nano, Uno and Mega boards seem to have the same onboard refs, so there is no s/w way to identify them and treat them correctly and change the way the IDE handles them.

But the real problem is as Robin2 says in my other thread: Arduino developers seem to have very little interest in backwards compatibility.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Nov 30, 2018, 11:19 pm
Sadly, unlike my genuine Arduinos, all my clone Nano, Uno and Mega boards seem to have the same onboard refs, so there is no s/w way to identify them and treat them correctly and change the way the IDE handles them.
The solution is to just burn whichever bootloader you want to them. Then there is no need to do any identification. I prefer to use the Uno's configuration, since this frees up 1.5 kB of flash memory:

After doing this, you should use your Nano as an Uno.


But the real problem is as Robin2 says in my other thread: Arduino developers seem to have very little interest in backwards compatibility.
It is true they could have changed the bootloader and fixed the watchdog bug of the old one without breaking compatibility. The only downside compared to what they did do is needing to stay with the slower upload speed of the old bootloader. Or they could have broken compatibility, but changed the boot section to 0.5 kB instead of the unnecessary 2 kB they are using now. So we ended up with the worst of each option: Breakage, without reaping the most important potential benefit of the change. It would be interesting to know the story of how that came about. I suspect this one was not a decision made by the developers, but someone in management or manufacturing. I pointed out the issue immediately after the change was made to Arduino AVR Boards but by that time they had already made a bunch of Nanos with the new configuration so fixing it would have required either doing the right thing and recalling all the misconfigured Nanos from their distributors or else doing the hacky thing and adding yet another Nano configuration option. Instead, they decided to stick with the mistake and continue to produce Nanos with the suboptimal new configuration.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: freddie43 on Dec 01, 2018, 05:56 am
pert Funny you should say that about burning a bootloader, as that was what I did when my clone Unos seemed to play up after the IDE upgrade. There is a very useful 'Instructables' post on 'How to fix bad Chinese clones (https://www.instructables.com/id/How-to-fix-bad-Chinese-Arduino-clones/)' which I used to cope with the CH340 problem when I first bought  a clone. This time I did Uno to Uno as well as reinstalling CH340. Didn't realise I could do Uno to Nano. Fascinating!

Thanks too for the second part of your post. Really interesting.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: jaggermad on Feb 03, 2019, 01:38 am
I had this problem yesterday with my nanos... I solve it to downgrading to AVR Boards 1.6.20. A temporal solution... I guess.
genius, thank you very much
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Feb 03, 2019, 02:11 am
genius, thank you very much
No, it's not at all genius. It's actually a very bad solution. The much better solution (as I have already explained (http://forum.arduino.cc/index.php?topic=530807.msg3632059#msg3632059)) is to use the up to date version of Arduino AVR Boards, and select Tools > Processor > ATmega328P (Old Bootloader).
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: milanstekly on Mar 11, 2019, 11:37 am
The problem as it occurs with uploading to Nano with Arduino AVR Boards 1.6.21 can be solved by simply selecting Tools > Board > ATmega328P (Old Bootloader). There's no need to uninstall or downgrade anything.

The problem as it occurs for other boards will have a different cause and a different solution.
Selecting old bootloader would be simple if there was such an option. (I use the Linux version of the IDE.) Can you help me?
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: pert on Mar 11, 2019, 12:40 pm
Selecting old bootloader would be simple if there was such an option. (I use the Linux version of the IDE.) Can you help me?
If there is no Tools > Board > ATmega328P (Old Bootloader) menu option, that means you're using a version of Arduino AVR Boards older than 1.6.21. If so, then the Tools > Processor > ATmega328 menu selection is the exact equivalent of Tools > Board > ATmega328P (Old Bootloader) when using Arduino AVR Boards 1.6.21 or newer. If you have no Tools > Processor menu, then that means you're using an extremely outdated version of the Arduino IDE.

I'll need some additional information in order to help you:

Are you using a Nano?

Is it an official Arduino Nano or one of the cheaper ones made by other companies?

If it's an official Nano, when did you buy it?
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: serge2010 on Aug 18, 2019, 11:05 am
Hi guys,

I have exactly the same issue with by banggood - arduino nano copy. I've tried using the old bootloader and also installed the chinese drivers - still not working.

Please help me.

Details:

1) Product: https://eu.banggood.com/Wholesale-Warehouse-ATmega328P-Nano-V3-Controller-Board-Compatible-Arduino-wp-Eu-940937.html?rmmds=search

2) My settings: Tools > Board > Arduino Nano; Tools > Processor > ATmega328P (Old Bootloader)

3) Drivers: https://www.instructables.com/id/How-to-fix-bad-Chinese-Arduino-clones/

4) Error message:

Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino Nano, ATmega328P (Old Bootloader)"

avrdude: stk500_recv(): programmer is not responding
Sketch uses 494 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.
the selected serial port avrdude: stk500_recv(): programmer is not responding
 does not exist or your board is not connected
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avrdude -CC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -carduino -PCOM4 -b57600 -D -Uflash:w:C:\Users\Serg\AppData\Local\Temp\arduino_build_26314/eeprom_clear.ino.hex:i

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM4
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.16

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : 3.686 MHz
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\Serg\AppData\Local\Temp\arduino_build_26314/eeprom_clear.ino.hex"
avrdude: writing flash (494 bytes):

Writing | ################################################## | 100% 0.15s

avrdude: 494 bytes of flash written
avrdude: verifying flash memory against C:\Users\Serg\AppData\Local\Temp\arduino_build_26314/eeprom_clear.ino.hex:
avrdude: load data flash data from input file C:\Users\Serg\AppData\Local\Temp\arduino_build_26314/eeprom_clear.ino.hex:
avrdude: input file C:\Users\Serg\AppData\Local\Temp\arduino_build_26314/eeprom_clear.ino.hex contains 494 bytes
avrdude: reading on-chip flash data:

Reading | avrdude: stk500_recv(): programmer is not responding
############avrdude: stk500_recv(): programmer is not responding
avr_read(): error reading address 0x0000
    read operation not supported for memory "flash"
avrdude: failed to read all of flash memory, rc=-2
avrdude: stk500_recv(): programmer is not responding

avrdude done.  Thank you.

the selected serial port
 does not exist or your board is not connected

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Title: Re: avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
Post by: serge2010 on Aug 18, 2019, 11:39 am
I also found this line in the config file called "avrdude"


Line: # There is a ATmega328P kit PCB called "uncompatino".

Could this be the issue? I don't know how to delete it, as it says I had no admin rights.