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

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

Re: [avr-gcc-list] when is it safe to use -mtiny-stack


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] when is it safe to use -mtiny-stack
Date: Tue, 7 Apr 2009 06:19:31 +0200 (MET DST)

John Regehr <address@hidden> wrote:

> Is it not sufficient for the maximum extent of the stack to be 256
> bytes?

Only if the stack starts at a 0xXXFF address.  As RAMEND on the
ATmega3290 is equal 0x8FF, this is by default the case on that MCU
type.  Other MCU types (in particular older AVRs) have a RAMEND of
e.g. 0x25F.  In that case, the stack could only extend to 0x60 bytes
before changing SPH were due.  (Alternatively, the stack could be
relocated to a lower address, e.g. 0x1FF.)

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)




reply via email to

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