Arduino Nano Stuck Uploading

I’m trying to switch to platformIO from the Arduino IDE and am running into an issue uploading. Setup is with an Arduino Nano, connected via miniUSB cable, just trying to upload Blink.cpp. Building succeeds in ~1sec. But when I hit Upload, everything seems okay, until it hits the line: “Uploading .pio\build\nanoatmega328\firmware.hex”
It just sticks indefintely.


platform = atmelavr
framework = arduino
board = nanoatmega328

I tried using an Uno and its USB cable, and the program uploaded quickly (swapped the platformio.ini accordingly). I also tried uploading to the Nano via the Arduino IDE, and that worked perfectly fine with the same USB cable and port (COM15). Swapping the MiniUSB cable changed nothing. Using a different Nano still has the problem, albeit slightly different:

Any help would be greatly appreciated!

This is the second Nano:

Have you disabled your antivirus?

Are any other programs using COM15, like a serial monitor e.g.?

What’s the output of a “Verbose Upload”? (search in project tasks)

Edit: The second nano looks like a different error.

Have you tried using

board = nanoatmega328new

instead of board = nanoatmega328 in the platformio.ini? If your Nano has a newer bootloader on it, it needs to be talked to on a different baud rate (previously 57600 now 115200).

1 Like

Looks like the first board was using the serial monitor. Ending that got it to the same error as board 2.

And updating the platformio.ini like you mention now allows uploads. Excellent!