On Fri, Mar 20, 2009 at 3:08 PM, Matthias Hartmann <
[email protected]> wrote:
> Hi Roberto, hi Sergey,
>
> the problem resides in msp430x54xx.h
> and was introduced by the last change in CVS.
> e.g. these linses
> #define SFRRPCR_H_ (SFRRPCR_+1)
> sfrb(SFRRPCR_H, SFRRPCR_H_);
> are expanded by the preprocessor to:
> volatile unsigned char SFRRPCR_H asm("(0x0104+1)");
> which is invalid for the assembler.
>
> The lines:
> 50: #define SFRIE1_H_ (SFRIE1_+1)
> 67: #define SFRIFG1_H_ (SFRIFG1_+1)
> 85: #define SFRRPCR_H_ (SFRRPCR_+1)
> should be changed to
> 50: #define SFRIE1_H_ SFRIE1_ + 0x01
> 67: #define SFRIFG1_H_ SFRIFG1_ + 0x01
> 85: #define SFRRPCR_H_ SFRRPCR_ + 0x01
>
I see how it becomes a problem, but enclosing the preprocessor expressions
in parenteses is a standard practice, because otherwise you fall into
SFRIE1_H * 6
expanding into SFRIE1_ + 0x01 * 6, which is not what one would intend.
Is it possible to change the asm() directive so that it contains a fuller
expression
which allows parentesized subexpressions?