Hi all,
What does the following warning mean?
warning: comparison is always true due to limited range of data type
Here is the context:
I have a AVR I'm trying to connect to a DS1307 RTC chip via TWI.
To check the integrity of the DS1307 internal ram, I plan to write 4 bytes,
--- Royce Pereira [EMAIL PROTECTED] wrote:
What does the following warning mean?
warning: comparison is always true due to limited
range of data type
It means the if will always happen.
#define CHK_1307 0x55
uint8 twi_read(void)
if(twi_read() != ~CHK_1307) ok= 0;
CHK_1307
On Tue, Oct 02, 2007 at 11:25:30PM -0700, Dave N6NZ wrote:
#define CHK_1307 0x55
if(twi_read() != ~CHK_1307) ok= 0;
// ^^
//The offending line.
I believe what is going on is the C standard requires promotion to int,
and that bites (bytes?) you :)
The result of
Hi,
On Wed, 03 Oct 2007 19:57:54 +0530, David Kelly [EMAIL PROTECTED] wrote:
On Tue, Oct 02, 2007 at 11:25:30PM -0700, Dave N6NZ wrote:
#define CHK_13070x55
if(twi_read() != ~CHK_1307) ok= 0;
// ^^
//The offending line.
I believe what is going on is the C standard
Can anyone tell me what I'm doing wrong? I'm creating
a .hex file with avr-objcopy.exe (like I've always
done in the past), but one of my sections is
disappearing.
From cygwin, I can type:
$ avr-objdump.exe -V
GNU objdump 2.17 + coff-avr-patch (20050630)
Copyright 2005 Free Software Foundation,
--- Gre7g Luterman [EMAIL PROTECTED] wrote:
$ avr-objcopy.exe -j .update RIO-15C/temp1.elf
temp.hex
BFD: RIO-15C/temp1.elf: warning: Empty loadable
segment detected, is this intentional ?
snipped
Sorry, I neglected to specify the file format:
$ avr-objcopy.exe -O ihex -j .update
On Wed, Oct 03, 2007 at 01:24:35PM -0700, Gre7g Luterman wrote:
The .update section is still missing, but at least
there's no error messages.
What does avr-objdump -h say about .update?
The linker script snippet for .update would be useful too.
While I haven't updated to the latest binutils