On 5/13/09, Anatoly Sokolov <ae...@post.ru> wrote: > Hi. > > >> On 5/12/09, Weddington, Eric <eric.wedding...@atmel.com> wrote: >>> I don't understand what you're doing here. >>> >>> You've completely removed EIJMP from gcc. >>> >> >> That is correct. It is better for gcc not to use this instruction. >> > > This prevent using indirect function call in bootloader code for >128KB > FLASH devices. >
Well as it stands now, gcc emits eijmp and eicall, but never sets EIND, so if EIND is non-zero, then the call will most likely fail. EIND is set by longjmp but not cleared, so if you use longjmp or set EIND for some other reason, then do an indirect jump, your program will crash as mine did before I modified gcc (now it runs perfectly) As far as indirect function call to bootloader goes.. I don't think it's prevented at all. You still jump to a trampoline which jumps to the bootloader which is no different from before. Sean > Anatoly. > > _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list