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.

[参考译文] CCS/MSP430FR6989:#1.0234万-D未解析的符号仍然存在C/C++问题

Guru**** 2538930 points
Other Parts Discussed in Thread: MSP430FR6989

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/573269/ccs-msp430fr6989-10234-d-unresolved-symbols-remain-c-c-problem

部件号:MSP430FR6989
主题中讨论的其他部件: MSPWARE

工具/软件:Code Composer Studio

谁能帮我解决这个问题。 如下所示。

****为项目MCPA构建配置调试****

/Applications/ti/ccsv6/utils/bin/gmake -k all  

构建目标:Mpa.out

调用:MSP430链接器

"/Applications/ti/ccsv6/tools/compiler/MSP430_FR.3.LTS/bin/cl430" 15.12 -vmspx --data_model=restricted --use_HW_bump=F5 --advice:POWER=all --advice:hw_config=all -g --definit_MSP430FR6989__--definit=_mp_ccup/ccti_ccup/ccup/ccp_m=ccup/ccup/ccp_ccup/ccp_ccup/ccp_m_ccup/ccp_ccp_m=-ccp_web_ccf_ccf/ccp_ccf_ccf_ccup/ccp_ccf_ccf_ccp_ccf_ccf_ccf_ccf_ccf_ccp_ccp_ccf/ccp_ccf_ccup/ccp_ccf_ccf_-ccf_ccf_ccf/ccf_ccf_ccf_ccf_ccf_ccf_ccf_ccf_web_ccf_ccf_ccf_ 15.12 15.12   

链接>

警告#1.042万-D:对于FRAM设备,在启动时,需要禁用GPIO通电默认高阻抗模式以激活先前配置的端口设置。 这可以通过清除PM5CTL0寄存器中的LOCKLPM2 5位来完成。

 未定义                  首次引用

 符号                     在文件中    

 -------------------                  --------

 cs_initClockSignal             ./main.obj    

 setDCOFreq                ./main.obj    

 cs_turnOnLFXT                ./main.obj    

 GPIO清除中断             ./main.obj    

 GPIO _启用中断            ./main.obj    

 GPIO_selectInterruptEdge          ./main.obj    

 GPIO_setAsInputPin             ./main.obj    

 GPIO_setAsInputPinWithPullUp阻 器   ./main.obj    

 GPIO_setAsOutputPin             ./main.obj    

 GPIO _setAsPeripheralModuleFunctionInputPin ./main.obj    

 GPIO_setOutputHighOnPin           ./main.obj    

 GPIO_setOutputLowOnPin           ./main.obj    

 INIT_LCD                  ./main.obj    

 LCD_C_selectDisplayMemory          ./main.obj    

 LCD_showChar                ./main.obj    

 PMM_解锁LPM5               ./main.obj    

 timer_a_initUpMode             ./main.obj    

 Timer_a_stop                ./main.obj    

 WDT_A_Hold                 ./main.obj    

 ClearLCD                  ./main.obj    

 DisplayScrollText              ./main.obj    

 显示字符                  ./main.obj    

错误#1.0234万-D:仍存在未解析的符号

错误#1.001万:链接时出错;未生成“mcpa.out”

备注#1.0371万-D:(ULP 1.1)检测到未使用低功耗模式状态更改指令

说明#1.0372万-D:(ULP 4.1)在此项目中检测到未初始化的端口A。 建议初始化所有未使用的端口,以消除未使用的引脚上浪费的电流消耗。

说明#1.0372万-D:(ULP 4.1)在此项目中检测到未初始化的端口B。 建议初始化所有未使用的端口,以消除未使用的引脚上浪费的电流消耗。

备注#1.0372万-D:(ULP 4.1)在此项目中检测到未初始化的端口C。 建议初始化所有未使用的端口,以消除未使用的引脚上浪费的电流消耗。

备注#1.0372万-D:(ULP 4.1)在此项目中检测到未初始化的端口D。 建议初始化所有未使用的端口,以消除未使用的引脚上浪费的电流消耗。

