Hi,

i have a functionpointer that is located in the variable fptr:

uint32_t fptr;

I'd now like to jump to that location.

From the avr-libc-user-manual-1.2.3 i thought i'd need to put it like this:

asm("ijmp":: "x" (fptr / 2));


As i understood it, fptr/2 would then be loaded into r27:r26 abd then the
instruction ijmp would be executed.

Compiling the program leads to:

src/main.c:149: Fehler: unmögliche Registerbedingung in »asm«
src/main.c:149: Fehler: unmögliche Registerbedingung in »asm«

which translates to something like: "impossible register condition in 'asm'".


Can anybody tell me why this does not work?

Is there an easier way to jump to an address in 128k program space?


Best regards,
Torsten.


_______________________________________________
AVR-GCC-list mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to