Hi On 5/13/09, Anatoly Sokolov <ae...@post.ru> wrote: > > > avr-libc/crt1/gcrt1.S : > > .section .init0,"ax",@progbits > .weak __init > ; .func __init > __init: > ....... > #ifdef __AVR_3_BYTE_PC__ > ldi r16, hh8(pm(__vectors)) > out _SFR_IO_ADDR(EIND), r16 > #endif /* __AVR_3_BYTE_PC__ */ > > This code set EIND to third byte of '__vectors' address. > > 1. This code is not clear, it is better use start address of *(.trampolines) > section instead of '__vectors' . > 2. More logical to move this code from crt1/gcrt1.S to > gcc\config\avr\libgcc.S. Btcause the GCC uses EIND internally, then it must > initialize its. >
I must be compiling my bootloader wrong, because I don't get any trampolines in the bootloader. My indirect jump to 0x0 didn't work, and neither did my direct jump. Is there a way to jump to the application without setting EIND? Sorry I missed how how gcrt1.S sets EIND since I was looking at the gcc source code. We should keep eijmp and eicall. Also, there is the issue of longjmp setting EIND and not restoring it. It gets a little tricky with interrupts that can potentially set EIND as well. Sean _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list