Issue with uploading program after burning bootloader

Take what I say with a grain of salt. I just play around with this stuff .:slight_smile:

1 - Get an up to date Avrdude and avrdude.conf. You may be able to use the Download for Linux ARM 64 bit or 32 bit depending on what Raspberry Pi you are using.

2 - Just overwrite the two bits I pointed out to you earlier and see if it works for you.

I overwrote the original /etc/arduino.conf ,two bits at location 10591,47 and 10591,49 from o to x and this worked for the m2560 chip.

Code: [Select]
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x o o o o o o o o";

Change to this.

Code: [Select]
memory "lock"
size = 1;
read = "0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0",
"x x x x x x x x x x o o o o o o";

Regarding the fuse settings. You need to decide if you just want the setup we have just been working with ie avrdude -v -p atmega2560 -c stk500v1 -P /dev/ttyACM0 -b 19200 -e -U lock:w:0x3F:m -U efuse:w:0xFD:m -U hfuse:w:0xD8:m -U lfuse:w:0xFF:m

and the bootloader stk500boot_v2_mega2560.hex, you would be good to go.

MegaCore would give you options for different clock(crystal) rates and a smaller bootloader if that would interest you.