新聞中心

        MSP430之解錯篇

        作者: 時間:2016-11-28 來源:網(wǎng)絡 收藏

        【記住】接口別忘設置!

        本文引用地址:http://www.104case.com/article/201611/323028.htm

        1、設置IAR軟件Tab鍵縮進字符個數(shù)

        方法:Tools-Options-Editor-Tab Size,按習慣改后面數(shù)字.

        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

        原因:我把定義的數(shù)組unsigned char ReadingData[7];放在.h的文件中編譯出現(xiàn)

        這樣的錯誤

        解決:把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_win32aserepo下的vcredist_x86_2005

        5、Error[Pe127]: expected a statement 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;

        多加的“;”就會使程序出現(xiàn)上述錯誤。

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

        (MSP430G2xx2)

        解決:檢查目標板上芯片型與CCS工程設置芯片型是否一致。大部分是匹配不一致的

        問題。

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

        解決:使用強制轉(zhuǎn)換語句,把float數(shù)據(jù)轉(zhuǎn)化成integer類型數(shù)據(jù)。這樣防止數(shù)據(jù)出錯。



        關(guān)鍵詞: MSP430解

        評論


        技術(shù)專區(qū)

        關(guān)閉
        主站蜘蛛池模板: 曲水县| 浦城县| 囊谦县| 宜章县| 邢台县| 论坛| 舟山市| 双牌县| 托里县| 武夷山市| 阿坝县| 久治县| 宣化县| 南京市| 东辽县| 娱乐| 普兰县| 思茅市| 孟州市| 五大连池市| 北安市| 安龙县| 新平| 盐津县| 浦县| 沭阳县| 温宿县| 常山县| 中宁县| 南溪县| 宜兴市| 邛崃市| 涞水县| 扶沟县| 岳普湖县| 商都县| 枞阳县| 青州市| 盐边县| 岑溪市| 冕宁县|