新闻中心

EEPW首页>嵌入式系统>设计应用> MSP430单片机查错

MSP430单片机查错

作者: 时间:2016-11-13 来源:网络 收藏
1、设置IAR软件Tab键缩进字符个数

方法:Tools-Options-Editor-Tab Size,按习惯改后面数字.

本文引用地址://m.amcfsurvey.com/article/201611/316495.htm

2、Error[e46]: Undefined external "LcdInit" referred in main( E:MSP430

UDPDebugObjmain.r43 )

原因:工程中有多个.c文件,但不在工程中.

解决:把.c文件加到工程里。

3、Error[e27]: Entry "ReadingData" in module DS1302 ( E:MSP430

ModuleDS1302DebugObjDS1302.r43 ) redefined in module main

原因:我把定义的数组unsigned char ReadingData[7];放在.h的文件中编译出现

这样的错误

解决:把unsigned char ReadingData[7];放在.c文件中

4、An error has occured.See the log file C...workspace_v5_1.metadata.log

解决:安装目录CCS5.1CCS5.1.1.00031_win32baserepo下的vcredist_x86_2005

5、Error[Pe127]: expected astatement E:MSP430ModuleTFTSD.c 95

Error[Pe018]: expected a ")" E:MSP430ModuleTFTSD.c 132

解决:仔细检查下程序,看有没有一些语法上的错误。比如:

#define SPI_DO_H P1OUT |= BIT0; //P1.0

#define SPI_DO_L P1OUT &= ~BIT0;

多加的“;”就会使程序出现上述错误。

6、The target setup(MSP430G2xx3) does not match the actual target tpe

(MSP430G2xx2)

解决:检查目标板上芯片型与CCS工程设置芯片型是否一致。大部分是匹配不一致的

问题。

7、Warning[Pa093]:implicit conversion from floating point to integer。

解决:使用强制转换语句,把float数据转化成integer类型数据。这样防止数据出错。



关键词:MSP430单片机查

评论


技术专区

关闭