Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

RE: [AVR-Chat] TWI not working when optimization is on

2013-08-08 by Chuck Hackett

> From: John Samperi
> 
> At 11:29 AM 8/08/2013, you wrote:
> >The failure occurs when "-O" is used AND the EEPROM is not present ...
> 
> As a matter of interest how did you manage to get just the -O option to be
> generated? Are you using a manual makefile?

I use the "Code::Blocks" development environment and it can (as an option)
pass the "-O" to gcc.  It can also pass the "-O1" which, as I read the
manual, is the same as "-O".

BTW: I just tried "-Os" and I get the same failure ...

I have not tried forcing the WTI LED controller to not answer (it's an SMT
part on the same board as the ATMega1284p) but I assume I would get the same
results.

Have you ever tried your "-Os" optimized code to communicate with a TWI
device that was not present and recover?  (as opposed to "any error => give
up")
 
Cheers,

Chuck Hackett
"Good judgment comes from experience, experience comes from bad judgment"
7.5" gauge Union Pacific Northern (4-8-4) 844
http://www.whitetrout.net/Chuck

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.