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.
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:
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).
I too wasted more than a week going round in circles stuck on downloading my Arduino Nano to USB-C. Between installing the CH341SER driver a dozen times, changing the cable 3 times for my COM7 to appear. Updating all my drivers via management tools like Driver Booster or CCleaner… But nothing happened, the upload was blocked at the Uploading .pio\build\nanoatmega328\firmware.hex stage… Until I tried to “uninstall” my COM7… by going into the Device Manager, it appeared in the Ports (COM and LPT), once the computer had been rebooted it was like a miracle! I downloaded my program in a matter of seconds !!!