Good afternoon,
I am trying to implement bit field manipulation for P8OUT peripheral register (address 0x0263) in Code Composer Studio for MSP430F5438A, just like IAR does, but it results in a "undefined first referece" linking error.
I created the following line on hand on the linking command file:
P8OUT_bit : origin = 0x0263, length = 0x0001
And in the C-source code:
----
extern volatile struct {
unsigned char P8OUT0 : 1; unsigned char P8OUT1 : 1; unsigned char P8OUT2 : 1; unsigned char P8OUT3 : 1; unsigned char P8OUT4 : 1; unsigned char P8OUT5 : 1; unsigned char P8OUT6 : 1; unsigned char P8OUT7 : 1;
} P8OUT_bit;
#define DB0 P8OUT_bit.P8OUT3
----
Adding DB0=0; or DB0=1; in the application code results in the linking error that has been mentioned above.
Any information will be of great value. I thank you very much in advance.
Best regards, Rafael Wagner.
----