bugAVR C Runtime Library - Bugs: bug #33913, Make MCUSR an alias to MCUCSR on...

 
 

bug #33913: Make MCUSR an alias to MCUCSR on all devices

Submitted by:  Daniel Willmann <asdfuser>
Submitted on:  Sun 31 Jul 2011 09:15:08 PM UTC  
 
Category: HeaderSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Header files
Status: Wont FixPercent Complete: 0%
Assigned to: Eric Weddington <arcanum>Open/Closed: Closed
Release: 1.7.0Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sun 31 Jul 2011 09:30:39 PM UTC, comment #1:

The I/O header files define the register names according to the XML device files that are shipped with AVR Studio.

There have been occasional device header files where the register names were changed after release, or there was a mistake in the creation of the header file. In these cases you may end up having both MCUSR and MCUCSR, but in reality only one name is correct. Where there is an alias, the alias name is deprecated.

One way to use either name in your application code is to check for both names and define a 3rd name to either one, or check for one name and define it to the other one. Do something like this in one of your header files:

#if defined(MCUCSR)
#define MCUSR MCUCSR
#endif

However, it is not guaranteed that the the bit definitions are exactly equal in both register definitions, or across AVR devices. There may (or may not) be variations that you might have to account for in your code.

But, we will not be adding aliases to the I/O header files. Each I/O header file is supposed to represent the XML device file (and by extension, the datasheet) only. It is best to build other systems, such as a Hardware Abstraction Layer, on top of these I/O header files.

Closing as wontfix.

Eric Weddington <arcanum>
Project AdministratorIn charge of this item.
Sun 31 Jul 2011 09:15:08 PM UTC, original submission:

On some devices (like atmega8) MCUSR is an alias to MCUCSR, but others lack this.

I've so far noticed it to be missing on iom16.h and iom8515.h, but
http://www.mail-archive.com/ethersex-devel@list.zerties.org/msg01329.html also mentions iom162.h, iom16a.h and iom8538.h which also seem to be affected.

Adding an alias on these platform would make it easier to write code that runs on different devices.

Daniel Willmann <asdfuser>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by arcanum (Posted a comment)
  • -unavailable- added by asdfuser (Submitted the item)
  •  

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

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 31 Jul 2011 09:30:39 PM UTCarcanumOpen/ClosedOpen=>Closed
    Sun 31 Jul 2011 09:30:37 PM UTCarcanumStatusNone=>Wont Fix
      Assigned toNone=>arcanum

    Back to the top


    Powered by Savane 3.1-cleanup1