URL: <http://savannah.nongnu.org/bugs/?39008>
Summary: Progmem macros do not work for TINY architecture devices Project: AVR C Runtime Library Submitted by: saaadhu Submitted on: Thu 16 May 2013 12:39:58 PM GMT Category: Library Severity: 3 - Normal Priority: 5 - Normal Item Group: Header files Status: None Percent Complete: 0% Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Release: 1.8.0 Fixed Release: None _______________________________________________________ Details: The macros in pgmspace.h do not work for TINY devices (attiny10/20/40 etc.), as they do not have any variant of the LPM instruction. Instead, flash memory is mapped to data memory space at a certain offset, and normal data memory load instructions can be used to read from flash. The attached patch customizes the __LPM series of macros for __AVR_TINY__, reimplementing them using plain LD, with the memory offset coming from a macro (__AVR_TINY_PM_BASE_ADDRESS__) defined by the compiler. Changelog 2013-05-16 Pitchumani Sivanupandi <pitchuman...@atmel.com> * include/avr/pgmspace.h: Customize and reimplement __LPM macros for tiny architecture. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Thu 16 May 2013 12:39:58 PM GMT Name: lpm_tiny.patch Size: 4kB By: saaadhu <http://savannah.nongnu.org/bugs/download.php?file_id=28096> _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?39008> _______________________________________________ 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