On 5/10/07, Gavin Jackson [EMAIL PROTECTED] wrote:
Declaring the RAM variable as static would restrict it's scope to the
module (read .c file) in which it's found according to the C standard.
If one of your .c files was changing the variable and you could see
those changes from the other .c file
Steve Franks wrote:
I think I may have finally found my first legitimate bug! Then,
again, maybe not:
It's not a bug, at least not in the compiler!
Anyway, if you have a project with two C/C++ sources, both of which
include the same header, and you have:
static char temp_ee
On Fri, May 11, 2007 at 09:12:58AM +1200, Gavin Jackson wrote:
Steve
Since the .h file is pulled into each .c file, you would end up
with two
declarations for temp_ee, hence the two 0x0A values in your ee.hex
file.
If you remove the static keyword the compiler should complain that you
have
I think I may have finally found my first legitimate bug! Then,
again, maybe not:
Anyway, if you have a project with two C/C++ sources, both of which
include the same header, and you have:
static char temp_ee __attribute__((section (.eeprom))) = 10;
in the header, if you build, you will see
Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Steve Franks
Sent: Friday, 11 May 2007 9:02 a.m.
To: avr-gcc-list@nongnu.org
Subject: [avr-gcc-list] eeprom issue
I think I may have finally found my first legitimate bug! Then,
again, maybe not:
Anyway, if you have
DDI +64 9 978 8757
---
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Steve Franks
Sent: Friday, 11 May 2007 9:02 a.m.
To: avr-gcc-list@nongnu.org
Subject: [avr-gcc-list] eeprom issue
I think I may have finally
PROTECTED] On Behalf
Of Steve Franks
Sent: Friday, 11 May 2007 9:52 a.m.
To: Gavin Jackson
Cc: avr-gcc-list@nongnu.org
Subject: Re: [avr-gcc-list] eeprom issue
Sure seemed to me that when I modified the ram var in one file, I
could read the altered values in the other. I'm not saying it's good