Hello there good people.
This my attempt to make a post about a common issue regarding Arduino bootloader. I have faced some errors and managed to solved them. Making a post so that it's useful for someone else in future. Please keep in mind the solutions may not be universal. I am just telling what worked for me.
Components I used:
- Arduino Uno R3 (As programmer) [ATmega328P]
- Arduino Uno SMD (As target board) [ATmega328PB]
Please note that both are clones.
I followed the instructions from https://support.arduino.cc/hc/en-us/articles/4841602539164-Burn-the-bootloader-on-UNO-Mega-and-classic-Nano-using-another-Arduino
The first error I faced was-
error while burning bootloader of uno using anoter uno avrdude: Expected signature for ATmega328P is 1E 95 0F
Double check chip, or use -F to override this check.
Failed chip erase: uploading error: exit status 1
This happened after clicking burn bootloader option. The fix is-
- First Upload the sketch a usual.
- Find the avrdude.conf file. You might find it in this location C:\Users<YourUsername>\AppData\Local\Arduino15\packages\arduino\tools\avrdude<version>\etc\avrdude.conf
- Make a backup of this file somewhere else just incase. : )
- Open this file using VS code (or anything you prefer).
- Find the ATmega328P. Just Ctrl+F and type 'ATmega328P'. Go to the second one from the results.
- There should be signature = 0x1e 0x95 0x0f; Edit the 0f to 16. So signature = 0x1e 0x95 0x16. Then save but do not close.
- Now clink on burn bootloader option. It should work now.
- After successfully burning the bootloader go back to the avrdude.conf file. Edit the 16 back to to 0f under ATmega328P. (Don't accidently edit the wring line)
- Now save and close
Done
Also burning bootloader solved two major issues on two separate boards. One Uno SMD was running old code even after uploading new sketch. Another Uno was not uploading code at all and showing error.
I hope this will be helpful to someone in future. <3