bugAVR C Runtime Library - Bugs: bug #39008, Progmem macros do not work for...

 
 

bug #39008: Progmem macros do not work for TINY architecture devices

Submitted by:  Senthil Kumar Selvaraj <saaadhu>
Submitted on:  Thu 16 May 2013 12:39:58 PM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 5 - NormalItem Group: Header files
Status: NonePercent Complete: 0%
Assigned to: NoneOpen/Closed: Open
Release: 1.8.0Fixed Release: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>

 

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

Attach File(s):
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 16 May 2013 12:39:58 PM UTCsaaadhuAttached File-=>Added lpm_tiny.patch, #28096

    Back to the top


    Powered by Savane 3.1-cleanup