由于国庆节假期,帖子审批以及工程师回复将会有所延迟,敬请谅解

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.

MSP430F5529头文件的不解?

Other Parts Discussed in Thread: MSP430G2553, MSP430F5529, MSP430G2533, MSP430F1101, MSP430F1101A, MSP430F1111A, MSP430F112, MSP430F1121, MSP430F1121A, MSP430F1122, MSP430F1132, MSP430F122, MSP430F1222, MSP430F123, MSP430F1232, MSP430F133, MSP430F135, MSP430F147, MSP430F148, MSP430F149, MSP430F1471, MSP430F1481, MSP430F1491, MSP430F155, MSP430F156, MSP430F157, MSP430F167, MSP430F168, MSP430F169, MSP430F1610, MSP430F1611, MSP430F1612, MSP430F2001, MSP430F2011, MSP430F2002, MSP430F2012, MSP430F2003, MSP430F2013, MSP430F2101, MSP430F2111, MSP430F2121, MSP430F2131, MSP430F2112, MSP430F2122, MSP430F2132, MSP430F2232, MSP430F2252, MSP430F2272, MSP430F2234, MSP430F2254, MSP430F2274, MSP430F2330, MSP430F2350, MSP430F2370, MSP430F233, MSP430F235, MSP430F247, MSP430F248, MSP430F249, MSP430F2410, MSP430F2471, MSP430F2481, MSP430F2491, MSP430F2416, MSP430F2417, MSP430F2418, MSP430F2419, MSP430F2616, MSP430F2617, MSP430F2618, MSP430F2619, MSP430F412, MSP430F413, MSP430F415, MSP430F417, MSP430F4132, MSP430F4152, MSP430F423, MSP430F425, MSP430F427, MSP430F423A, MSP430F425A, MSP430F427A, MSP430F435, MSP430F436, MSP430F437, MSP430F4351, MSP430F4361, MSP430F4371, MSP430F4481, MSP430F4491, MSP430F447, MSP430F448, MSP430F449, MSP430FE423, MSP430FE425, MSP430FE427, MSP430FE423A, MSP430FE425A, MSP430FE427A, MSP430FE4232, MSP430FE4242, MSP430FE4252, MSP430FE4272, MSP430F4783, MSP430F4793, MSP430F4784, MSP430F4794, MSP430F47126, MSP430F47127, MSP430F47163, MSP430F47173, MSP430F47183, MSP430F47193, MSP430F47166, MSP430F47176, MSP430F47186, MSP430F47196, MSP430F47167, MSP430F47177, MSP430F47187, MSP430F47197, MSP430F4250, MSP430F4260, MSP430F4270, MSP430FG4250, MSP430FG4260, MSP430FG4270, MSP430FW423, MSP430FW425, MSP430FW427, MSP430FW428, MSP430FW429, MSP430FG437, MSP430FG438, MSP430FG439, MSP430F438, MSP430F439, MSP430F477, MSP430F478, MSP430F479, MSP430FG477, MSP430FG478, MSP430FG479, MSP430F46161, MSP430F46171, MSP430F46181, MSP430F46191, MSP430F4616, MSP430F4617, MSP430F4618, MSP430F4619, MSP430FG4616, MSP430FG4617, MSP430FG4618, MSP430FG4619, MSP430F5418, MSP430F5419, MSP430F5435, MSP430F5436, MSP430F5437, MSP430F5438, MSP430F5418A, MSP430F5419A, MSP430F5435A, MSP430F5436A, MSP430F5437A, MSP430F5438A, MSP430F5212, MSP430F5214, MSP430F5217, MSP430F5219, MSP430F5222, MSP430F5224, MSP430F5229, MSP430F5304, MSP430F5308, MSP430F5309, MSP430F5310, MSP430F5340, MSP430F5341, MSP430F5342, MSP430F5324, MSP430F5325, MSP430F5326, MSP430F5327, MSP430F5328, MSP430F5329, MSP430F5500, MSP430F5501, MSP430F5502, MSP430F5503, MSP430F5504, MSP430F5505, MSP430F5506, MSP430F5507, MSP430F5508, MSP430F5509, MSP430F5510, MSP430F5513, MSP430F5514, MSP430F5515, MSP430F5517, MSP430F5519, MSP430F5521, MSP430F5522, MSP430F5524, MSP430F5525, MSP430F5526, MSP430F5527, MSP430F5528, CC430F5133, CC430F5135, CC430F5137, CC430F6125, CC430F6126, CC430F6127, CC430F6135, CC430F6137, CC430F5123, CC430F5125, CC430F5143, CC430F5145, CC430F5147, CC430F6147, MSP430F5333, MSP430F5335, MSP430F5336, MSP430F5338, MSP430F5630, MSP430F5631, MSP430F5632, MSP430F5633, MSP430F5634, MSP430F5635, MSP430F5636, MSP430F5637, MSP430F5638, MSP430F6433, MSP430F6435, MSP430F6436, MSP430F6438, MSP430F6630, MSP430F6631, MSP430F6632, MSP430F6633, MSP430F6634, MSP430F6635, MSP430F6636, MSP430F6637, MSP430F6638, MSP430F5358, MSP430F5359, MSP430F5658, MSP430F5659, MSP430F6458, MSP430F6459, MSP430F6658, MSP430F6659, MSP430L092, MSP430F5131, MSP430F5151, MSP430F5171, MSP430F5132, MSP430F5152, MSP430F5172, MSP430F6720, MSP430F6721, MSP430F6723, MSP430F6724, MSP430F6725, MSP430F6726, MSP430F6730, MSP430F6731, MSP430F6733, MSP430F6734, MSP430F6735, MSP430F6736, MSP430F67451, MSP430F67651, MSP430F67751, MSP430F67461, MSP430F67661, MSP430F67761, MSP430F67471, MSP430F67671, MSP430F67771, MSP430F67481, MSP430F67681, MSP430F67781, MSP430F67491, MSP430F67691, MSP430F67791, MSP430F6745, MSP430F6765, MSP430F6775, MSP430F6746, MSP430F6766, MSP430F6776, MSP430F6747, MSP430F6767, MSP430F6777, MSP430F6748, MSP430F6768, MSP430F6778, MSP430F6749, MSP430F6769, MSP430F6779, MSP430FR5720, MSP430FR5721, MSP430FR5722, MSP430FR5723, MSP430FR5724, MSP430FR5725, MSP430FR5726, MSP430FR5727, MSP430FR5728, MSP430FR5729, MSP430FR5730, MSP430FR5731, MSP430FR5732, MSP430FR5733, MSP430FR5734, MSP430FR5735, MSP430FR5736, MSP430FR5737, MSP430FR5738, MSP430FR5739, MSP430G2211, MSP430G2201, MSP430G2111, MSP430G2101, MSP430G2001, MSP430G2231, MSP430G2221, MSP430G2131, MSP430G2121, MSP430AFE221, MSP430AFE231, MSP430AFE251, MSP430AFE222, MSP430AFE232, MSP430AFE252, MSP430AFE223, MSP430AFE233, MSP430AFE253, MSP430G2102, MSP430G2202, MSP430G2302, MSP430G2402, MSP430G2132, MSP430G2232, MSP430G2332, MSP430G2432, MSP430G2112, MSP430G2212, MSP430G2312, MSP430G2412, MSP430G2152, MSP430G2252, MSP430G2352, MSP430G2452, MSP430G2213, MSP430G2313, MSP430G2413, MSP430G2513, MSP430G2153, MSP430G2253, MSP430G2353, MSP430G2453, MSP430G2203, MSP430G2303, MSP430G2403, MSP430G2233, MSP430G2333, MSP430G2433, MSP430G2230, MSP430G2210, MSP430BT5190, MSP430FR5949, MSP430FR5969, MSP-EXP430F5529

     硬件条件是SEED-EXP430F5529 V1,.0  程序如下:

#include <msp430.h>

