Hi,
If I first see a definition in header file as
extern volatile unsigned char P2SEL; /* Port 2 Selection */
for which the true definition of unsigned char variable P2SEL remains undefined throughout all project files.
but in the end of liner.cmd file, we saw it links to another .cmd file by
-l msp430x22x4.cmd
and the linked .cmd file contains “P2SEL” in the following form:
/************************************************************
* DIGITAL I/O Port1/2 Pull up / Pull down Resistors
************************************************************/
P2OUT = 0x0029;
P2DIR = 0x002A;
P2IFG = 0x002B;
P2IES = 0x002C;
P2IE = 0x002D;
P2SEL = 0x002E;
P2REN = 0x002F;
along with others. In this situation how does the compiler actually treat P2SEL in the .cmd file? And would it be regarded as a constant definition, an ordinary variable of type unsigned char, or an address or pointer?
Matt