Closed justarandomgeek closed 5 years ago
Well, rats. I could swear that I had tested some of the BIGBOOT images :-(
FWIW, it did boot correctly even with that in place (the end of __do_copy_data
just rolled right on into the jump to main
), it's just the jump to do_spm
wasn't in the correct place to be called by the app - so it would have appeared to work until you tried to call do_spm
and then it would just roll right on into the bootloader for a "reset" instead!
I found when compiling with BIGBOOT that
__do_copy_data
was being placed before the jump table, due to the human-readable config flag info being placed in.data
. Using the.progmem
section puts them before most of.text
still, and using.text.buildinfo
to sort into the.text.*
rule produced linker errors (optiboot.c:(.init9+0x10a): warning: internal error: out of range error optiboot.c:(.init9+0x168): warning: internal error: out of range error
, on the lines usingeeprom_*_byte()
). I placed them in.fini8
to get it ordered properly to work, but someone with more linker-fu might have a better solution.