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

 
 

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

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

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

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

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 wutje (Posted a comment)
  • -email is unavailable- added by kenk (Submitted the item)
  •  

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-12-17 arcanum Open/ClosedOpen Closed
    2008-11-20 arcanum StatusNone Wont Fix
        Assigned toNone arcanum

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code