bugAVR C Runtime Library - Bugs: bug #24887, boot.h not compatible with -mint8...

 
 

bug #24887: boot.h not compatible with -mint8 compiler option

Submitted by:  Ken Krieger <kenk>
Submitted on:  Thu 20 Nov 2008 07:41:53 AM 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.6.4Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 20 Nov 2008 01:54:51 PM UTC, comment #2:

-mint8 is not supported in avr-libc. Closing bug as "Won't Fix".

Eric Weddington <arcanum>
Project AdministratorIn charge of this item.
Thu 20 Nov 2008 08:18:55 AM UTC, comment #1:

-mint8 is "not really" supported, see:
http://www.nongnu.org/avr-libc/user-manual/using_tools.html

Wouter <wutje>
Thu 20 Nov 2008 07:41:53 AM UTC, original submission:

The case where I am seeing this is in the definitions of boot_page* functions. In here, a check is done against USHRT_MAX. The value of this can change depending on the usage of the -mint8 compiler switch (making int default to be 8-bit sized).

Specifically, the comparison (which I notice) is line 597 of boot.h:

#elif (FLASHEND > USHRT_MAX)

The author intended USHRT_MAX to be == 65535, which it is without -mint8, with -mint8 it's 255. As a result the wrong functions are instantiated.

A test for this might be worth adding to the regression suite as well.

To reproduce, simply call boot_page_erase() (for instance) using a Mega64 architecture. With -mint8, this fails (looking for RAMPZ) without this switch, success.

Ken Krieger <kenk>

 

(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 wutje (Posted a comment)
  • -unavailable- added by kenk (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
    Wed 17 Dec 2008 08:53:54 PM UTCarcanumOpen/ClosedOpen=>Closed
    Thu 20 Nov 2008 01:54:51 PM UTCarcanumStatusNone=>Wont Fix
      Assigned toNone=>arcanum

    Back to the top


    Powered by Savane 3.1-cleanup1