New Arduino Nano Bootloader as of January 2018
I bought a couple bulk packs of Arduino Nano knock-offs from Amazon early last year (2018). Buying the off brands in bulk gets you Nanos at about ~$4 a board which is sweet if you’re like me and start a whole bunch of projects at the same time.
Anyway, I just started getting into a whole bunch of new projects requiring Arduino Nanos and kept getting the dreaded STK 500 upload errors from my boards. I thought, maybe something happened in storage and they got mad at me or something. I re-burned bootloaders onto them and they work fine after that.
It wasn’t until the third one that I started to think, it seems to be all of the Nanos I bought last year, this can’t be a coincidence. Nope, it turns out that Arduino has a new Arduino Nano bootloader for Nano boards.
Here’s a link to their site where they mention it https://www.arduino.cc/en/Guide/ArduinoNano.
And here’s an excerpt about what they had to say…
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.
So, if you find yourself getting stk 500 errors but your board used to work fine, try selecting the “Old Bootloader” option from the processor, it won’t hurt it if it’s the wrong one, it just wont upload. If that doesn’t fix your issue, you’ll likely have to try burning a new bootloader. I’m just going to re-burn all of mine anyway so I don’t have to remember which have the new or the old bootloader.
So what exactly changed?
Well, basically the Nano now uses the same bootloader as the Uno/Genuino boards. The main difference that caused this whole debacle is that the new bootloader uses a baud of 115200 while the old uses 57600 so this is why attempting to upload will fail if you don’t select the appropriate bootloader (notice bullet point 2 below).
From the Optiboot github README here, is a list of features
- Allows larger sketches. Optiboot is only 512 bytes, freeing 1.5k of extra code space compared to older bootloaders.
- Makes your sketches upload faster. Optiboot operates at higher baud rates and has streamlined programming.
- Adaboot performance improvements. Optiboot implements “fastboot” that starts sketches immediate after power-on.
- Compatible with ATmega8, ATmega168, and ATmega328p Arduinos and derivatives including Lilypad, Pro, Nano, and many derivatives.
- Works with MANY additional Atmel AVR chips – almost anything that supports bootloads or “flash self-programming.” This includes chips from ATtiny 8pin chips through the 100pin ATmega2560 used on Arduino Mega.
- Supports alternate serial ports, cpu frequencies and baud rates.
I read somewhere that the fuses weren’t properly set by Arduino so you actually don’t get the extra space that you should from the new bootloader… I have not confirmed this and it may have changed since the information was posted.