Robert von Knobloch wrote:
Curiously I could not use e.g.
asm ("test_pgm_read_byte: jmp pgm_read_byte");
"undefined reference to 'pgm_read_byte'" although it is defined and in
scope.
Where pgm_read_byte is a library function from avr-libc.
I think this is because pgm_read_byte() is a macro.
Now another mechanism could have been setup: using an external interrupt
pin to generate a software interrupt, and using that software interrupt
to perform calls to functions in a PC BIOS way: in that case the caller
need not to know the location of the called functions, the interrupt
driver compiled and linked with the main application uses its own jump
table which is not exposed to external modules. However the API setup is
more complex since you have to pass the 'function id' of the called
functions in some register before generating the software interrupt.
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list