[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [patch #7909] Adding __volatile__ to __asm__ within pgmsp

From: Alex Crawford
Subject: [avr-libc-dev] [patch #7909] Adding __volatile__ to __asm__ within pgmspace header
Date: Mon, 31 Dec 2012 05:54:19 +0000
User-agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)


                 Summary: Adding __volatile__ to __asm__ within pgmspace
                 Project: AVR C Runtime Library
            Submitted by: crawford
            Submitted on: Mon 31 Dec 2012 05:54:17 AM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



I noticed that gcc was optimizing out calls to pgm_read_word_far() that were
within a while loop. Adding the volatile directive fixes the underlying
problem. I've added the directive to each of the LPM and ELPM calls (20 in

The patch was generated from avr-libc-1.8.0.



File Attachments:

Date: Mon 31 Dec 2012 05:54:17 AM GMT  Name: volatile.patch  Size: 13kB   By:
Patch for avr/pgmspace.h


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]