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

2009-04-06 Thread Weddington, Eric
-Original Message- From: avr-gcc-list-bounces+eric.weddington=atmel@nongnu.org [mailto:avr-gcc-list-bounces+eric.weddington=atmel@nongnu. org] On Behalf Of sjuid-...@yahoo.com Sent: Sunday, April 05, 2009 2:30 PM To: avr-gcc-list@nongnu.org Subject: [avr-gcc-list] when

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

2009-04-06 Thread John Regehr
It's not safe at all. The 3290P has 2K of RAM which gets used for static variables, stack space and heap (if you use dynamic memory allocation). -mtiny-stack will cause the compiler to only change the lowest 8-bits of the stack, which means that you effectively only have a 255 byte stack. Can

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

2009-04-06 Thread Anatoly Sokolov
Hi. Are there any caveats to the use of this option? How would one know if it is safe to use for a given code base? The -mtiny-stack may (and should) be used only for devices with 0xFF max RAM adderss, i.e. if SP register is 8-bit. All devices with 1KB and 2KB FLASH memory satisfy this

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

2009-04-06 Thread John Regehr
On Tue, 7 Apr 2009, Anatoly Sokolov wrote: The -mtiny-stack may (and should) be used only for devices with 0xFF max RAM adderss, i.e. if SP register is 8-bit. All devices with 1KB and 2KB FLASH memory satisfy this condition, now. Is it not sufficient for the maximum extent of the stack to be

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

2009-04-06 Thread Parthasaradhi Nayani
The -mtiny-stack may (and should) be used only for devices with 0xFF max RAM adderss, i.e. if SP register is 8-bit. All devices with 1KB and 2KB FLASH memory satisfy this condition, now. Hello all, If the memory size itself is 256 Bytes, naturally SP will be 8 bits and where is the need to

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

2009-04-06 Thread Joerg Wunsch
John Regehr reg...@cs.utah.edu 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)