int main(void)
{
  volatile unsigned int i;

  WDTCTL = WDTPW+WDTHOLD;                   // Stop WDT
  P1DIR |= BIT0;                            // P1.0 set as output

  while(1)                                  // continuous loop
  {
    P1OUT ^= BIT0;                          // XOR P1.0
    for(i=50000;i>0;i--);                   // Delay
  }
}

问题:观察这段程序,很明显是P1DIR是寄存器,既然是寄存器就应该有物理地址,当我打开头文件的时候却并未发现,只是发现以下两条信息:

SFR_8BIT(PADIR_L);                            /* Port A Direction */       1504行

#define P1DIR                  (PADIR_L)      /* Port 1 Direction */    1530行  在CC35.3下观察

就在无发现其它有用的信息。按我的理解头文件不应该是按照如下书写嘛?

SFR_8BIT (PADIR_L)=0X020004 ;                            /* Port A Direction */    

#define P1DIR                  (PADIR_L)      /* Port 1 Direction */  

这样才指向了PI的寄存器吧?

物理地址来源于:

      

 

 

追问关于volatile是什么意思,这类的定义可以在那里看到呢?谢谢

 

  • xiaolu liao1,其中关于头文件zho中的 SFR_8BIT(PADIR_L); 应该按照头文件开头的,

    /* External references resolved by a device-specific linker command file */
    #define SFR_8BIT(address) extern volatile unsigned char address

    来解析,应该对应为:

    SFR_8BIT(PADIR_L)   extern volatile unsigned char PADIR_L

    而关于PADIR_L,如果你使用的是CCS的话,其实在.cmd 文件中有一句 (此处以msp430g2553为例)

    /****************************************************************************/
    /* INCLUDE PERIPHERALS MEMORY MAP */
    /****************************************************************************/

    -l msp430g2553.cmd

    故各个寄存器的地址指明其实是在msp430g2553.cmd文件中,在安装路径,

    C:\ti\CCS5_3_0\ccsv5\ccs_base\msp430\include

    下可以找到。

    下面是msp430g2553.cmd的内容,你可以找找msp430f5529的。

    /******************************************************************************/
    /* msp430g2533.cmd */
    /* - Linker Command File for defintions in the header file */
    /* Please do not change ! */
    /* */
    /******************************************************************************/


    /************************************************************
    * STANDARD BITS
    ************************************************************/
    /************************************************************
    * STATUS REGISTER BITS
    ************************************************************/
    /************************************************************
    * PERIPHERAL FILE MAP
    ************************************************************/
    /************************************************************
    * SPECIAL FUNCTION REGISTER ADDRESSES + CONTROL BITS
    ************************************************************/
    IE1 = 0x0000;
    IFG1 = 0x0002;
    IE2 = 0x0001;
    IFG2 = 0x0003;
    /************************************************************
    * ADC10
    ************************************************************/
    ADC10DTC0 = 0x0048;
    ADC10DTC1 = 0x0049;
    ADC10AE0 = 0x004A;
    ADC10CTL0 = 0x01B0;
    ADC10CTL1 = 0x01B2;
    ADC10MEM = 0x01B4;
    ADC10SA = 0x01BC;
    /************************************************************
    * Basic Clock Module
    ************************************************************/
    DCOCTL = 0x0056;
    BCSCTL1 = 0x0057;
    BCSCTL2 = 0x0058;
    BCSCTL3 = 0x0053;
    /*************************************************************
    * Flash Memory
    *************************************************************/
    FCTL1 = 0x0128;
    FCTL2 = 0x012A;
    FCTL3 = 0x012C;
    /************************************************************
    * DIGITAL I/O Port1/2 Pull up / Pull down Resistors
    ************************************************************/
    P1IN = 0x0020;
    P1OUT = 0x0021;
    P1DIR = 0x0022;
    P1IFG = 0x0023;
    P1IES = 0x0024;
    P1IE = 0x0025;
    P1SEL = 0x0026;
    P1SEL2 = 0x0041;
    P1REN = 0x0027;
    P2IN = 0x0028;
    P2OUT = 0x0029;
    P2DIR = 0x002A;
    P2IFG = 0x002B;
    P2IES = 0x002C;
    P2IE = 0x002D;
    P2SEL = 0x002E;
    P2SEL2 = 0x0042;
    P2REN = 0x002F;
    /************************************************************
    * DIGITAL I/O Port3 Pull up / Pull down Resistors
    ************************************************************/
    P3IN = 0x0018;
    P3OUT = 0x0019;
    P3DIR = 0x001A;
    P3SEL = 0x001B;
    P3SEL2 = 0x0043;
    P3REN = 0x0010;
    /************************************************************
    * Timer0_A3
    ************************************************************/
    TA0IV = 0x012E;
    TA0CTL = 0x0160;
    TA0CCTL0 = 0x0162;
    TA0CCTL1 = 0x0164;
    TA0CCTL2 = 0x0166;
    TA0R = 0x0170;
    TA0CCR0 = 0x0172;
    TA0CCR1 = 0x0174;
    TA0CCR2 = 0x0176;
    /************************************************************
    * Timer1_A3
    ************************************************************/
    TA1IV = 0x011E;
    TA1CTL = 0x0180;
    TA1CCTL0 = 0x0182;
    TA1CCTL1 = 0x0184;
    TA1CCTL2 = 0x0186;
    TA1R = 0x0190;
    TA1CCR0 = 0x0192;
    TA1CCR1 = 0x0194;
    TA1CCR2 = 0x0196;
    /************************************************************
    * USCI
    ************************************************************/
    UCA0CTL0 = 0x0060;
    UCA0CTL1 = 0x0061;
    UCA0BR0 = 0x0062;
    UCA0BR1 = 0x0063;
    UCA0MCTL = 0x0064;
    UCA0STAT = 0x0065;
    UCA0RXBUF = 0x0066;
    UCA0TXBUF = 0x0067;
    UCA0ABCTL = 0x005D;
    UCA0IRTCTL = 0x005E;
    UCA0IRRCTL = 0x005F;
    UCB0CTL0 = 0x0068;
    UCB0CTL1 = 0x0069;
    UCB0BR0 = 0x006A;
    UCB0BR1 = 0x006B;
    UCB0I2CIE = 0x006C;
    UCB0STAT = 0x006D;
    UCB0RXBUF = 0x006E;
    UCB0TXBUF = 0x006F;
    UCB0I2COA = 0x0118;
    UCB0I2CSA = 0x011A;
    /************************************************************
    * WATCHDOG TIMER
    ************************************************************/
    WDTCTL = 0x0120;
    /************************************************************
    * Calibration Data in Info Mem
    ************************************************************/
    CALDCO_16MHZ = 0x10F8;
    CALBC1_16MHZ = 0x10F9;
    CALDCO_12MHZ = 0x10FA;
    CALBC1_12MHZ = 0x10FB;
    CALDCO_8MHZ = 0x10FC;
    CALBC1_8MHZ = 0x10FD;
    CALDCO_1MHZ = 0x10FE;
    CALBC1_1MHZ = 0x10FF;
    /************************************************************
    * Interrupt Vectors (offset from 0xFFE0)
    ************************************************************/
    /************************************************************
    * End of Modules
    ************************************************************/

  • 另外,关于volatile关键字, volatile其实是提醒编译器它后面所定义的变量随时都有可能改变,因此编译后的程序每次需要存储或读取这个变量的时候,都会直接从变量地址中读取数据。如果没有volatile关键字,则编译器可能优化读取和存储,可能暂时使用寄存器中的值,如果这个变量由别的程序更新了的话,将出现不一致的现象。

    目前你的程序中,i属于main函数的变量,应该存放于stack中。你可以连接仿真器查看变量的地址。

  • /******************************************************************************/
    /* lnk_msp430f5529.cmd - LINKER COMMAND FILE FOR LINKING MSP430F5529 PROGRAMS     */
    /*                                                                            */
    /*   Usage:  lnk430 <obj files...>    -o <out file> -m <map file> lnk.cmd     */
    /*           cl430  <src files...> -z -o <out file> -m <map file> lnk.cmd     */
    /*                                                                            */
    /*----------------------------------------------------------------------------*/
    /* These linker options are for command line linking only.  For IDE linking,  */
    /* you should set your linker options in Project Properties                   */
    /* -c                                               LINK USING C CONVENTIONS  */
    /* -stack  0x0100                                   SOFTWARE STACK SIZE       */
    /* -heap   0x0100                                   HEAP AREA SIZE            */
    /*                                                                            */
    /*----------------------------------------------------------------------------*/


    /****************************************************************************/
    /* SPECIFY THE SYSTEM MEMORY MAP                                            */
    /****************************************************************************/

    MEMORY
    {
        SFR                     : origin = 0x0000, length = 0x0010
        PERIPHERALS_8BIT        : origin = 0x0010, length = 0x00F0
        PERIPHERALS_16BIT       : origin = 0x0100, length = 0x0100
        RAM                     : origin = 0x2400, length = 0x2000
        USBRAM                  : origin = 0x1C00, length = 0x0800
        INFOA                   : origin = 0x1980, length = 0x0080
        INFOB                   : origin = 0x1900, length = 0x0080
        INFOC                   : origin = 0x1880, length = 0x0080
        INFOD                   : origin = 0x1800, length = 0x0080
        FLASH                   : origin = 0x4400, length = 0xBB80
        FLASH2                  : origin = 0x10000,length = 0x14400
        INT00                   : origin = 0xFF80, length = 0x0002
        INT01                   : origin = 0xFF82, length = 0x0002
        INT02                   : origin = 0xFF84, length = 0x0002
        INT03                   : origin = 0xFF86, length = 0x0002
        INT04                   : origin = 0xFF88, length = 0x0002
        INT05                   : origin = 0xFF8A, length = 0x0002
        INT06                   : origin = 0xFF8C, length = 0x0002
        INT07                   : origin = 0xFF8E, length = 0x0002
        INT08                   : origin = 0xFF90, length = 0x0002
        INT09                   : origin = 0xFF92, length = 0x0002
        INT10                   : origin = 0xFF94, length = 0x0002
        INT11                   : origin = 0xFF96, length = 0x0002
        INT12                   : origin = 0xFF98, length = 0x0002
        INT13                   : origin = 0xFF9A, length = 0x0002
        INT14                   : origin = 0xFF9C, length = 0x0002
        INT15                   : origin = 0xFF9E, length = 0x0002
        INT16                   : origin = 0xFFA0, length = 0x0002
        INT17                   : origin = 0xFFA2, length = 0x0002
        INT18                   : origin = 0xFFA4, length = 0x0002
        INT19                   : origin = 0xFFA6, length = 0x0002
        INT20                   : origin = 0xFFA8, length = 0x0002
        INT21                   : origin = 0xFFAA, length = 0x0002
        INT22                   : origin = 0xFFAC, length = 0x0002
        INT23                   : origin = 0xFFAE, length = 0x0002
        INT24                   : origin = 0xFFB0, length = 0x0002
        INT25                   : origin = 0xFFB2, length = 0x0002
        INT26                   : origin = 0xFFB4, length = 0x0002
        INT27                   : origin = 0xFFB6, length = 0x0002
        INT28                   : origin = 0xFFB8, length = 0x0002
        INT29                   : origin = 0xFFBA, length = 0x0002
        INT30                   : origin = 0xFFBC, length = 0x0002
        INT31                   : origin = 0xFFBE, length = 0x0002
        INT32                   : origin = 0xFFC0, length = 0x0002
        INT33                   : origin = 0xFFC2, length = 0x0002
        INT34                   : origin = 0xFFC4, length = 0x0002
        INT35                   : origin = 0xFFC6, length = 0x0002
        INT36                   : origin = 0xFFC8, length = 0x0002
        INT37                   : origin = 0xFFCA, length = 0x0002
        INT38                   : origin = 0xFFCC, length = 0x0002
        INT39                   : origin = 0xFFCE, length = 0x0002
        INT40                   : origin = 0xFFD0, length = 0x0002
        INT41                   : origin = 0xFFD2, length = 0x0002
        INT42                   : origin = 0xFFD4, length = 0x0002
        INT43                   : origin = 0xFFD6, length = 0x0002
        INT44                   : origin = 0xFFD8, length = 0x0002
        INT45                   : origin = 0xFFDA, length = 0x0002
        INT46                   : origin = 0xFFDC, length = 0x0002
        INT47                   : origin = 0xFFDE, length = 0x0002
        INT48                   : origin = 0xFFE0, length = 0x0002
        INT49                   : origin = 0xFFE2, length = 0x0002
        INT50                   : origin = 0xFFE4, length = 0x0002
        INT51                   : origin = 0xFFE6, length = 0x0002
        INT52                   : origin = 0xFFE8, length = 0x0002
        INT53                   : origin = 0xFFEA, length = 0x0002
        INT54                   : origin = 0xFFEC, length = 0x0002
        INT55                   : origin = 0xFFEE, length = 0x0002
        INT56                   : origin = 0xFFF0, length = 0x0002
        INT57                   : origin = 0xFFF2, length = 0x0002
        INT58                   : origin = 0xFFF4, length = 0x0002
        INT59                   : origin = 0xFFF6, length = 0x0002
        INT60                   : origin = 0xFFF8, length = 0x0002
        INT61                   : origin = 0xFFFA, length = 0x0002
        INT62                   : origin = 0xFFFC, length = 0x0002
        RESET                   : origin = 0xFFFE, length = 0x0002
    }

    /****************************************************************************/
    /* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY                              */
    /****************************************************************************/

    SECTIONS
    {
        .bss        : {} > RAM                /* GLOBAL & STATIC VARS              */
        .data       : {} > RAM                /* GLOBAL & STATIC VARS              */
        .sysmem     : {} > RAM                /* DYNAMIC MEMORY ALLOCATION AREA    */
        .stack      : {} > RAM (HIGH)         /* SOFTWARE SYSTEM STACK             */

        .text       : {}>> FLASH | FLASH2     /* CODE                              */
        .text:_isr  : {} > FLASH              /* ISR CODE SPACE                    */
        .cinit      : {} > FLASH              /* INITIALIZATION TABLES             */
    //#ifdef (__LARGE_DATA_MODEL__)
        .const      : {} > FLASH | FLASH2     /* CONSTANT DATA                     */
    //#else
    //    .const      : {} > FLASH              /* CONSTANT DATA                     */
    //#endif
        .cio        : {} > RAM                /* C I/O BUFFER                      */

        .pinit      : {} > FLASH              /* C++ CONSTRUCTOR TABLES            */
        .init_array : {} > FLASH              /* C++ CONSTRUCTOR TABLES            */
        .mspabi.exidx : {} > FLASH            /* C++ CONSTRUCTOR TABLES            */
        .mspabi.extab : {} > FLASH            /* C++ CONSTRUCTOR TABLES            */

        .infoA     : {} > INFOA              /* MSP430 INFO FLASH MEMORY SEGMENTS */
        .infoB     : {} > INFOB
        .infoC     : {} > INFOC
        .infoD     : {} > INFOD

        /* MSP430 INTERRUPT VECTORS          */
        .int00       : {}               > INT00
        .int01       : {}               > INT01
        .int02       : {}               > INT02
        .int03       : {}               > INT03
        .int04       : {}               > INT04
        .int05       : {}               > INT05
        .int06       : {}               > INT06
        .int07       : {}               > INT07
        .int08       : {}               > INT08
        .int09       : {}               > INT09
        .int10       : {}               > INT10
        .int11       : {}               > INT11
        .int12       : {}               > INT12
        .int13       : {}               > INT13
        .int14       : {}               > INT14
        .int15       : {}               > INT15
        .int16       : {}               > INT16
        .int17       : {}               > INT17
        .int18       : {}               > INT18
        .int19       : {}               > INT19
        .int20       : {}               > INT20
        .int21       : {}               > INT21
        .int22       : {}               > INT22
        .int23       : {}               > INT23
        .int24       : {}               > INT24
        .int25       : {}               > INT25
        .int26       : {}               > INT26
        .int27       : {}               > INT27
        .int28       : {}               > INT28
        .int29       : {}               > INT29
        .int30       : {}               > INT30
        .int31       : {}               > INT31
        .int32       : {}               > INT32
        .int33       : {}               > INT33
        .int34       : {}               > INT34
        .int35       : {}               > INT35
        .int36       : {}               > INT36
        .int37       : {}               > INT37
        .int38       : {}               > INT38
        .int39       : {}               > INT39
        .int40       : {}               > INT40
        RTC          : { * ( .int41 ) } > INT41 type = VECT_INIT
        PORT2        : { * ( .int42 ) } > INT42 type = VECT_INIT
        TIMER2_A1    : { * ( .int43 ) } > INT43 type = VECT_INIT
        TIMER2_A0    : { * ( .int44 ) } > INT44 type = VECT_INIT
        USCI_B1      : { * ( .int45 ) } > INT45 type = VECT_INIT
        USCI_A1      : { * ( .int46 ) } > INT46 type = VECT_INIT
        PORT1        : { * ( .int47 ) } > INT47 type = VECT_INIT
        TIMER1_A1    : { * ( .int48 ) } > INT48 type = VECT_INIT
        TIMER1_A0    : { * ( .int49 ) } > INT49 type = VECT_INIT
        DMA          : { * ( .int50 ) } > INT50 type = VECT_INIT
        USB_UBM      : { * ( .int51 ) } > INT51 type = VECT_INIT
        TIMER0_A1    : { * ( .int52 ) } > INT52 type = VECT_INIT
        TIMER0_A0    : { * ( .int53 ) } > INT53 type = VECT_INIT
        ADC12        : { * ( .int54 ) } > INT54 type = VECT_INIT
        USCI_B0      : { * ( .int55 ) } > INT55 type = VECT_INIT
        USCI_A0      : { * ( .int56 ) } > INT56 type = VECT_INIT
        WDT          : { * ( .int57 ) } > INT57 type = VECT_INIT
        TIMER0_B1    : { * ( .int58 ) } > INT58 type = VECT_INIT
        TIMER0_B0    : { * ( .int59 ) } > INT59 type = VECT_INIT
        COMP_B       : { * ( .int60 ) } > INT60 type = VECT_INIT
        UNMI         : { * ( .int61 ) } > INT61 type = VECT_INIT
        SYSNMI       : { * ( .int62 ) } > INT62 type = VECT_INIT
        .reset       : {}               > RESET  /* MSP430 RESET VECTOR         */
    }

    /****************************************************************************/
    /* INCLUDE PERIPHERALS MEMORY MAP                                           */
    /****************************************************************************/

    -l msp430f5529.cmd

     Lina Lian  对的,我是利用CCS5.3,以上是我打开MSP430F5529.CMD,但是并没有出现你说的,为啥这两个CMD文件区别这么大?能有关于CMD的说明和关于MSP430的编译器说明? 谢谢

  • xiaolu liao1,你打开的是 lnk_msp430f5529.cmd file,而非msp430f5529.cmd file.

    在lnk_msp430f5529.cmd file 的最后一句‘-l msp430f5529.cmd’ 中提到了msp430f5529.cmd,请到下列路径中寻找。

    C:\ti\CCS5_3_0\ccsv5\ccs_base\msp430\include 


  • Lina Lian 谢谢,嗯 找到了,为什么TI不这个直接放在头文件里面还要另外建立一个CMD文件,请问这样有什么好处,另外TI官网上有关MSP430编译器说明不

  • xiaolu liao1, 这是因为, lnk_msp430f5529.cmd file 说明了 system memory map,即flash,ram的划分,已及.data, .text等的分配和放置,客户可以按照你的想法和应用来更改 lnk_msp430f5529.cmd file。

    但是msp430f5529.cmd file 是说明了PERIPHERALS MEMORY MAP ,对每个device而言是固定不变的。且为了防止客户不小心更改,故没有直接放在头文件中,而是以link的方式出现的。

    这些是我的理解。可能不太全面,如果有什么补充和建议,可以提出来。O(∩_∩)O~

  • 另外关于MSP430 compiler的文档的话,可以参考,MSP430 Optimizing C/C++ Compiler v 4.1 User's Guide,链接如下。

    http://www.ti.com/lit/ug/slau132g/slau132g.pdf

    Code Composer Studio™ v5.3 User's Guide for MSP430 User's Guide,这个是讲CCS的。

    http://www.ti.com/lit/ug/slau157x/slau157x.pdf

  • Lina Lian 继续头文件,打开<msp430.h>,即进入

    #ifndef __msp430
    #define __msp430


    #if defined (__MSP430C111__)
    #include "msp430c111.h"

    #elif defined (__MSP430C1111__)
    #include "msp430c1111.h"

    #elif defined (__MSP430C112__)
    #include "msp430c112.h"

    #elif defined (__MSP430C1121__)
    #include "msp430c1121.h"

    #elif defined (__MSP430C1331__)
    #include "msp430c1331.h"

    #elif defined (__MSP430C1351__)
    #include "msp430c1351.h"

    #elif defined (__MSP430C311S__)
    #include "msp430c311s.h"

    #elif defined (__MSP430C312__)
    #include "msp430c312.h"

    #elif defined (__MSP430C313__)
    #include "msp430c313.h"

    #elif defined (__MSP430C314__)
    #include "msp430c314.h"

    #elif defined (__MSP430C315__)
    #include "msp430c315.h"

    #elif defined (__MSP430C323__)
    #include "msp430c323.h"

    #elif defined (__MSP430C325__)
    #include "msp430c325.h"

    #elif defined (__MSP430C336__)
    #include "msp430c336.h"

    #elif defined (__MSP430C337__)
    #include "msp430c337.h"

    #elif defined (__MSP430C412__)
    #include "msp430c412.h"

    #elif defined (__MSP430C413__)
    #include "msp430c413.h"

    #elif defined (__MSP430CG4616__)
    #include "msp430cg4616.h"

    #elif defined (__MSP430CG4617__)
    #include "msp430cg4617.h"

    #elif defined (__MSP430CG4618__)
    #include "msp430cg4618.h"

    #elif defined (__MSP430CG4619__)
    #include "msp430cg4619.h"

    #elif defined (__MSP430E112__)
    #include "msp430e112.h"

    #elif defined (__MSP430E313__)
    #include "msp430e313.h"

    #elif defined (__MSP430E315__)
    #include "msp430e315.h"

    #elif defined (__MSP430E325__)
    #include "msp430e325.h"

    #elif defined (__MSP430E337__)
    #include "msp430e337.h"

    #elif defined (__MSP430F110__)
    #include "msp430f110.h"

    #elif defined (__MSP430F1101__)
    #include "msp430f1101.h"

    #elif defined (__MSP430F1101A__)
    #include "msp430f1101a.h"

    #elif defined (__MSP430F1111__)
    #include "msp430f1111.h"

    #elif defined (__MSP430F1111A__)
    #include "msp430f1111a.h"

    #elif defined (__MSP430F112__)
    #include "msp430f112.h"

    #elif defined (__MSP430F1121__)
    #include "msp430f1121.h"

    #elif defined (__MSP430F1121A__)
    #include "msp430f1121a.h"

    #elif defined (__MSP430F1122__)
    #include "msp430f1122.h"

    #elif defined (__MSP430F1132__)
    #include "msp430f1132.h"

    #elif defined (__MSP430F122__)
    #include "msp430f122.h"

    #elif defined (__MSP430F1222__)
    #include "msp430f1222.h"

    #elif defined (__MSP430F123__)
    #include "msp430f123.h"

    #elif defined (__MSP430F1232__)
    #include "msp430f1232.h"

    #elif defined (__MSP430F133__)
    #include "msp430f133.h"

    #elif defined (__MSP430F135__)
    #include "msp430f135.h"

    #elif defined (__MSP430F147__)
    #include "msp430f147.h"

    #elif defined (__MSP430F148__)
    #include "msp430f148.h"

    #elif defined (__MSP430F149__)
    #include "msp430f149.h"

    #elif defined (__MSP430F1471__)
    #include "msp430f1471.h"

    #elif defined (__MSP430F1481__)
    #include "msp430f1481.h"

    #elif defined (__MSP430F1491__)
    #include "msp430f1491.h"

    #elif defined (__MSP430F155__)
    #include "msp430f155.h"

    #elif defined (__MSP430F156__)
    #include "msp430f156.h"

    #elif defined (__MSP430F157__)
    #include "msp430f157.h"

    #elif defined (__MSP430F167__)
    #include "msp430f167.h"

    #elif defined (__MSP430F168__)
    #include "msp430f168.h"

    #elif defined (__MSP430F169__)
    #include "msp430f169.h"

    #elif defined (__MSP430F1610__)
    #include "msp430f1610.h"

    #elif defined (__MSP430F1611__)
    #include "msp430f1611.h"

    #elif defined (__MSP430F1612__)
    #include "msp430f1612.h"

    #elif defined (__MSP430F2001__)
    #include "msp430f2001.h"

    #elif defined (__MSP430F2011__)
    #include "msp430f2011.h"

    #elif defined (__MSP430F2002__)
    #include "msp430f2002.h"

    #elif defined (__MSP430F2012__)
    #include "msp430f2012.h"

    #elif defined (__MSP430F2003__)
    #include "msp430f2003.h"

    #elif defined (__MSP430F2013__)
    #include "msp430f2013.h"

    #elif defined (__MSP430F2101__)
    #include "msp430f2101.h"

    #elif defined (__MSP430F2111__)
    #include "msp430f2111.h"

    #elif defined (__MSP430F2121__)
    #include "msp430f2121.h"

    #elif defined (__MSP430F2131__)
    #include "msp430f2131.h"

    #elif defined (__MSP430F2112__)
    #include "msp430f2112.h"

    #elif defined (__MSP430F2122__)
    #include "msp430f2122.h"

    #elif defined (__MSP430F2132__)
    #include "msp430f2132.h"

    #elif defined (__MSP430F2232__)
    #include "msp430f2232.h"

    #elif defined (__MSP430F2252__)
    #include "msp430f2252.h"

    #elif defined (__MSP430F2272__)
    #include "msp430f2272.h"

    #elif defined (__MSP430F2234__)
    #include "msp430f2234.h"

    #elif defined (__MSP430F2254__)
    #include "msp430f2254.h"

    #elif defined (__MSP430F2274__)
    #include "msp430f2274.h"

    #elif defined (__MSP430F2330__)
    #include "msp430f2330.h"

    #elif defined (__MSP430F2350__)
    #include "msp430f2350.h"

    #elif defined (__MSP430F2370__)
    #include "msp430f2370.h"

    #elif defined (__MSP430F233__)
    #include "msp430f233.h"

    #elif defined (__MSP430F235__)
    #include "msp430f235.h"

    #elif defined (__MSP430F247__)
    #include "msp430f247.h"

    #elif defined (__MSP430F248__)
    #include "msp430f248.h"

    #elif defined (__MSP430F249__)
    #include "msp430f249.h"

    #elif defined (__MSP430F2410__)
    #include "msp430f2410.h"

    #elif defined (__MSP430F2471__)
    #include "msp430f2471.h"

    #elif defined (__MSP430F2481__)
    #include "msp430f2481.h"

    #elif defined (__MSP430F2491__)
    #include "msp430f2491.h"

    #elif defined (__MSP430F2416__)
    #include "msp430f2416.h"

    #elif defined (__MSP430F2417__)
    #include "msp430f2417.h"

    #elif defined (__MSP430F2418__)
    #include "msp430f2418.h"

    #elif defined (__MSP430F2419__)
    #include "msp430f2419.h"

    #elif defined (__MSP430F2616__)
    #include "msp430f2616.h"

    #elif defined (__MSP430F2617__)
    #include "msp430f2617.h"

    #elif defined (__MSP430F2618__)
    #include "msp430f2618.h"

    #elif defined (__MSP430F2619__)
    #include "msp430f2619.h"

    #elif defined (__MSP430F412__)
    #include "msp430f412.h"

    #elif defined (__MSP430F413__)
    #include "msp430f413.h"

    #elif defined (__MSP430F415__)
    #include "msp430f415.h"

    #elif defined (__MSP430F417__)
    #include "msp430f417.h"

    #elif defined (__MSP430F4132__)
    #include "msp430f4132.h"

    #elif defined (__MSP430F4152__)
    #include "msp430f4152.h"

    #elif defined (__MSP430F423__)
    #include "msp430f423.h"

    #elif defined (__MSP430F425__)
    #include "msp430f425.h"

    #elif defined (__MSP430F427__)
    #include "msp430f427.h"

    #elif defined (__MSP430F423A__)
    #include "msp430f423a.h"

    #elif defined (__MSP430F425A__)
    #include "msp430f425a.h"

    #elif defined (__MSP430F427A__)
    #include "msp430f427a.h"

    #elif defined (__MSP430F435__)
    #include "msp430f435.h"

    #elif defined (__MSP430F436__)
    #include "msp430f436.h"

    #elif defined (__MSP430F437__)
    #include "msp430f437.h"

    #elif defined (__MSP430F4351__)
    #include "msp430f4351.h"

    #elif defined (__MSP430F4361__)
    #include "msp430f4361.h"

    #elif defined (__MSP430F4371__)
    #include "msp430f4371.h"

    #elif defined (__MSP430F4481__)
    #include "msp430f4481.h"

    #elif defined (__MSP430F4491__)
    #include "msp430f4491.h"

    #elif defined (__MSP430F447__)
    #include "msp430f447.h"

    #elif defined (__MSP430F448__)
    #include "msp430f448.h"

    #elif defined (__MSP430F449__)
    #include "msp430f449.h"

    #elif defined (__MSP430FE423__)
    #include "msp430fe423.h"

    #elif defined (__MSP430FE425__)
    #include "msp430fe425.h"

    #elif defined (__MSP430FE427__)
    #include "msp430fe427.h"

    #elif defined (__MSP430FE423A__)
    #include "msp430fe423a.h"

    #elif defined (__MSP430FE425A__)
    #include "msp430fe425a.h"

    #elif defined (__MSP430FE427A__)
    #include "msp430fe427a.h"

    #elif defined (__MSP430FE4232__)
    #include "msp430fe4232.h"

    #elif defined (__MSP430FE4242__)
    #include "msp430fe4242.h"

    #elif defined (__MSP430FE4252__)
    #include "msp430fe4252.h"

    #elif defined (__MSP430FE4272__)
    #include "msp430fe4272.h"

    #elif defined (__MSP430F4783__)
    #include "msp430f4783.h"

    #elif defined (__MSP430F4793__)
    #include "msp430f4793.h"

    #elif defined (__MSP430F4784__)
    #include "msp430f4784.h"

    #elif defined (__MSP430F4794__)
    #include "msp430f4794.h"

    #elif defined (__MSP430F47126__)
    #include "msp430f47126.h"

    #elif defined (__MSP430F47127__)
    #include "msp430f47127.h"

    #elif defined (__MSP430F47163__)
    #include "msp430f47163.h"

    #elif defined (__MSP430F47173__)
    #include "msp430f47173.h"

    #elif defined (__MSP430F47183__)
    #include "msp430f47183.h"

    #elif defined (__MSP430F47193__)
    #include "msp430f47193.h"

    #elif defined (__MSP430F47166__)
    #include "msp430f47166.h"

    #elif defined (__MSP430F47176__)
    #include "msp430f47176.h"

    #elif defined (__MSP430F47186__)
    #include "msp430f47186.h"

    #elif defined (__MSP430F47196__)
    #include "msp430f47196.h"

    #elif defined (__MSP430F47167__)
    #include "msp430f47167.h"

    #elif defined (__MSP430F47177__)
    #include "msp430f47177.h"

    #elif defined (__MSP430F47187__)
    #include "msp430f47187.h"

    #elif defined (__MSP430F47197__)
    #include "msp430f47197.h"

    #elif defined (__MSP430F4250__)
    #include "msp430f4250.h"

    #elif defined (__MSP430F4260__)
    #include "msp430f4260.h"

    #elif defined (__MSP430F4270__)
    #include "msp430f4270.h"

    #elif defined (__MSP430FG4250__)
    #include "msp430fg4250.h"

    #elif defined (__MSP430FG4260__)
    #include "msp430fg4260.h"

    #elif defined (__MSP430FG4270__)
    #include "msp430fg4270.h"

    #elif defined (__MSP430FW423__)
    #include "msp430fw423.h"

    #elif defined (__MSP430FW425__)
    #include "msp430fw425.h"

    #elif defined (__MSP430FW427__)
    #include "msp430fw427.h"

    #elif defined (__MSP430FW428__)
    #include "msp430fw428.h"

    #elif defined (__MSP430FW429__)
    #include "msp430fw429.h"

    #elif defined (__MSP430FG437__)
    #include "msp430fg437.h"

    #elif defined (__MSP430FG438__)
    #include "msp430fg438.h"

    #elif defined (__MSP430FG439__)
    #include "msp430fg439.h"

    #elif defined (__MSP430F438__)
    #include "msp430f438.h"

    #elif defined (__MSP430F439__)
    #include "msp430f439.h"

    #elif defined (__MSP430F477__)
    #include "msp430f477.h"

    #elif defined (__MSP430F478__)
    #include "msp430f478.h"

    #elif defined (__MSP430F479__)
    #include "msp430f479.h"

    #elif defined (__MSP430FG477__)
    #include "msp430fg477.h"

    #elif defined (__MSP430FG478__)
    #include "msp430fg478.h"

    #elif defined (__MSP430FG479__)
    #include "msp430fg479.h"

    #elif defined (__MSP430F46161__)
    #include "msp430f46161.h"

    #elif defined (__MSP430F46171__)
    #include "msp430f46171.h"

    #elif defined (__MSP430F46181__)
    #include "msp430f46181.h"

    #elif defined (__MSP430F46191__)
    #include "msp430f46191.h"

    #elif defined (__MSP430F4616__)
    #include "msp430f4616.h"

    #elif defined (__MSP430F4617__)
    #include "msp430f4617.h"

    #elif defined (__MSP430F4618__)
    #include "msp430f4618.h"

    #elif defined (__MSP430F4619__)
    #include "msp430f4619.h"

    #elif defined (__MSP430FG4616__)
    #include "msp430fg4616.h"

    #elif defined (__MSP430FG4617__)
    #include "msp430fg4617.h"

    #elif defined (__MSP430FG4618__)
    #include "msp430fg4618.h"

    #elif defined (__MSP430FG4619__)
    #include "msp430fg4619.h"

    #elif defined (__MSP430F5418__)
    #include "msp430f5418.h"

    #elif defined (__MSP430F5419__)
    #include "msp430f5419.h"

    #elif defined (__MSP430F5435__)
    #include "msp430f5435.h"

    #elif defined (__MSP430F5436__)
    #include "msp430f5436.h"

    #elif defined (__MSP430F5437__)
    #include "msp430f5437.h"

    #elif defined (__MSP430F5438__)
    #include "msp430f5438.h"

    #elif defined (__MSP430F5418A__)
    #include "msp430f5418a.h"

    #elif defined (__MSP430F5419A__)
    #include "msp430f5419a.h"

    #elif defined (__MSP430F5435A__)
    #include "msp430f5435a.h"

    #elif defined (__MSP430F5436A__)
    #include "msp430f5436a.h"

    #elif defined (__MSP430F5437A__)
    #include "msp430f5437a.h"

    #elif defined (__MSP430F5438A__)
    #include "msp430f5438a.h"

    #elif defined (__MSP430F5212__)
    #include "msp430f5212.h"

    #elif defined (__MSP430F5213__)
    #include "msp430f5213.h"

    #elif defined (__MSP430F5214__)
    #include "msp430f5214.h"

    #elif defined (__MSP430F5217__)
    #include "msp430f5217.h"

    #elif defined (__MSP430F5218__)
    #include "msp430f5218.h"

    #elif defined (__MSP430F5219__)
    #include "msp430f5219.h"

    #elif defined (__MSP430F5222__)
    #include "msp430f5222.h"

    #elif defined (__MSP430F5223__)
    #include "msp430f5223.h"

    #elif defined (__MSP430F5224__)
    #include "msp430f5224.h"

    #elif defined (__MSP430F5227__)
    #include "msp430f5227.h"

    #elif defined (__MSP430F5228__)
    #include "msp430f5228.h"

    #elif defined (__MSP430F5229__)
    #include "msp430f5229.h"

    #elif defined (__MSP430F5304__)
    #include "msp430f5304.h"

    #elif defined (__MSP430F5308__)
    #include "msp430f5308.h"

    #elif defined (__MSP430F5309__)
    #include "msp430f5309.h"

    #elif defined (__MSP430F5310__)
    #include "msp430f5310.h"

    #elif defined (__MSP430F5340__)
    #include "msp430f5340.h"

    #elif defined (__MSP430F5341__)
    #include "msp430f5341.h"

    #elif defined (__MSP430F5342__)
    #include "msp430f5342.h"

    #elif defined (__MSP430F5324__)
    #include "msp430f5324.h"

    #elif defined (__MSP430F5325__)
    #include "msp430f5325.h"

    #elif defined (__MSP430F5326__)
    #include "msp430f5326.h"

    #elif defined (__MSP430F5327__)
    #include "msp430f5327.h"

    #elif defined (__MSP430F5328__)
    #include "msp430f5328.h"

    #elif defined (__MSP430F5329__)
    #include "msp430f5329.h"

    #elif defined (__MSP430F5500__)
    #include "msp430f5500.h"

    #elif defined (__MSP430F5501__)
    #include "msp430f5501.h"

    #elif defined (__MSP430F5502__)
    #include "msp430f5502.h"

    #elif defined (__MSP430F5503__)
    #include "msp430f5503.h"

    #elif defined (__MSP430F5504__)
    #include "msp430f5504.h"

    #elif defined (__MSP430F5505__)
    #include "msp430f5505.h"

    #elif defined (__MSP430F5506__)
    #include "msp430f5506.h"

    #elif defined (__MSP430F5507__)
    #include "msp430f5507.h"

    #elif defined (__MSP430F5508__)
    #include "msp430f5508.h"

    #elif defined (__MSP430F5509__)
    #include "msp430f5509.h"

    #elif defined (__MSP430F5510__)
    #include "msp430f5510.h"

    #elif defined (__MSP430F5513__)
    #include "msp430f5513.h"

    #elif defined (__MSP430F5514__)
    #include "msp430f5514.h"

    #elif defined (__MSP430F5515__)
    #include "msp430f5515.h"

    #elif defined (__MSP430F5517__)
    #include "msp430f5517.h"

    #elif defined (__MSP430F5519__)
    #include "msp430f5519.h"

    #elif defined (__MSP430F5521__)
    #include "msp430f5521.h"

    #elif defined (__MSP430F5522__)
    #include "msp430f5522.h"

    #elif defined (__MSP430F5524__)
    #include "msp430f5524.h"

    #elif defined (__MSP430F5525__)
    #include "msp430f5525.h"

    #elif defined (__MSP430F5526__)
    #include "msp430f5526.h"

    #elif defined (__MSP430F5527__)
    #include "msp430f5527.h"

    #elif defined (__MSP430F5528__)
    #include "msp430f5528.h"

    #elif defined (__MSP430F5529__)
    #include "msp430f5529.h"

    #elif defined (__MSP430P112__)
    #include "msp430p112.h"

    #elif defined (__MSP430P313__)
    #include "msp430p313.h"

    #elif defined (__MSP430P315__)
    #include "msp430p315.h"

    #elif defined (__MSP430P315S__)
    #include "msp430p315s.h"

    #elif defined (__MSP430P325__)
    #include "msp430p325.h"

    #elif defined (__MSP430P337__)
    #include "msp430p337.h"

    #elif defined (__CC430F5133__)
    #include "cc430f5133.h"

    #elif defined (__CC430F5135__)
    #include "cc430f5135.h"

    #elif defined (__CC430F5137__)
    #include "cc430f5137.h"

    #elif defined (__CC430F6125__)
    #include "cc430f6125.h"

    #elif defined (__CC430F6126__)
    #include "cc430f6126.h"

    #elif defined (__CC430F6127__)
    #include "cc430f6127.h"

    #elif defined (__CC430F6135__)
    #include "cc430f6135.h"

    #elif defined (__CC430F6137__)
    #include "cc430f6137.h"

    #elif defined (__CC430F5123__)
    #include "cc430f5123.h"

    #elif defined (__CC430F5125__)
    #include "cc430f5125.h"

    #elif defined (__CC430F5143__)
    #include "cc430f5143.h"

    #elif defined (__CC430F5145__)
    #include "cc430f5145.h"

    #elif defined (__CC430F5147__)
    #include "cc430f5147.h"

    #elif defined (__CC430F6143__)
    #include "cc430f6143.h"

    #elif defined (__CC430F6145__)
    #include "cc430f6145.h"

    #elif defined (__CC430F6147__)
    #include "cc430f6147.h"

    #elif defined (__MSP430F5333__)
    #include "msp430f5333.h"

    #elif defined (__MSP430F5335__)
    #include "msp430f5335.h"

    #elif defined (__MSP430F5336__)
    #include "msp430f5336.h"

    #elif defined (__MSP430F5338__)
    #include "msp430f5338.h"

    #elif defined (__MSP430F5630__)
    #include "msp430f5630.h"

    #elif defined (__MSP430F5631__)
    #include "msp430f5631.h"

    #elif defined (__MSP430F5632__)
    #include "msp430f5632.h"

    #elif defined (__MSP430F5633__)
    #include "msp430f5633.h"

    #elif defined (__MSP430F5634__)
    #include "msp430f5634.h"

    #elif defined (__MSP430F5635__)
    #include "msp430f5635.h"

    #elif defined (__MSP430F5636__)
    #include "msp430f5636.h"

    #elif defined (__MSP430F5637__)
    #include "msp430f5637.h"

    #elif defined (__MSP430F5638__)
    #include "msp430f5638.h"

    #elif defined (__MSP430F6433__)
    #include "msp430f6433.h"

    #elif defined (__MSP430F6435__)
    #include "msp430f6435.h"

    #elif defined (__MSP430F6436__)
    #include "msp430f6436.h"

    #elif defined (__MSP430F6438__)
    #include "msp430f6438.h"

    #elif defined (__MSP430F6630__)
    #include "msp430f6630.h"

    #elif defined (__MSP430F6631__)
    #include "msp430f6631.h"

    #elif defined (__MSP430F6632__)
    #include "msp430f6632.h"

    #elif defined (__MSP430F6633__)
    #include "msp430f6633.h"

    #elif defined (__MSP430F6634__)
    #include "msp430f6634.h"

    #elif defined (__MSP430F6635__)
    #include "msp430f6635.h"

    #elif defined (__MSP430F6636__)
    #include "msp430f6636.h"

    #elif defined (__MSP430F6637__)
    #include "msp430f6637.h"

    #elif defined (__MSP430F6638__)
    #include "msp430f6638.h"

    #elif defined (__MSP430F5358__)
    #include "msp430f5358.h"

    #elif defined (__MSP430F5359__)
    #include "msp430f5359.h"

    #elif defined (__MSP430F5658__)
    #include "msp430f5658.h"

    #elif defined (__MSP430F5659__)
    #include "msp430f5659.h"

    #elif defined (__MSP430F6458__)
    #include "msp430f6458.h"

    #elif defined (__MSP430F6459__)
    #include "msp430f6459.h"

    #elif defined (__MSP430F6658__)
    #include "msp430f6658.h"

    #elif defined (__MSP430F6659__)
    #include "msp430f6659.h"

    #elif defined (__MSP430L092__)
    #include "msp430l092.h"

    #elif defined (__MSP430C091__)
    #include "msp430c091.h"

    #elif defined (__MSP430C092__)
    #include "msp430c092.h"

    #elif defined (__MSP430XGENERIC__)
    #include "msp430xgeneric.h"

    #elif defined (__MSP430F5131__)
    #include "msp430f5131.h"

    #elif defined (__MSP430F5151__)
    #include "msp430f5151.h"

    #elif defined (__MSP430F5171__)
    #include "msp430f5171.h"

    #elif defined (__MSP430F5132__)
    #include "msp430f5132.h"

    #elif defined (__MSP430F5152__)
    #include "msp430f5152.h"

    #elif defined (__MSP430F5172__)
    #include "msp430f5172.h"

    #elif defined (__MSP430F6720__)
    #include "msp430f6720.h"

    #elif defined (__MSP430F6721__)
    #include "msp430f6721.h"

    #elif defined (__MSP430F6723__)
    #include "msp430f6723.h"

    #elif defined (__MSP430F6724__)
    #include "msp430f6724.h"

    #elif defined (__MSP430F6725__)
    #include "msp430f6725.h"

    #elif defined (__MSP430F6726__)
    #include "msp430f6726.h"

    #elif defined (__MSP430F6730__)
    #include "msp430f6730.h"

    #elif defined (__MSP430F6731__)
    #include "msp430f6731.h"

    #elif defined (__MSP430F6733__)
    #include "msp430f6733.h"

    #elif defined (__MSP430F6734__)
    #include "msp430f6734.h"

    #elif defined (__MSP430F6735__)
    #include "msp430f6735.h"

    #elif defined (__MSP430F6736__)
    #include "msp430f6736.h"

    #elif defined (__MSP430F67451__)
    #include "msp430f67451.h"

    #elif defined (__MSP430F67651__)
    #include "msp430f67651.h"

    #elif defined (__MSP430F67751__)
    #include "msp430f67751.h"

    #elif defined (__MSP430F67461__)
    #include "msp430f67461.h"

    #elif defined (__MSP430F67661__)
    #include "msp430f67661.h"

    #elif defined (__MSP430F67761__)
    #include "msp430f67761.h"

    #elif defined (__MSP430F67471__)
    #include "msp430f67471.h"

    #elif defined (__MSP430F67671__)
    #include "msp430f67671.h"

    #elif defined (__MSP430F67771__)
    #include "msp430f67771.h"

    #elif defined (__MSP430F67481__)
    #include "msp430f67481.h"

    #elif defined (__MSP430F67681__)
    #include "msp430f67681.h"

    #elif defined (__MSP430F67781__)
    #include "msp430f67781.h"

    #elif defined (__MSP430F67491__)
    #include "msp430f67491.h"

    #elif defined (__MSP430F67691__)
    #include "msp430f67691.h"

    #elif defined (__MSP430F67791__)
    #include "msp430f67791.h"

    #elif defined (__MSP430F6745__)
    #include "msp430f6745.h"

    #elif defined (__MSP430F6765__)
    #include "msp430f6765.h"

    #elif defined (__MSP430F6775__)
    #include "msp430f6775.h"

    #elif defined (__MSP430F6746__)
    #include "msp430f6746.h"

    #elif defined (__MSP430F6766__)
    #include "msp430f6766.h"

    #elif defined (__MSP430F6776__)
    #include "msp430f6776.h"

    #elif defined (__MSP430F6747__)
    #include "msp430f6747.h"

    #elif defined (__MSP430F6767__)
    #include "msp430f6767.h"

    #elif defined (__MSP430F6777__)
    #include "msp430f6777.h"

    #elif defined (__MSP430F6748__)
    #include "msp430f6748.h"

    #elif defined (__MSP430F6768__)
    #include "msp430f6768.h"

    #elif defined (__MSP430F6778__)
    #include "msp430f6778.h"

    #elif defined (__MSP430F6749__)
    #include "msp430f6749.h"

    #elif defined (__MSP430F6769__)
    #include "msp430f6769.h"

    #elif defined (__MSP430F6779__)
    #include "msp430f6779.h"

    #elif defined (__MSP430FR5720__)
    #include "msp430fr5720.h"

    #elif defined (__MSP430FR5721__)
    #include "msp430fr5721.h"

    #elif defined (__MSP430FR5722__)
    #include "msp430fr5722.h"

    #elif defined (__MSP430FR5723__)
    #include "msp430fr5723.h"

    #elif defined (__MSP430FR5724__)
    #include "msp430fr5724.h"

    #elif defined (__MSP430FR5725__)
    #include "msp430fr5725.h"

    #elif defined (__MSP430FR5726__)
    #include "msp430fr5726.h"

    #elif defined (__MSP430FR5727__)
    #include "msp430fr5727.h"

    #elif defined (__MSP430FR5728__)
    #include "msp430fr5728.h"

    #elif defined (__MSP430FR5729__)
    #include "msp430fr5729.h"

    #elif defined (__MSP430FR5730__)
    #include "msp430fr5730.h"

    #elif defined (__MSP430FR5731__)
    #include "msp430fr5731.h"

    #elif defined (__MSP430FR5732__)
    #include "msp430fr5732.h"

    #elif defined (__MSP430FR5733__)
    #include "msp430fr5733.h"

    #elif defined (__MSP430FR5734__)
    #include "msp430fr5734.h"

    #elif defined (__MSP430FR5735__)
    #include "msp430fr5735.h"

    #elif defined (__MSP430FR5736__)
    #include "msp430fr5736.h"

    #elif defined (__MSP430FR5737__)
    #include "msp430fr5737.h"

    #elif defined (__MSP430FR5738__)
    #include "msp430fr5738.h"

    #elif defined (__MSP430FR5739__)
    #include "msp430fr5739.h"

    #elif defined (__MSP430G2211__)
    #include "msp430g2211.h"

    #elif defined (__MSP430G2201__)
    #include "msp430g2201.h"

    #elif defined (__MSP430G2111__)
    #include "msp430g2111.h"

    #elif defined (__MSP430G2101__)
    #include "msp430g2101.h"

    #elif defined (__MSP430G2001__)
    #include "msp430g2001.h"

    #elif defined (__MSP430G2231__)
    #include "msp430g2231.h"

    #elif defined (__MSP430G2221__)
    #include "msp430g2221.h"

    #elif defined (__MSP430G2131__)
    #include "msp430g2131.h"

    #elif defined (__MSP430G2121__)
    #include "msp430g2121.h"

    #elif defined (__MSP430AFE221__)
    #include "msp430afe221.h"

    #elif defined (__MSP430AFE231__)
    #include "msp430afe231.h"

    #elif defined (__MSP430AFE251__)
    #include "msp430afe251.h"

    #elif defined (__MSP430AFE222__)
    #include "msp430afe222.h"

    #elif defined (__MSP430AFE232__)
    #include "msp430afe232.h"

    #elif defined (__MSP430AFE252__)
    #include "msp430afe252.h"

    #elif defined (__MSP430AFE223__)
    #include "msp430afe223.h"

    #elif defined (__MSP430AFE233__)
    #include "msp430afe233.h"

    #elif defined (__MSP430AFE253__)
    #include "msp430afe253.h"

    #elif defined (__MSP430G2102__)
    #include "msp430g2102.h"

    #elif defined (__MSP430G2202__)
    #include "msp430g2202.h"

    #elif defined (__MSP430G2302__)
    #include "msp430g2302.h"

    #elif defined (__MSP430G2402__)
    #include "msp430g2402.h"

    #elif defined (__MSP430G2132__)
    #include "msp430g2132.h"

    #elif defined (__MSP430G2232__)
    #include "msp430g2232.h"

    #elif defined (__MSP430G2332__)
    #include "msp430g2332.h"

    #elif defined (__MSP430G2432__)
    #include "msp430g2432.h"

    #elif defined (__MSP430G2112__)
    #include "msp430g2112.h"

    #elif defined (__MSP430G2212__)
    #include "msp430g2212.h"

    #elif defined (__MSP430G2312__)
    #include "msp430g2312.h"

    #elif defined (__MSP430G2412__)
    #include "msp430g2412.h"

    #elif defined (__MSP430G2152__)
    #include "msp430g2152.h"

    #elif defined (__MSP430G2252__)
    #include "msp430g2252.h"

    #elif defined (__MSP430G2352__)
    #include "msp430g2352.h"

    #elif defined (__MSP430G2452__)
    #include "msp430g2452.h"

    #elif defined (__MSP430G2113__)
    #include "msp430g2113.h"

    #elif defined (__MSP430G2213__)
    #include "msp430g2213.h"

    #elif defined (__MSP430G2313__)
    #include "msp430g2313.h"

    #elif defined (__MSP430G2413__)
    #include "msp430g2413.h"

    #elif defined (__MSP430G2513__)
    #include "msp430g2513.h"

    #elif defined (__MSP430G2153__)
    #include "msp430g2153.h"

    #elif defined (__MSP430G2253__)
    #include "msp430g2253.h"

    #elif defined (__MSP430G2353__)
    #include "msp430g2353.h"

    #elif defined (__MSP430G2453__)
    #include "msp430g2453.h"

    #elif defined (__MSP430G2553__)
    #include "msp430g2553.h"

    #elif defined (__MSP430G2203__)
    #include "msp430g2203.h"

    #elif defined (__MSP430G2303__)
    #include "msp430g2303.h"

    #elif defined (__MSP430G2403__)
    #include "msp430g2403.h"

    #elif defined (__MSP430G2233__)
    #include "msp430g2233.h"

    #elif defined (__MSP430G2333__)
    #include "msp430g2333.h"

    #elif defined (__MSP430G2433__)
    #include "msp430g2433.h"

    #elif defined (__MSP430G2533__)
    #include "msp430g2533.h"

    #elif defined (__MSP430G2230__)
    #include "msp430g2230.h"

    #elif defined (__MSP430G2210__)
    #include "msp430g2210.h"

    #elif defined (__MSP430BT5190__)
    #include "msp430bt5190.h"

    #elif defined (__MSP430FR5949__)
    #include "msp430fr5949.h"

    #elif defined (__MSP430FR5969__)
    #include "msp430fr5969.h"

    #elif defined (__MSP430SL5438A__)
    #include "msp430sl5438a.h"

    /********************************************************************
     *  msp430 generic
     ********************************************************************/
    #elif defined (__)
    #error "msp430 generic device does not have a default include file"

    #elif defined (__)
    #error " generic device does not have a default include file"


    /********************************************************************
     * 
     ********************************************************************/
    #else
    #error "Failed to match a default include file"
    #endif

    #endif /* #ifndef __msp430 */

    我的理解是if  没有定义msp430,即定义msp430,进行下面的条件编译,但是这段

    #elif defined (__MSP430F5529__)
    #include "msp430f5529.h"  

    定义了(__MSP430F5529__),则打开头文件#include "msp430f5529.h"  ,

    可是在哪里有定义了这段呢?

    请问是不是在文件建立之初的时候已经在哪里建立连接了,还是...?

    另问:SEED-EXP430F5529 V1.0的板子,在拿到板子的时候下载一段程序,请问这段程序在哪里可以找到。辛苦了Lina Lian

  • 在CCS中,工程名->右击->Properties->Build->Predefined Symbols->Pre-define NAME下有。如下图所示,在你选好device之后,此处会自动有对应的predefine.

  • 关于MSP430F5529板子的初始例程,从下面链接下载对应安装包:MSP-EXP430F5529_UE-1.30.00.00-Setup.exe,安装后即可看到,默认路径应该为:C:\ti\msp430\MSP-EXP430F5529_UE_1_30_00_00\src

    http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPEXP430F5529UE/latest/index_FDS.html

    另外,其实关于MSP430F5529板子的所有资料在下列文档均有提到:MSP-EXP430F5529 Experimenter Board User's Guide.

    http://www.ti.com/lit/ug/slau330a/slau330a.pdf