arduino makefile reqs different setup for (apparently?) otherwise same boards

I’m using the arduino makefile to compile and upload a simple program from a raspberry pi.

I previously had been using an elegoo nano, with the following makefile:

ARDUINO_DIR = /usr/share/arduino

USER_LIB_PATH = $(HOME)/sketchbook/libraries

BOARD_TAG = nano328
BOARD_SUB = atmega328

include /usr/share/arduino/

and it worked fine. I swapped out that elegoo nano (which I’ve had for ~a year) for a brand new elegoo nano (still with an atmega328), and now the makefile doesn’t work (it stalls repeating the line about trying to connect over serial). However, if I swap out board tag for


then it DOES work with this new board (and NOT with the old one).

By all appearances, the two boards are totally identical. Does anyone know why the new board requires that I pretend it’s an uno?


First, a quick correction- the makefile that works with the old boards uses the following variables:

BOARD_TAG = nano328
BOARD_SUB = atmega328old

and the makefile that works with the new (though otherwise totally indistinguishable) uses these:

BOARD_SUB = atmega328

Also, the new boards upload fine from the arduino GUI on my mac with the settings board:"Arduino Nano", processor:"ATMega328P" (NOT "ATMega328P (Old Bootloader)").

So one obvious observation is that the new elegoo nanos ARE indistinguishable from the old ones except for which bootloader is installed. What I don't understand is why "BOARD_TAG" needs to be set to "uno" rather than "nano".

To be clear, I've tried compiling from the makefile with every combination of BOARD_TAG={uno,nano,nano328} and BOARD_SUB={atmega328,atmega328old} with each of the nanos, and the above variables are the only ones that worked for their respective boards.

I saved the output of the different upload attempts on the new nano, and diff'd them. The only difference between using BOARD_TAG=uno and BOARD_TAG=nano328 appeared to be baud rate (uno used 115200 and I don't remember what nano328 used, but it was lower).

So for future readers, maybe there's just a bug in the makefile that tries to upload to nanos using the NOT-old bootloader at too-low a baud rate? That's the only explanation I can think of. But it works for now using the above variables.

From the beginning of 2018, original Nanos are shipped with a new boot loader.

You needed to upgrade (in those days) board manager (not the IDE) to v1.6.21 to get the option for the old boot loader.

Looks like Elegoo went to the new Nano bootloader in January 2019, although there is no telling which version you could end up with from a particular seller.

ELEGOO NANO Boards Updates

Not sure why you need to specify uno in the makefile. The Nano uses the same optiboot bootloader as the Uno, the main difference being that the Nano allocates 2k of flash memory for the bootloader instead of the 0.5k used on the Uno, because someone neglected to change the fuse settings when the bootloader was updated.