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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Daniel Willmann <asdfuser>
Submitted:  Sun 31 Jul 2011 09:15:08 PM UTC
   
 
Category:  Header Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Header files
Status:  Wont Fix Assigned to:  arcanum
Percent Complete:  0% Open/Closed:  Closed
Release:  1.7.0 Fixed Release:  None

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>
Group administrator
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.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-07-31 arcanum Open/ClosedOpen Closed
    2011-07-31 arcanum StatusNone Wont Fix
        Assigned toNone arcanum

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code