avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] optimization flags causes problems??


From: Ramazan Kerek
Subject: RE: [avr-gcc-list] optimization flags causes problems??
Date: Fri, 18 Apr 2008 08:37:11 +0300

Thank very much for the detailed answer about EEPROM timing and why
using the lib is better chose.

Best Regards

Ramazan Kerek


-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Joerg Wunsch
Sent: Thursday, April 17, 2008 11:11 PM
To: address@hidden
Subject: Re: [avr-gcc-list] optimization flags causes problems??

Ramazan Kerek <address@hidden> wrote:

> 2-I am using EEPROM_Write/Read functions in my project.  When I
> compile the project with -O0 option, and start dtata transfer to
> EEPROM memory, I do not see any transfer to EEPROM memory.

As you told the compiler to not optimize, the generated code is just
that: not quite optimal.  As such, it's too slow to follow the timing
requirements for an EEPROM write operation.

As others already suggested, if you use the library-provided EEPROM
routines, they'll work with any optimization level.  (This is because
they use hand-tuned inline assembly statements so they are independent
of compiler optimizations within the timing-critical region.)

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list







reply via email to

[Prev in Thread] Current Thread [Next in Thread]