[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] GCC Functions
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] GCC Functions |
Date: |
Mon, 3 Dec 2001 11:32:18 +0100 (MET) |
Rich Neswold <address@hidden> wrote:
>> Both versions are supposed to work identically (with the exception
>> that the second one doesn't store demo1.o permanently, of course).
> Actually, the first example links without specifying the MCU type,
> so it is (possibly) getting linked with the wrong crt.o. (What is
> the default MCU type?)
Well spotted, Rich, you win the prize. :-)
% avr-gcc -v -o foo1 foo.o
Reading specs from /usr/local/lib/gcc-lib/avr/3.0.1/specs
Configured with: ./configure --target=avr --prefix=/usr/local i386--freebsd4.4
Thread model: single
gcc version 3.0.1
/usr/local/lib/gcc-lib/avr/3.0.1/../../../../avr/bin/ld -m avr85xx -o foo1
/usr/local/lib/gcc-lib/avr/3.0.1/../../../../avr/lib/crts8515.o
-L/usr/local/lib/gcc-lib/avr/3.0.1
-L/usr/local/lib/gcc-lib/avr/3.0.1/../../../../avr/lib foo.o -lgcc -lc -lgcc
So the default is an AT90S8515. This explains why it doesn't work for
Patrick:
% avr-nm foo1 | fgrep stack
0000025f W __stack
The stack is initialized far beyond what is viable for the AT90S2313.
OK, the '2313 ignores the upper byte of the stack pointer, but then,
this yields a stack below 0x5f which is below the bottom of RAM (the
stack is going to overwrite the memory-mapped hardware registers).
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [avr-gcc-list] GCC Functions,
Joerg Wunsch <=