[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: Panther Electronics
Subject: Re: [avr-gcc-list] Compiled code; output Bug or Not?
Date: Wed, 15 Jan 2003 11:26:42 +0530

Thanks for checking it out,

I learn a few thing's from this, i must devote time on the "makefile". any good 
URL where i can learn from? other than GCC or AVR freaks these are only for 
those who understand Linux & C.

also i would like some pointers with examples of using ASM. with the constrains 
put by GCC?

yes, the listing posted was from a reduced source file. 

I would like the list to bear with my stupid and dumb questions cause, i come 
from ASM and VB background and a "Bird in Water" when it comes to C

thanks in advance 

Srikanth Kamath T

On Tue, 14 Jan 2003 11:49:43 +0100 (MET), Joerg Wunsch wrote:
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

avr-gcc-list at http://avr1.org

reply via email to

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