备注#1.0372万-D:(ULP 4.1)在此项目中检测到未初始化的端口E。 建议初始化所有未使用的端口,以消除未使用的引脚上浪费的电流消耗。

>>编译失败

Makefile:140:目标'cpa.out '的配方失败

gmake:***[MCPA.OUT ]错误1

gmake:由于错误,目标'all'没有重制。

****构建已完成****

这是我的代码:

//作者: y.wei

//项目:Macom相位振幅控制器 (MPAC)

//射频和微波研究组

//请勿重复使用

//最后编辑:Ke Wang 6.02 17 (#1.0234万-D未解析的符号仍存在)

 //此演示提供2种应用模式:相位模式和衰减模式

 //相位模式和衰减模式用于对相位和进行初始化和解密

 //衰减

 //2016年9月

 //魏耀威

 //

#include <driverlib.h>

#include "MSP4S.h" //这似乎引用了所有其他头文件????

包含"hal_lcd.h"

#define startup模式     0

//////////////////////////////////////////// 更改零件,全局定义

#define Phase_mode      1.

#定义衰减模式  2.

/////////////////////////////////////////////////////////////////////////////////////////////////////////////

volatile unsigned char mode = startup模式;

volatile unsigned char writing_data_phase =0;

volatile unsigned char writing_data_attenuator = 63;

volatile unsigned char S1buttonDebounce = 0;

volatile unsigned char S2buttonDebounce = 0;

volatile unsigned int holdCount =0;

//易失性无符号int计数器=0;

//挥发性int厘秒= 0;

//日历当前时间;

// TimerA0 Uptime配置参数

timer_a_initUpModeParam initUpParam_A0 =

    Timer_A_CLOCKSOURCE_SMCLK,        // SMCLK时钟源

    Timer_a_CLOCKSOURCE_diver_1,      // SMCLK/4 = 2MHz

    3万,                  // 15毫秒反跳周期

    Timer_a_TAIE_INTERRUST_DISABLE,     //禁用计时器中断

    Timer_a_CCIE_CCR0_interrupT_enable,  //启用CCR0中断

    Timer_a_DO清除,            //清除值

    正确                   //开始计时器

};

//初始化调用

void Init_gpio (void);

void Init_Clock (void);

void delay_time (无符号int毫秒);

void write_data (无符号char数据);

void序列阶段(unsigned char Xphoke);

void序列化(无符号字符扩展);

void phaseMode(void);

void phaseModeInit (void);

void displayPhase (void);

void attenuationModeInit(void);

void attenuationMode(void);

void displayatten(void);

/*

 *主例程

 */

int main (void){

  //停止看门狗计时器

  WDT_A_HOLD (__MSP430_BASEADDRESS_WDT_A__);

  //禁用GPIO开机默认高阻抗模式以激活

  //以前配置的端口设置

  pm_unlockLPM5();

  //启用中断

  __enable_interrupit();

  //初始化

  init_gPIO();

  init_Clock();

  INIT_LCD();

  //// 更换部件,换相器和衰减器初始化

  串行相位(0x00);

  DELAY时间(100);

  序列化(63);

  DELAY时间(100);

  ////////

  GPIO清除中断(GPIO_PORT_P1, GPIO _PIN1);

  GPIO_clearInterrupt (GPIO端口P1,GPIO PIN2);

  __enable_interrupit();

  DisplayScrollText ("欢迎使用FR6989");

  INT I = 0x01;

  同时(1)

  {

    LCD_C_selectDisplayMemory (LCD_C_BASE,LCD_C_DISPLAYSOURCE_MEMORY);

    开关(模式)

    {

      案例启动模式:     //启动模式

        //将RTC计数器设置为每~250 ms触发一次中断

        /*RTC_C_INITCounter (RTC_C_BASE,RTC_C_CLOCKSELECT_32KHz_OSC,RTC_C_COUNTRSIE_16BIT);

        RTC_C_DefinePrescaleEvent (RTC_C_BASE,RTC_C_prescale_1,RTC_C_PSEVENTDIVIDER_32);

        RTC_C_enableInterrupt (RTC_C_BASE,RTC_C_prescale_Timer1_interrupt);

        rtc_startClock(RTC_C_base);

        */

        //循环浏览所有LCD段并显示说明消息

        如果(i <= 0x80)

        {

          LCDMEM[pos1]= LCDMEM[pos1+1]= I;

          LCDMEM[pos2]= LCDMEM[pos2+1]= I;

          LCDMEM[pos3]= LCDMEM[pos3+1]= I;

          LCDMEM[pos4]= LCDMEM[pos4+1]= I;

          LCDMEM[pos5]= LCDMEM[pos5+1]= I;

          LCDMEM[pos6]= LCDMEM[pos6+1]= I;

          LCDM14 = I <4;

          LCDM18 = I;

          LCDM3 = I;

          i<<=1;

          DELAY TIME (500);

        }

        否则

        {

          I=1;

          ClearLCD();

          DisplayScrollText ("按住S1和S2切换模式");

        }

        __enable_interrupit();

        //__bis_sr_register (LPM3_bits | GIE);     //输入LPM3

        //__no_operation();

        中断;

      案例阶段模式:     //相位模式

        ClearLCD();        //清除所有LCD段

        phaseModeInit();//  初始化秒表模式

        phaseMode();

        中断;

      案例衰减模式:     //温度传感器模式

        ClearLCD();       //清除所有LCD段

        attenuationModeInit();//  初始化温度模式

        衰减模式();

        中断;

    }

  }

}

