Hi, I’m trying to upload to an Arduino Nano, but get this error:
avrdude: verification error, first mismatch at byte 0x0000
0x62 != 0x0c
avrdude: verification error; content mismatch
I have tried burning the bootloader, but then I get this error:
avrdude: ser_open(): can't open device "unknown": No such file or directory. I have been managing to upload to this board without any issues for many days, but now I suddenly get these errors.
I don’t understand what these errors are, and would appreciate any tips on what I should try doing, thank you.
I can think of a couple of possibilities for these errors.
- You might be using the wrong
board setting in
platformio.ini. If you are using
board=nanoatmega328new then try
board=nanoatmega328 and vice versa.
- You might have a corrupted bootloader. If so, you will need a ICSP device such as USBtinyISP. The command
pio run -t bootloader will burn the default bootloader assuming, of course, that the
board setting is correct. When you tried burning the bootloader, you didn’t try it with just a USB data cable did you? (Yes. I know, stupid question!) You need an ICSP for bootloader and EEPROM uploads.
- You have an
upload_port set in the
platformio.ini file, which is no longer correct for your device and anything else plugged in. Try removing it and letting PlatformIO search for the correct port. I have never had to specify a port, yet!
Failing this, please post the content of your
platformio.ini file. Thanks.