I am having a problem with a WINAVR 20040720 generated DWARF-2 .elf file using AVR Studio 4.10 build 356. I’ve stripped my ATMEG8 program down to a “bare” minimum that still exhibits the problem:
#include#include #include typedef struct { uint16_t strikeValue; uint8_t displayValue; uint8_t highWaterValue; } lookupTableEntry_t; volatile uint8_t timerOverflow; volatile uint8_t led9OnCount; volatile uint16_t strikeCount; lookupTableEntry_t lookupTable[ ] = { { 1, 2, 3 }, { 4, 5, 6 } }; SIGNAL( SIG_INTERRUPT0 ) { if ( strikeCount < 0x2800 ) strikeCount++; led9OnCount = 2; } SIGNAL( SIG_OVERFLOW1 ) { TCNT1 = -200; timerOverflow = 0xFF; } int main( void ) { return 1; }
The AVR Simulator does not load the lookupTable array/structure correctly. When I display Data Memory, it shows the following:
000060 01 00 02 03 04 00 32 00 00 00 00 00 FF FF FF FF
The highlighted bytes are incorrect.
It works okay if I build an Extended COFF module. Data Memory is displayed as follows:
000060 01 00 02 03 04 00 05 06 00 00 00 00 FF FF FF FF
Note: The updated DLL files from parserdll.zip don’t make any difference.
Don