/*

 * GPIO初始化

 */

void Init_gPIO()

  //将所有GPIO引脚设置为低输出,以防止浮动输入并降低功耗

  GPIO _setOutputLowOnPin (GPIO端口P1,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setOutputLowOnPin (GPIO端口P2,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setOutputLowOnPin (GPIO端口_P3,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setOutputLowOnPin (GPIO端口P4,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setOutputLowOnPin (GPIO端口_P5,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setOutputLowOnPin (GPIO端口_P6,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setOutputLowOnPin (GPIO端口P7,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setOutputLowOnPin (GPIO端口P8,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setOutputLowOnPin (GPIO端口P9,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _设置输出引脚(GPIO_PORT_P1, GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setAsOutputPin (GPIO端口P2,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _设置输出引脚(GPIO_PORT_P3, GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _设置输出引脚(GPIO_PORT_P4, GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _设置输出引脚(GPIO_PORT_P5, GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _设置输出引脚(GPIO_PORT_P6, GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setAsOutputPin (GPIO_PORT_P7,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setAsOutputPin (GPIO_PORT_P8,GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO _setAsOutputPin (GPIO_PORT_P9, GPIO _PIN0|GPIO _PIN1|GPIO _PIN2|GPIO _PIN3|GPIO _PIN4|GPIO _PIN5|GPIO _PIN6|GPIO _PIN7);

  GPIO_setAsInputPin (GPIO端口P3,GPIO _PIN5);

  GPIO _setAsOutputPin (GPIO端口P1,GPIO _PIN0);

  GPIO _setAsOutputPin (GPIO端口P9,GPIO _PIN7);

  //////////////////////////////////////////////////// 更改零件,从一个点击更改项目复制

  //将引脚设置为输出

    GPIO _setAsOutputPin (GPIO端口P2,GPIO _PIN0);// P/S端口

    GPIO_setAsOutputPin (GPIO端口P8,GPIO _PIN4);// CLK端口

    GPIO _setAsOutputPin (GPIO_PORT_P8,GPIO _PIN6);// LE用于相位转换器端口

    GPIO _setAsOutputPin (GPIO端口P9,GPIO _PIN0);// LE用于衰减器端口

    GPIO_setAsOutputPin (GPIO端口P4,GPIO _PIN2);// SER端口

    //将初始vaule设置为pins

    GPIO _setOutputHighOnPin (GPIO端口P2,GPIO _PIN0);//串行模式

    GPIO_setOutputLowOnPin (GPIO端口P8,GPIO _PIN4);//设置clk 0

    GPIO _setOutputLowOnPin (GPIO_PORT_P8,GPIO _PIN6);//为低相位转换器设置LE

    GPIO _setOutputLowOnPin (GPIO端口P9,GPIO _PIN0);//将LE设置为衰减器低

    GPIO_setOutputLowOnPin (GPIO端口P4,GPIO _PIN2);//设置数据位低

  /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

  //配置按钮S1 (WFP 1.1)中断

  GPIO_selectInterruptEdge (GPIO端口P1,GPIO PIN1,GPIO _高_至_低_转换);

  GPIO_setAsInputPinWithPullUp阻 器(GPIO_PORT_P1, GPIO_PIN1);

  GPIO清除中断(GPIO_PORT_P1, GPIO _PIN1);

  GPIO _启用中断(GPIO_PORT_P1, GPIO _PIN1);

  //配置按钮S2 (WFP 1.2)中断

  GPIO_selectInterruptEdge (GPIO端口P1,GPIO PIN2,GPIO _高_至_低_转换);

  GPIO_setAsInputPinWithPullUp阻 器(GPIO_PORT_P1, GPIO_PIN2);

  GPIO_clearInterrupt (GPIO端口P1,GPIO PIN2);

  GPIO _启用中断(GPIO_PORT_P1, GPIO _PIN2);

  //将WFP 4.1 和WFP 4.2 设置为辅助模块功能输入,LFXT。

  GPIO_setAsPeripheralModuleFunctionInputPin (

      GPIO端口PJ,

      GPIO _PIN4 + GPIO _PIN5,

      GPIO主要模块功能

      );

  //禁用GPIO开机默认高阻抗模式

  //以激活先前配置的端口设置

  pm_unlockLPM5();

}

/*

 *时钟系统初始化

 */

void Init_Clock()

  //将DCO频率设置为默认值8MHz

  CS_setDCOFreq (CS_DCORSEL_0,CS_DCOFSEL_6);

  //将MCLK和SMCLK配置为默认2MHz

  cs_initClockSignal (CS_MCLK,CS_DCOCLK_SELECT,CS_Clock_diver_8);

  cs_initClockSignal (CS_SMCLK,CS_DCOCLK_SELECT,CS_Clock_diver_8);

  //初始化XT1晶体振荡器

  cs_turnOnLFXT (CS_LFXT_DRIVE_3);

}

void phaseMode()

  while (mode == Phase模式)

  {

    //在秒表运行时停留在LPM3中,每10毫秒唤醒一次以更新时钟和LCD

    //__bis_sr_register (LPM3_bits | GIE);     //输入LPM3

    //__no_operation();

    __enable_interrupit();

    //IF (秒表跑步)

      //使用新时间更新液晶屏

    serialphase (writing_data_phase);

    DELAY时间(100);

    DisplayPhase();

    __no_operation();

  }

}

void displayPhase()

  ClearLCD();

  内部相位;

  phase =((int)writing_data_phase)*5625/100;

  如果(相位>=1000)

      showChar ((相位/1000)%10 +'0',pos3);

    如果(相位>=100)

      showChar ((phase /100)%10 +'0',pos4);

    如果(相位>=10)

      showChar (((phase /10)%10 +'0',pos5);

    如果(相位>=1)

      showChar ((相位/1)%10 +'0',pos6);

    //小数点

      LCDMEM[pos5+1]|= 0x01;

}

void phaseModeInit()

  DisplayScrollText ("相位模式");

  LCD_C_selectDisplayMemory (LCD_C_BASE,LCD_C_DISPLAYSOURCE_MEMORY);

  S1buttonDebounce = 0;

  S2buttonDebounce = 0;

  //检查是否按下了任何按钮

  Timer_a_initUpMode(timer A0_base,&initUpParam_A0);

  __enable_interrupit();

  //__bis_sr_register (LPM3_bits | GIE);     //输入LPM3

  //__no_operation();

}

void attenuationModeInit()

  DisplayScrollText ("衰减模式");

  LCD_C_selectDisplayMemory (LCD_C_BASE,LCD_C_DISPLAYSOURCE_MEMORY);

  S1buttonDebounce = 0;

  S2buttonDebounce = 0;

  //检查是否按下了任何按钮

  Timer_a_initUpMode(timer A0_base,&initUpParam_A0);

  __enable_interrupit();

  //__bis_sr_register (LPM3_bits | GIE);     //输入LPM3

  //__no_operation();

}

void attenuationMode()(无效衰减模式)

  while (mode ==衰减模式)

    {

      //在秒表运行时停留在LPM3中,每10毫秒唤醒一次以更新时钟和LCD

      //__bis_sr_register (LPM3_bits | GIE);     //输入LPM3

      //__no_operation();

    __enable_interrupit();

      //IF (秒表跑步)

        //使用新时间更新液晶屏

      序列化(writing_data_attenuator);

      DELAY时间(100);

      displayatten();

      __no_operation();

    }

}

void displayatten()

  ClearLCD();

  合并;

  atten=(63-(((int)writing_data_attenuator))*5;

  //负号

  LCDMEM[pos1+1]|= 0x04;

  如果(atten>=100)

    LCD_showChar ((atten/100)%10 +'0',位置4);

  如果(atten>=10)

    LCD_showChar ((atten/10)%10 +'0',位置5);

  如果(atten>=1)

    LCD_showChar ((atten/1)%10 +'0',pos6);

  //小数点

  LCDMEM[pos5+1]|= 0x01;

}

/////////////////////////////////////////////////////////////////////////////////////////// 更改部件,从一次点击更改主菜单

//------------------

//启用相位转换器的串行功能

//------------------

void序列阶段(无符号char XPhase)

  GPIO_setOutputLowOnPin (GPIO端口P8,GPIO _PIN6);//设置启用低电平

  write_data (XPhase);

  GPIO _setOutputHighOnPin (GPIO_PORT_P8,GPIO _PIN6);//启用串行模式以将6位传输到相位转换器

  //delay_time (1);

  GPIO _setOutputLowOnPin (GPIO_PORT_P8,GPIO _PIN6);//为相位转换器重置LE

  //delay_time (1);

  返回;

}

//------------------

//为衰减器启用串行功能

//------------------

void序列化(无符号字符扩展)

  GPIO_setOutputLowOnPin (GPIO端口P9,GPIO _PIN0);//设置启用低电平

  write_data (xatten);

  GPIO _setOutputHighOnPin (GPIO_PORT_P9, GPIO _PIN0);//启用串行模式以将6位传输到衰减器

  //delay_time (1);

  GPIO _setOutputLowOnPin (GPIO端口P9,GPIO _PIN0);//重置衰减器的LE

  //delay_time (1);

  返回;

}

//------------------

//写入6位数据的函数

//------------------

void write_data (无符号char数据)

  int n;

  int array[6]={0}; //创建一个数组以存储6位数据

   对于(n=0;n<6;n++){

    IF (DATA & 0x01 == 0x01)  //将每个位读入数组

     array[n]=1;

    否则

     array[n]=0;

  Data>>=1;

  }

  对于(n=5;n>=0;n--){             //MSB在中的第一位

      IF (array[n]==1){

       GPIO_setOutputLowOnPin (GPIO端口P8,GPIO _PIN4);//设置clk low

       GPIO_setOutputHighOnPin (GPIO端口P4,GPIO _PIN2);//设置数据位高

       //delay_time (1);

       GPIO_setOutputHighOnPin (GPIO端口P8,GPIO _PIN4);//设置clk high

       //delay_time (1);

       //GPIO _setOutputHighOnPin (GPIO_PORT_P4,GPIO _PIN2); //确保clk 50 % 占空比

       //gPIO_setOutputLowOnPin (gPIO_PORT_P1,gPIO_PIN4);//重置clk和数据位

       //delay_time (1);

      }

      否则{

       GPIO_setOutputLowOnPin (GPIO端口P8,GPIO _PIN4);//设置clk low

       GPIO_setOutputLowOnPin (GPIO端口P4,GPIO _PIN2);//设置数据位低

       //delay_time (1);

       GPIO_setOutputHighOnPin (GPIO端口P8,GPIO _PIN4);//设置clk high

       //delay_time (1);

       //gPIO_setOutputLowOnPin (gPIO_PORT_P4,gPIO_PIN2);//以确保clk 50 % 占空比

       //gPIO_setOutputLowOnPin (gPIO_PORT_P1,gPIO_PIN4);//重置clk和数据位

       //delay_time (1);

      }

    }

}

//------------------

//延时功能

//------------------

void delay_time (无符号int毫秒)

  volatile unsigned int I,j;

   对于(i=millisecond; i>0; i--){

     用于(j=0;j<90;j++);

   }

}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////

/*

 * RTC中断服务例程

 *每~10毫秒唤醒一次以更新偷渡者

 */

/*#if defined (__TI_Compiler_version__)|| defined (__IAR_SYSTEMS _ICC__)

#pragma vector=rtc_vector

__中断

#Elif已定义(__GMNU__)

__attribute__(interrupt (RTC_vector))

#endif

void RTC_ISR(void)(作废)

  Switch(__偶 数_in_range(RTCIV, 16))

  {

  案例RTCIV_NONE:中断;   //无中断

  CASE RTCIV_RTCOFIFO:中断;   //RTCOFIFO

  案例RTCIV_RTCRDYIFG:       //RTCRDYIFG

    计数器= RTCPS;

    摄氏度= 0;

    __BIC_SR_REGISTER_ON_EXIT (LPM3_bits);

    中断;

  案例RTCIV_RTCTEVIFG:       //RTCEVIFG

    //每分钟中断一次

    __no_operation();

    中断;

  案例RTCIV_RTCAIFG:       //RTCAIFG

    __no_operation();

    中断;

  案例RTCIV_RT0PSIFG:

    厘秒= RTCPS -计数器;

    __BIC_SR_REGISTER_ON_EXIT (LPM3_bits);

    断开;  //RT0PSIFG

  案例RTCIV_RT1PSIFG:

    __BIC_SR_REGISTER_ON_EXIT (LPM3_bits);

    断开;  //RT1PSIFG

  默认值:中断;

  }

}

*/

/*

 *端口1中断服务例程

 *处理S1和S2按键中断

 */

#pragma vector = Port1_vector

__interrupt void Port1_ISR(void)

  开关(__偶 数_范围内(P1IV,P1IV_P1IFG7))

  {

    案例P1IV_NONE:中断;

    案例P1IV_P1IFG0:中断;

    CASE P1IV_P1IFG1:  //按钮S1已按下

      P1OUT || BIT0;  //打开LED1

      如果(S1buttonDebounce)== 0)

      {

        //设置第一个高到低转换时的去抖标志

        S1buttonDebounce = 1;

        HoldCount = 0;

        IF (MODE == Phase_mode)

        {

          //开始/暂停秒表

          /*stopWatchRunning ^= 0x1;

          IF (秒表运行)

            rtc_startClock(RTC_C_base);

          否则

            RTC_C_HoldClock (RTC_C_BASE);

          */

          如果(writing_data_phase =63)

            Writing_data_phase = 0;

          否则,writing_data_phase ++;

          //序列阶段(writing_data_phase);

        }

        如果(模式==衰减模式)

        {

          //启动/暂停温度传感器

          /*tempSensorRunning ^= 0x1;

          IF (温度传感器运行)

            //开始ADC转换

            ADC12_B_startConversion (ADC12_B_BASE,ADC12_B_START_AT_ADC12MEM0,ADC12_B_REALITED_SINGLECHANNEL);

          否则

            //禁用ADC转换

            ADC12_B_DisableConvers(ADC12_B_base, true);

          */

          如果(writing_data_attenuator=63)

            writing_data_attenuator=0;

          else writing_data_attenuator++;

          //serialatten (writing_data_attenuator);

        }

        //开始反跳计时器

        Timer_a_initUpMode(timer A0_base,&initUpParam_A0);

      }

      中断;

    CASE P1IV_P1IFG2 ://  按钮S2已按下

      P9OUT || BIT7;  //打开LED2

      如果(S2buttonDebounce)== 0)

      {

        //设置第一个高到低转换时的去抖标志

        S2buttonDebounce = 1;

        HoldCount = 0;

        /*开关(模式)

        {

          案例秒表模式:

            //停止时重置秒表;运行时拆分

            如果(!(stopWatchRunning))

            {

              IF (LCDCMEMCTL和LCDDISP)

                LCDCMEMCTL &=~LCDDISP;

              否则

                resetStopWatch();

            }

            否则

            {

              //使用LCD闪烁存储器在分段时间暂停/恢复秒表

              LCDBMEM[pos1]= LCDMEM[pos1];

              LCDBMEM[pos1+1]= LCDMEM[pos1+1];

              LCDBMEM[pos2]= LCDMEM[pos2];

              LCDBMEM[pos2+1]= LCDMEM[pos2+1];

              LCDBMEM[pos3]= LCDMEM[pos3];

              LCDBMEM[pos3+1]= LCDMEM[pos3+1];

              LCDBMEM[pos4]= LCDMEM[pos4];

              LCDBMEM[pos4+1]= LCDMEM[pos4+1];

              LCDBMEM[pos5]= LCDMEM[pos5];

              LCDBMEM[pos5+1]= LCDMEM[pos5+1];

              LCDBMEM[pos6]= LCDMEM[pos6];

              LCDBMEM[pos6+1]= LCDMEM[pos6+1];

              LCDBM3 = LCDM3;

              //在LCD正常/闪烁存储器之间切换

              LCDCMEMCTL ^= LCDDISP;

            }

            中断;

          案例TEMPSENSOR_MODE:

            //切换温度单位标志

            tempUnit ^= 0x01;

            //当温度传感器不运行时更新LCD

            如果(!tempSensorRunning)

              DisplayTemp();

            中断;

        }

       */

        IF (MODE == Phase_mode)

          {

          如果(writing_data_phase ==0)

            writing_data_phase =63;

          else writing_data_phase --;

          //serialphase (writing_data_phase);

          }

        如果(模式==衰减模式)

          {

          如果(writing_data_attenuator=0)

          writing_data_attenuator=63;

          else writing_data_attenuator--;

          //serialatten (writing_data_attenuator);

          }

        //开始反跳计时器

        Timer_a_initUpMode(timer A0_base,&initUpParam_A0);

      }

      中断;

    案例P1IV_P1IFG3:中断;

    案例P1IV_P1IFG4:中断;

    案例P1IV_P1IFG5:中断;

    判例P1IV_P1IFG6:中断;

    案例P1IV_P1IFG7:中断;

  }

}

/*

 *计时器A0中断服务例程

 *用作按钮恢复计时器

 */

#pragma vector = TIMER0_A0_vector

__interrupt void TIMER0_A0_ISR (void)

  //按住S1和S2两个按钮

  如果(!(P1IN和BIT1)&&!(P1IN和BIT2))

  {

    HoldCount++;

    IF (HOLDCount == 40)

    {

      //停止计时器A0

      Timer_a_stop (timer_A0_base);

      //更改模式

      如果(mode == startup_mode)

        模式=衰减模式;

      否则,如果(模式==阶段模式)

      {

        模式=衰减模式;

        //stopWatchRunning = 0;

        //按住RTC

        //RTC_C_HoldClock (RTC_C_BASE);

      }

      否则,如果(模式==衰减模式)

      {

        模式=阶段模式;

        //tempSensorRunning = 0;

        //禁用TempSensor模式使用的ADC12,TimerA1,Internal Ref和Temp

        //ADC12_B_DISABLE (ADC12_B_BASE);

        //ADC12_B_DisableConvers(ADC12_B_base, true);

        //Timer_a_stop (timer_a1_base);

      }

     // __BIC_SR_REGISTER_ON_EXIT (LPM3_BITS);         //退出LPM3

    }

  }

  //松开按钮S1

  IF (P1IN和BIT1)

  {

    S1buttonDebounce = 0;                  //清除按钮反跳

    P1OUT &=~BIT0;

  }

  //松开按钮S2

  IF (P1IN和BIT2)

  {

    S2buttonDebounce = 0;                  //清除按钮反跳

    P9OUT &=~BIT7;

  }

  //按钮S1和S2均已松开

  IF ((P1IN和BIT1)&&(P1IN和BIIT2))

  {

    //停止计时器A0

    Timer_a_stop (timer_A0_base);

  }

  // if (模式==阶段模式||模式==衰减模式)

   // __BIC_SR_REGISTER_ON_EXIT (LPM3_BITS);       //退出LPM3

}

/*

 * ADC 12中断服务例程

 *从LPM3唤醒以显示温度

 */

/*#pragma vector=ADC12_vector

__interrupt void ADC12_ISR(void)

  Switch(__偶 数_in_range(ADC12IV,12))

  {

  案例 0:中断;             //矢量 0: 无中断

  案例 2:中断;             //矢量 2: ADC12BMEMx溢出

  案例 4:中断;             //矢量 4: 转换时间溢出

  案例 6:中断;             //向量 6: ADC12BHI

  案例 8:中断;             //矢量 8: ADC12BLO

  案例10:中断;             //矢量10: ADC12BIN

  案例12:                 //向量12: ADC12BMEM0中断

    ADC12_B_clearInterrupt (ADC12_B_BASE,0,ADC12_B_IFG0);

    __BIC_SR_REGISTER_ON_EXIT (LPM3_bits); //退出活动CPU

    中断;                //从0 (SR)清除CPUOFF位

  判例14:中断;             //矢量14: ADC12BMEM1

  判例16:中断;             //矢量16: ADC12BMEM2

  判例18:中断;             //向量18: ADC12BMEM3

  案例20:中断;             //向量20: ADC12BMEM4

  判例22:中断;             //矢量22: ADC12BMEM5

  案例24:中断;             //矢量24: ADC12BMEM6

  判例26:中断;             //矢量26: ADC12BMEM7

  判例28:中断;             //矢量28: ADC12BMEM8

  案例30:中断;             //向量30: ADC12BMEM9

  判例32:中断;             //矢量32: ADC12BMEM10

  判例34:中断;             //矢量34: ADC12BMEM11

  判例36:中断;             //矢量36: ADC12BMEM12

  判例38:中断;             //矢量38: ADC12BMEM13

  判例40:中断;             //矢量40: ADC12BMEM14

  判例42:中断;             //矢量42: ADC12BMEM15

  判例44:中断;             //矢量44: ADC12BMEM16

  判例46:中断;             //矢量46: ADC12BMEM17

  判例48:中断;             //矢量48: ADC12BMEM18

  判例50:中断;             //矢量50: ADC12BMEM19

  判例52:中断;             //矢量52: ADC12BMEM20

  判例54:中断;             //矢量54: ADC12BMEM21

  判例56:中断;             //矢量56: ADC12BMEM22

  判例58:中断;             //矢量58: ADC12BMEM23

  判例60:中断;             //向量60: ADC12BMEM24

  判例62:中断;             //矢量62: ADC12BMEM25

  判例64:中断;             //矢量64: ADC12BMEM26

  判例66:中断;             //矢量66: ADC12BMEM27

  判例68:中断;             //矢量68: ADC12BMEM28

  判例70:中断;             //矢量70: ADC12BMEM29

  判例72:中断;             //矢量72: ADC12BMEM30

  判例74:中断;             //矢量74: ADC12BMEM31

  判例76:中断;             //矢量76: ADC12BRDY

  默认值:中断;

  }

}

*/

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好,
    您的主要问题是未定义的符号。 下面的链接描述了这种情况的含义:
    processors.wiki.ti.com/.../Build_Errors_in_CCS

    您可能缺少一些定义这些缺失符号的库。 检查是否已将所有必要的库添加到项目中。

    谢谢
    KI
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    此错误消息的一般说明可在此处找到:

    http://processors.wiki.ti.com/index.php/Build_Errors_in_CCS#Error:_unresolved_symbols_remain

    在您的情况下,您缺少列出的所有符号的定义。 这些通常来自driverlib。 MSPWare中的MSP430示例通常将driverlib源目录直接添加到项目中,以便解析对driverlib代码中定义的符号的引用。 尝试对项目执行相同操作。 您可以在MSPWare中导入其中一个驱动程序库示例,并将其用作参考。