avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Problem with interrupt handler?


From: Chris Baugher
Subject: Re: [avr-gcc-list] Problem with interrupt handler?
Date: Fri, 19 Oct 2001 10:46:49 -0500 (CDT)

On Fri, 19 Oct 2001, Clemens Gerlach wrote:

> On Fri, Oct 19, 2001 at 02:54:19AM -0500, Chris Baugher wrote:
> > 
> > fluke:~/dro$ make
> > avr-gcc  -mmcu=at90s2313 -O2 -Wall -S -Wstrict-prototypes \
> > -I/usr/local/avr/include -c dro.c
> > dro.c:55: warning: return type of `main' is not `int'
> > avr-as -gstabs -mmcu=at90s2313 -ahlms=dro.lst dro.s -o dro.o \
> > -I/usr/local/avr/lib/
> > avr-ld  -Map dro.map -o dro dro.o
> > avr-objcopy -g --output-target=ihex dro dro.ihex
> > fluke:~/dro$
> > 
> > 
> > Does this look reasonable?
> 
> you do not link the startup code (crts2313.o). the interrupt jump table and
> other setup code (e.g stack initialisation) is located there.
> 
> simply use avr-gcc to link your object files (e.g.):
> 
> avr-gcc -mmcu=at90s4433 -Wall -O9 -o flow.o -c flow.c    # no -S here
> avr-gcc -mmcu=at90s4433 -Wall -O9 -o main.elf flow.o     # use to call linker
>                                                          # also links runtime 
> code
> avr-objcopy -O srec main.elf main.srec                   # maybe change to 
> ihex

Hmm, yes I see. Apparently when avr-gcc calls the assembler and linker it
passes more options than I thought. Great, fixed. All is well, at least
until I do something else dumb.

Thanks!

C|

> 
> 
> your milage may vary.
> 
> clemens
> 
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list
> 





reply via email to

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