Hi -- I have the screamer bootloader that works great on 1280 chips, but since these are hard to find right now, I'm trying to port the bootloader so it works with the easier to find 2560's.
I see I can set my fuses for the M2560 to keep my BOOTSZ flashsize=2048 (start address $1F800) to match the M1280 -- so I did that.
In my makefile for the M1280 I have:
LDSECTION = --section-start=.text=0x1F000
Can I keep it there or do I need to use the Boot Flash size = 4096 and address 0x3E000?
However, when I program using avr-gcc (WinAVR 20100110) 4.3.3:
It does not write the bootloader in the correct location see section below (after :020000023000CC is blank):
:020000023000CC :10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00 :10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0 :10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 :10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0 :10004000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0 :10005000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB0 :10006000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA0 :10007000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF90 :10008000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
It's placing it at the top:
:100000000C9472000C9493000C9493000C94930045 :100010000C9493000C9493000C9493000C94930014 :100020000C9493000C9493000C9493000C94930004 :100030000C9493000C9493000C9493000C949300F4 :100040000C9493000C9493000C9493000C949300E4 :100050000C9493000C9493000C9493000C949300D4 :100060000C9493000C9493000C9493000C949300C4 :100070000C9493000C9493000C9493000C949300B4 :100080000C9493000C9493000C9493000C949300A4 :100090000C9493000C9493000C9493000C94930094 :1000A0000C9493000C9493000C9493000C94930084 :1000B0000C9493000C9493000C9493000C94930074 :1000C0000C9493000C9493000C9493000C94930064 :1000D0000C9493000C9493000C9493000C94930054 ...
I've been reading and trying all sorts of things... I can get it to program the bootloader hex file directly and it runs... but then I cannot update the app/program.
Doing other things, like changing to Boot Flash Size = 4096, then programing bootloader on the ATMEGA2560 I can update the app, but it won't start (stuck in bootloader forever).
However, flipping HFuse from D8 to D9 goes between bootloader and program...
I'm obviously doing something wrong, I just need some encouragement and guidance...