[Top][All Lists]

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

Re: [avr-gcc-list] Compiled code; output Bug or Not?

From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Compiled code; output Bug or Not?
Date: Tue, 14 Jan 2003 11:49:43 +0100 (MET)

Panther Electronics <address@hidden> wrote:

> avr-gcc (GCC) 3.3 20021209 (experimental)


> avr-gcc -c -g -Os -funsigned-char -funsigned-bitfields -fpack-struct 
> -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=MXTPort.lst 
> -mmcu=at90s2313 -I. MXTPort.c -o MXTPort.o

Since you sent me the C file in a private mail, i could try
reproducing this.

Hmm, when i replace the -c by a -S there and omit the -o MXTPort.o,
the generated MXTPort.s contains code for check_pa() that has exactly
one RET instruction.  So sorry, i still don't see where there would be
a problem.

The generated MXTPort.lst seems to agree with this.

The disassembled ELF file (avr-objcopy -d) agrees, too.  However, the
addresses shown don't match the snippet you've been posting (from
AVRstudio?) in any way.  My compiler version is slightly newer
(20030108), but this should not cause such drastical differences

> MXTPort.c: In function `check_pa':
> MXTPort.c:269: warning: assignment makes pointer from integer without a cast

Btw., are you absolutely sure that you want to read an SRAM pointer
directly from an IO port?  This looks a bit suspicious to me.

J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/
avr-gcc-list at http://avr1.org

reply via email to

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