This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

头文件中对寄存器的定义问题

Other Parts Discussed in Thread: MSP430G2210

IAR中对WDTCTL寄存器的定义如下
#define __MSP430_HAS_WDT__ /* Definition to show that Module is available */

#define WDTCTL_ (0x0120u) /* Watchdog Timer Control */
DEFW( WDTCTL , WDTCTL_)

CCS 中的头文件中有如下语句:
第一段
#define __MSP430_HAS_WDT__ /* Definition to show that Module is available */

SFR_16BIT(WDTCTL); /* Watchdog Timer Control */SFR_16BIT(WDTCTL)是对WDTCTL的定义??


第二段:对SFR_16BIT的定义

#define SFR_16BIT(address) extern volatile unsigned int address


第一种定义应理解为WDTCTL寄存器对应的地址是(0x0120u),第二种定义就没有地址信息,那么CCS在编译的时候是如何找到这个地址的?