Follow-up Comment #7, patch #6352 (project avr-libc):

The _PF functions in the respective binary libraries are broken, and they ever
were, since the've been added to avr-libc in 1.7.0.

They don't use the ELPM instruction rather, incorrectly, the LPM instruction.

The reason is, that these functions rely on LPM_R0_ZPLUS_NEXT macro in
common/macros.inc, which uses the BIG_CODE macro defined in the same file to
determine whether LPM or ELPM is appropriate.

BIG_CODE is defined according to FLASHEND macro which comes from the
individual files' headers (additionally, the RAMPZ register's address might be
needed for some of the files). However, these files are compiled with the
"generic" -mavrN switch, so the FLASHEND macro is unavailable thus considered
zero by preprocessor.

This bug was originally reported here
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=110170



    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6352>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
AVR-libc-dev mailing list
AVR-libc-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev

Reply via email to