On Wed, May 13, 2009 at 01:16:31PM +0200, 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 had to supply a stub function of my own [flash_read_byte()] to, in > turn, call pgm_read_byte() > and then it was happy :-)
Did you have a ".global pgm_read_byte" in your assembler code? ;-) That is needed to make the symbol public across compile units, and I can't see it in your example. Could you please forward this to the list also, because I'm still not able to post. mfG, Erik OK Erik -forwarded. No, I didn't - but now fixed. Thanks, Robert _______________________________________________ AVR-GCC-list mailing list AVR-GCC-list@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-gcc-list