bugAVR C Runtime Library - Bugs: bug #33238, Wrong _VECTORS_SIZE for mega8U2 et...

 
 

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

bug #33238: Wrong _VECTORS_SIZE for mega8U2 et al

Submitter:  Don Kinzer <dkinzer>
Submitted:  Thu 05 May 2011 03:52:11 PM UTC
   
 
Category:  Header Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Header files
Status:  Fixed Assigned to:  arcanum
Percent Complete:  100% Open/Closed:  Closed
Release:  1.7.1 Fixed Release:  1.7.2

Mon 09 May 2011 10:27:05 PM UTC, comment #5: 

Oops. My fault too for not looking at your comment close enough. Now fixed with the value of 29.

Eric Weddington <arcanum>
Group administrator
Mon 09 May 2011 05:47:08 PM UTC, comment #4: 

In my original post, I mentioned that these devices have 28 interrupt vectors (not including the reset vector) and I see that the include files have been modified so that _VECTORS_SIZE is 28 4.  After reviewing include files for other devices, I believe that the _VECTORS_SIZE value should include the reset vector and should, therefore, have the value 29 4.  My apologies if I contributed to this confusion.

As an aside, I did submit a support ticket to Atmel on the subject of the .xml files being correct regarding the number of vectors.

Don Kinzer <dkinzer>
Thu 05 May 2011 07:27:33 PM UTC, comment #3: 

Oops, you are right.  The bugfix I was referring to was
something different (also _VECTORS_SIZE, but for the non-U
ATmega*8 devices).

Yes, these files have been auto-generated from the XML files,
so this is the source of the error.  Please do also file a
bug report with the Atmel AVR support so they can fix the
XML.

Joerg Wunsch <joerg_wunsch>
Group administrator
Thu 05 May 2011 04:30:17 PM UTC, comment #2: 

I chose the wrong avr-libc version number.  The files iom8u2.h, iom16u2.h and iom32u2.h in the WinAVR 20100110 release contain this line:
#define _VECTORS_SIZE (38 * _VECTOR_SIZE)

I noticed that the Atmel part description file ATmega8U2.xml (installed by v4.18, build 716) contains the line below, probably the source of the original error.
    <NMB_VECTORS>38</NMB_VECTORS>


Don Kinzer <dkinzer>
Thu 05 May 2011 03:59:15 PM UTC, comment #1: 

This bug has been fixed by 2011-02-09, and the fix is part
of the 1.7.1 release.  Your bug report claims you were
reporting this against 1.7.1, but your description makes
me doubt this (WinAVR 20100110 predates that version by
more than a year).  Can you please clarify?

Joerg Wunsch <joerg_wunsch>
Group administrator
Thu 05 May 2011 03:52:11 PM UTC, original submission:  

The mega8U2, mega16U2 and mega32U2 all have 28 interrupt vectors (not including the reset vector) but the files iom8u2.h, iom16u2.h and iom32u2.h all have _VECTORS_SIZE set to 38.  Moreover, crtm8u2.o, crtm16u2.o and crtm32u2.o are all built using this incorrect value resulting in an over-sized vector table.  The effect of this is only wasted Flash space, of course.

This error was found in the WinAVR_20100110 release and was probably present in earlier releases as well.

Don Kinzer <dkinzer>

 

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

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-05-09 arcanum StatusConfirmed Fixed
        Percent Complete0% 100%
        Assigned toNone arcanum
        Open/ClosedOpen Closed
        Fixed ReleaseNone 1.7.2
    2011-05-05 joerg_wunsch CategoryNone Header
        Item Grouplibc code Header files
    2011-05-05 joerg_wunsch StatusFixed Confirmed
        Fixed Release1.7.1 None
    2011-05-05 joerg_wunsch StatusNone Fixed
        Fixed ReleaseNone 1.7.1

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code