[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] stumped by my ATmega48 (again)
From: |
David Breeze |
Subject: |
Re: [avr-gcc-list] stumped by my ATmega48 (again) |
Date: |
Fri, 05 Oct 2007 15:31:16 +0100 |
Your loop is almost certainly optimsed out of existence.
try
volatile int x;
>>> <address@hidden> 05 October 2007 15:23 >>>
On Oct 05, 2007, at 12:14 UTC, David Kelly wrote:
> When you return the CPU goes thru a crash reset, or something like
> that, I haven't traced the code.
>
> Do something like this ...
OK, I tried this:
int main() {
DDRB = 0xff;
DDRC = 0x7f;
DDRD = 0xff;
PORTB = 0xFF;
PORTC = 0x7F;
PORTD = 0xFF;
int x;
while (1) {
x++;
}
return 0;
}
..hoping that the busywork of incrementing x would keep the compiler
from stripping away the empty loop. But the output still doesn't go
high.
Thanks,
- Joe
--
Joe Strout -- address@hidden
Strout Custom Solutions, LLC
_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed. If
an addressing or transmission error has misdirected
this e-mail, please notify the author by replying to this e-mail. If you are
not the intended recipient you must not use, disclose, copy, print or rely on
this e-mail.
Joy Mining Machinery Limited/P&H Minepro Services aims to prevent the
propagation of viruses, but cannot guarantee that this email is virus free.
You are advised to scan all attachments and open them at your own risk.
Joy Mining Machinery Limited/P&H Minepro Services may monitor outgoing and
incoming e-mails and other telecommunications on its e-mail and
telecommunication systems.
-Privacy - UK-
- Re: [avr-gcc-list] stumped by my ATmega48 (again), (continued)
- Re: [avr-gcc-list] stumped by my ATmega48 (again), Blake Leverett, 2007/10/05
- Re: [avr-gcc-list] stumped by my ATmega48 (again), David Kelly, 2007/10/05
- Re: [avr-gcc-list] stumped by my ATmega48 (again), Blake Leverett, 2007/10/05
- Re: [avr-gcc-list] stumped by my ATmega48 (again), joe, 2007/10/05
- Re: [avr-gcc-list] stumped by my ATmega48 (again),
David Breeze <=
- RE: [avr-gcc-list] stumped by my ATmega48 (again), Gavin Jackson, 2007/10/08