From: SourceForge.net <no...@so...> - 2010-01-13 01:11:36
|
Bugs item #2009732, was opened at 2008-07-03 07:30 Message generated for change (Comment added) made by arcanum You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=2009732&group_id=68108 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: AVR-LibC Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Willi (wiste) Assigned to: Nobody/Anonymous (nobody) Summary: Accessing EEPROM shows some anomalies Initial Comment: Using the latest WinAVR toolchain 20080610, the genereated binaries show anomalies when accessing odd addresses. E.g.: . . uint8_t byte1 EEMEM; /* even address */ uint8_t byte2 EEMEM; /* odd address */ uint8_t foo_var; . . foo_var = eeprom_read_byte(&byte1); /* works fine */ . . foo_var = eeprom_read_byte(&byte2); /* fails by reseting the µC */ . . Similar functions that access the EEPROM show the same behavior. The same code just works fine and doesn't show this behavior using WinAVR version 20060421. ---------------------------------------------------------------------- Comment By: Eric Weddington (arcanum) Date: 2010-01-12 17:43 Message: This needs to be reported to the avr-libc project at: http://savannah.nongnu.org/bugs/?group=avr-libc This is not a WinAVR bug. The WinAVR User Manual states that any potential bugs in avr-libc (the standard C library for the AVR) must be reported to the avr-libc project and not here. Closed as "Won't Fix". ---------------------------------------------------------------------- Comment By: Nick Kolesnikov (nk2064) Date: 2008-10-07 13:14 Message: I'm have a similar problem : #define EEPROM_SECTION __attribute__ ((section (".eeprom"))) u16 eeprom_magic EEPROM_SECTION = 0x55AA; var uint16_t magic; ... magic=eeprom_read_word(&eeprom_magic); //freeze on first access :( ---------------------------------------------------------------------- Comment By: Willi (wiste) Date: 2008-07-07 13:41 Message: Logged In: YES user_id=2134926 Originator: YES File Added: For Joerg.zip ---------------------------------------------------------------------- Comment By: Willi (wiste) Date: 2008-07-03 09:30 Message: Logged In: YES user_id=2134926 Originator: YES I'm compiling for the mega 128. -mmcu=atmega128 Further I attached the whole make file output. -------- begin -------- avr-gcc (WinAVR 20080610) 4.3.0 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Size before: AVR Memory Usage ---------------- Device: atmega128 Program: 10258 bytes (7.8% Full) (.text + .data + .bootloader) Data: 706 bytes (17.2% Full) (.data + .bss + .noinit) EEPROM: 71 bytes (1.7% Full) (.eeprom) Compiling C: RS1Tuele.c avr-gcc -c -mmcu=atmega128 -I. -gdwarf-2 -DF_CPU=7372800UL -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=./RS1Tuele.lst -std=gnu99 -Wundef -MMD -MP -MF .dep/RS1Tuele.o.d RS1Tuele.c -o RS1Tuele.o Linking: RS1Tuele.elf avr-gcc -mmcu=atmega128 -I. -gdwarf-2 -DF_CPU=7372800UL -O0 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=RS1Tuele.o -std=gnu99 -Wundef -MMD -MP -MF .dep/RS1Tuele.elf.d RS1Tuele.o --output RS1Tuele.elf -Wl,-Map=RS1Tuele.map,--cref -Wl,-u,vfprintf -lprintf_flt -lm Creating load file for Flash: RS1Tuele.hex avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock RS1Tuele.elf RS1Tuele.hex Creating load file for EEPROM: RS1Tuele.eep avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \ --change-section-lma .eeprom=0 --no-change-warnings -O ihex RS1Tuele.elf RS1Tuele.eep || exit 0 Creating Extended Listing: RS1Tuele.lss avr-objdump -h -S -z RS1Tuele.elf > RS1Tuele.lss Creating Symbol Table: RS1Tuele.sym avr-nm -n RS1Tuele.elf > RS1Tuele.sym Size after: AVR Memory Usage ---------------- Device: atmega128 Program: 10258 bytes (7.8% Full) (.text + .data + .bootloader) Data: 706 bytes (17.2% Full) (.data + .bss + .noinit) EEPROM: 71 bytes (1.7% Full) (.eeprom) srec_cat RS1Tuele.hex -Intel -Output RS1Tuele.srec -Motorola -Line_Length 142 -------- end -------- ---------------------------------------------------------------------- Comment By: Joerg Wunsch (joerg_wunsch) Date: 2008-07-03 08:00 Message: Logged In: YES user_id=1097648 Originator: NO Please indicate which controller (-mmcu option) you are compiling for. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=2009732&group_id=68108 |