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

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

Re: [avr-gcc-list] Fixed Registers -ffixed


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Fixed Registers -ffixed
Date: Sat, 19 Aug 2006 08:24:40 +0200 (MET DST)

Ram Kumar Rengaswamy <address@hidden> wrote:

> When I try to compile my application with the option -ffixed-r2 and
> -ffixed-r3, I get the following error:

> error: can't find a register in class `BASE_POINTER_REGS' while
> reloading `asm'

Sounds like a (benign) GCC but to me.

> Is there a work around to this problem or is it a limitation of the
> compiler ?

Declare the variables the usual way inside your C program:

uint16_t reserved asm("r2");

Make sure all your C compilation unit see a consistent declaration of
this.

> Is there any particular set of registers that are better suited to
> be fixed than others ?

Walking from r2 up to at most r15 is a good idea.  r0 and r1 are
needed internally by AVR-GCC, and must not be reused.

-- 
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]