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

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

Re: [avr-gcc-list] code for 90s4433 is using SPH


From: Volkmar Dierkes
Subject: Re: [avr-gcc-list] code for 90s4433 is using SPH
Date: Fri, 21 Feb 2003 00:34:18 +0100
User-agent: 40tude_Dialog/2.0.3.1 Hamster/2.0.0.0

Jörg,

On Thu, 20 Feb 2003 10:39:56 +0100 (MET), Joerg Wunsch wrote:

> Volkmar Dierkes <address@hidden> wrote:
>
>> The 4433 has only a single byte for the stack pointer because of its
>> limited ram. But I am wondered that the generated code is using SPH.
>
> The compiler only distinguishes four different AVR "architectures",
> avr2 through avr5.  Since even the smallest (avr2) has devices with
> more than 256 bytes of RAM, the compiler always generates 16-bit stack
> pointer operations.  Use -mtiny-stack to avoid this.

I tried your hint, but I always get this lines in the disassembler:

 ,---- [ part of output avr-objdump ] 
|  00000512 <main>:
|   512:   cf ed           ldi     r28, 0xDF       ; 223
|   514:   d0 e0           ldi     r29, 0x00       ; 0
|   516:   de bf           out     0x3e, r29       ; 62
|   518:   cd bf           out     0x3d, r28       ; 61
|   51a:   b0 df           rcall   .-160           ; 0x47c
|   51c:   ff cf           rjmp    .-2             ; 0x51c
 `----

It doesn't matter if I include -mtiny-stack or not. My options are:

 ,---- [ make output ] 
|  avr-gcc -c -g -O2 -mtiny-stack -funsigned-char -funsigned-bitfields
|  -fpack-struct -fshort-enums -Wall -Wstrict-prototypes 
|  -Wa,-ahlms=flash.lst -mmcu=at90s4433 -I. flash.c -o flash.o
 `----

Volkmar


reply via email to

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