[Top][All Lists]

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

[avr-libc-dev] XMEGA

From: Rob Holbert
Subject: [avr-libc-dev] XMEGA
Date: Mon, 7 Jun 2010 16:41:37 -0400

Learned a tidbit about Xmega development.

Use the fully qualified names when accessing processor registers.

The fully qualified looks like PORTC_OUTSET.

It is also perfectly allowable and compilable to do PORTC.OUTSET as
structures are also defined.

However, there is a major difference.  The fully qualified (PORTC_OUTSET)
has volatile tied to it and
the (PORTC.OUTSET) does not.

This can create a very subtle and time consuming bug to track :-(

It manifests itself somewhere silently in the optimizer. :-(

Use the underscores!

Best regards,

reply via email to

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