bugAVR C Runtime Library - Bugs: bug #26284, boot_lock_fuse_bits_get does not...

 
 

bug #26284: boot_lock_fuse_bits_get does not compile under gcc 4.3.X

Submitted by:  Brad Schick <schickb>
Submitted on:  Wed 22 Apr 2009 07:17:50 AM UTC  
 
Category: LibrarySeverity: 3 - Normal
Priority: 5 - NormalItem Group: libc code
Status: FixedPercent Complete: 100%
Assigned to: Eric Weddington <arcanum>Open/Closed: Closed
Release: 1.6.5Fixed Release: 1.6.4

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 25 Apr 2009 09:16:24 PM UTC, comment #2:

Thanks for the patch!

Eric Weddington <arcanum>
Project AdministratorIn charge of this item.
Wed 22 Apr 2009 07:51:49 AM UTC, comment #1:

This actually may have been like for a long time, but I think it should still be changed. As is, the macro is a hassle to use since it doesn't accept a variable; it must be hard-coded in a switch statement or something. Also, the very similar 'boot_signature_byte_get' isn't limited to constants. My patch makes 'boot_lock_fuse_bits_get' more flexible like 'boot_signature_byte_get'.

Also there is no need to explicitly mark r0, r31, r30 as clobbered. r0 is not changed by LPM, only by SPM

Brad Schick <schickb>
Wed 22 Apr 2009 07:17:50 AM UTC, original submission:

The 'boot_lock_fuse_bits_get' macro in <avr/boot.h> causes a compile error when passed a non-constant argument. Building the code below in a fairly recent version of GCC (like 4.3.2) produces the error:

The error will be something like:

warning: asm operand 3 probably doesn't match constraints
error: impossible constraint in 'asm'

The problem seems to be the use of the "M" constraint in the macro. I believe the attached patch should fix the issue, and is a bit simpler as well.

Brad Schick <schickb>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

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 schickb (Submitted the item)
  •  

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

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 25 Apr 2009 09:16:24 PM UTCarcanumStatusNone=>Fixed
      Percent Complete0%=>100%
      Assigned toNone=>arcanum
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>1.6.4
    Wed 22 Apr 2009 07:17:50 AM UTCschickbAttached File-=>Added boot_lock_fuse_bits_get.patch, #17992

    Back to the top


    Powered by Savane 3.1-cleanup1