Hi, I am writing a USB bootloader for the ATxmeg128A1U. Currently, the bootloader is >8kB so won't fit in the boot section of flash. However, I planned on splitting the code between the table (0x1e000) and the boot (0x20000) sections which gives me about 16kB for the bootloader. The problem is that extended indirect calls (eicall) are used throughout the compiled code. This instruction (and the eijmp) append their 16-bit address with the EIND register to form the complete 24-bit address. In my application, this would require two values (0 for functions in the table section and a 1 for those in the boot section) and the compiler does not support that.
To get around this problem, as I understand it, the compiler will use "trampolines."
The GCC compiler documentation says that it will automatically create "trampolines" that will allow the EIND register to have a single value and all eicall functions call a trampoline to call any function in the entire address space no matter where it is.
However, the compiler (avr-gcc) does not seem to be doing that. Am I missing a compiler option?