I bought an arduino nano (knockoff from Elegoo) and according to the Amazon description it comes with a bootloader.

From what I've read, this means that programming can occur over the usb connection rather than having to rely on a dedicated serial programmer.

I installed the necessary drivers, plugged in the Nano, and ran this command (not to program, just to see if the board would be recognized):

avrdude -p m328p -b 57600 -P /dev/wcbhserial1460 -c arduino

It recognized the board and said it was ready to be programmed. If I then actually go ahead and ask it to flash a hex file onto the board, will the -c arduino argument tell avrdude to use the bootloader or does it just overwrite everything? Can I reprogram multiple times using this command?

I'm using Atmel Studio 7 and am configuring it to call the appropriate avrdude command.

EDIT: According to this answer, the -D flag will program the chip without clearing the flash, allowing the bootloader to preserved. Unfortunately, since the ATmega devices don't support partial flash memory clearing, this will only work once. So essentially I need to reupload the bootloader each time, which kinda defeats the purpose of it right?

It looks like though he is talking about using an AVRISP, so does all that not apply if you're just programming using the bootloader and the usb connection in the first place?

  • 2
    if you write over ICSP header, the bootloader will be erased. if you use bootloader to write hex over UART the bootloader will stay
    – Juraj
    Jan 23, 2018 at 8:06


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.