AVR C Runtime Library - Bugs: bug #29964, Possible Incorrect Interrupt...
You are not allowed to post comments on this tracker with your current authentication level.
bug #29964: Possible Incorrect Interrupt Vector Addresses for mega168
Submitter: | Jose Torres <capek> | ||
Submitted: | Wed 26 May 2010 03:40:05 AM UTC | ||
Votes: | 100 | ||
Category: | Header | Severity: | 3 - Normal |
Priority: | 5 - Normal | Item Group: | Header files |
Status: | Invalid | Assigned to: | None |
Percent Complete: | 0% | Open/Closed: | Closed |
Release: | 1.6.7 | Fixed Release: | None |
Wed 26 May 2010 05:17:44 AM UTC, comment #3: |
Joerg Wunsch <joerg_wunsch> |
Wed 26 May 2010 04:36:08 AM UTC, comment #2: Hi Joerg,
|
Jose Torres <capek> |
Wed 26 May 2010 04:10:47 AM UTC, comment #1: What do you think is incorrect? |
Joerg Wunsch <joerg_wunsch> |
Wed 26 May 2010 03:40:05 AM UTC, original submission:
I have been running into an issue using interrupts with avr-libc 1.6.7 and an atmega168.
|
Jose Torres <capek> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2010-05-26 | joerg_wunsch | Status | Need Info | Invalid | |
Open/Closed | Open | Closed | |||
2010-05-26 | joerg_wunsch | Status | None | Need Info | |
2010-05-26 | capek | Carbon-Copy | - | Added capek |
Powered by Savane 3.13-aa77.
Corresponding source code
Hi Jose,
for a simple test, you could just compile and link an empty main(),
and run it through the disassembler. That will show you the vector
table is fine for both devices. Btw., be assured if they weren't, the
Arduino folks would have told us long before. ;-)
_VECTORS_SIZE is part of the story: if you look into gcrt1.S, you'll
notice it determines how many vectors will actually be emitted.
The size logic itself is hidden behind the XJMP macro which comes from
common/macros.inc. It uses the (misnamed) macro _AVR_MEGA_ which is
set by the compiler to determine whether to emit a JMP or RJMP
instruction (which in turn determines the size of a vector table
slot). This should use _AVR_HAVE_JMP_CALL_ instead, but this one is
only available starting with GCC 4.3, and we'd like to be backwards
compatible. We should perhaps check for the GCC version, and then use
wither _AVR_MEGA_ or _AVR_HAVE_JMP_CALL_, depending on the
version, so _AVR_MEGA_ could eventually be retired. Feel free to
submit a patch for this if you like (preferrably, tested against
different compiler versions... ;-).