avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] What is the best method of avr6 preprocessing?


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] What is the best method of avr6 preprocessing?
Date: Mon, 24 Mar 2008 22:52:00 +0100
User-agent: Mutt/1.5.11

As Dmitry K. wrote:

> Is the __AVR_3_BYTE_PC__ macro the best for this purpose?

That should probably be only applied in situations where you are
interested in knowing how many bytes have been pushed onto the stack
by a CALL instruction.

> I have find 2 another methods in Avr-libc:
> a) if (__AVR_ARCH__ == 6)

That will just cover the ATmega2560/2561 devices.  There might be more
devices with 3-byte PC in future.  Well, not even future anymore...
Eric just committed the first Xmega support a few hours ago.  I didn't
look into the changes, but I'm almost sure Xmega support will involve
devices with a 3-byte PC in future that don't belong to avr6.

> b) if defined(EIND)

That should only be used if your code would access EIND if it is
present.

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