In any case, the rules of EIND usage must be documented.
The avr-gcc/avr-ld internally use the EIND for indirect function call, case
statement optimization (tablejump) and -mcall-prologues optimization. The
EIND always should contain "hh8(pm(start of .trampolines section))" value,
i.e. 0 when application code is executed or 1 when bootloader code in
mega256
devices is executed. Calling the bootloader code from application code and
calling application from bootloader is PROHIBITED, allowed only jump from
application code to reset vector of bootloader and jump from bootloader to
reset vector of application with disabled interrupt. Changing of the EIND
register in application and bottloader code is forbidden.
Anatoly.
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list