bugAVR 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 Assigned to:  None
Percent Complete:  0% Open/Closed:  Open
Release:  1.8.0 Fixed Release:  None

Thu 16 May 2013 12:39:58 PM UTC, original submission:  

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.

Senthil Kumar Selvaraj <saaadhu>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #28096:  lpm_tiny.patch added by saaadhu (4KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by saaadhu (Submitted the item)
  •  

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-05-16 saaadhu Attached File- Added lpm_tiny.patch, #28096

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code