AVR C Runtime Library - Bugs: bug #39008, Progmem macros do not work for...
You are not allowed to post comments on this tracker with your current authentication level.
bug #39008: Progmem macros do not work for TINY architecture devices
Submitter: | Senthil Kumar Selvaraj <saaadhu> | ||
Submitted: | Thu 16 May 2013 12:39:58 PM UTC | ||
Category: | Library | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | Header files |
Status: | None | Percent Complete: | 0% |
Assigned to: | None | Open/Closed: | Open |
Release: | 1.8.0 | Fixed Release: | None |
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
Follows 1 latest change.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2013-05-16 | saaadhu | Attached File | - | ![]() |
Added lpm_tiny.patch, #28096 |
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 <pitchumani.s@atmel.com>
* include/avr/pgmspace.h: Customize and reimplement __LPM
macros for tiny architecture.