<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          IAR編譯常見錯(cuò)誤

          作者: 時(shí)間:2016-11-28 來(lái)源:網(wǎng)絡(luò) 收藏
          Error[Cp001]: Copy protection check, No valid license found for this prod t [20]

          原因:安裝的時(shí)候沒有把注冊(cè)機(jī)的0x.....字串的小寫字母改為大寫字母。

          本文引用地址:http://www.ex-cimer.com/article/201611/322906.htm

          Warning[Pe001]: last line of file ends without a newline F:emoTionIARPK升級(jí)CC1110-8main.c

          原因:在使用IAR時(shí)常常會(huì)彈出類似這樣一個(gè)警告,其實(shí)只要在最后一行多加一個(gè)回車就不會(huì)再有這個(gè)警告了.

          Error[e72]: Segment BANK_RELAYS must be defined in a segment definition option (-Z, -b or -P)

          原因:這是用730B編譯的錯(cuò)誤,可能是由于相對(duì)于目標(biāo)工程版本過(guò)高的,后改用720H,沒有發(fā)生錯(cuò)誤。

          Error[Pe005]: could not open source file "stdio.h"

          原因:頭文件路徑不對(duì)造成,改正的方法是在設(shè)置選項(xiàng)卡的C/C++ Compiler -> Preprocessor選項(xiàng)里,將$TOOLKIT_DIR$INCCLIB添到Incl? paths中。

          Error[Pe005]:could not open source file "hal.h" C:UsersuserDesktop例子程序無(wú)線通信綜合測(cè)試Librarycc2430HALsourcesetTimer34Period.c

          原因:先檢查C:UsersuserDesktop例子程序無(wú)線通信綜合測(cè)試Librarycc2430HALsource有無(wú)setTimer34Period.c這個(gè)文件,若有,則是因?yàn)镮AR對(duì)中文路徑支持不好的緣故,把這個(gè)工程復(fù)制到英文路徑下編譯就不會(huì)發(fā)生錯(cuò)誤。

          Error[e16]: Segment CODE_C (size: 0x1869 align: 0) is too long for segment definition. At least 0x1259 more bytes needed.

          原因:CODE不夠了,在xcl文件中修改其大小,0x28FF+0x1259=0x3B58,設(shè)置為-D_CODE_END=0x3B58

          Error[e16]: Segment XDATA_Z (size: 0x1ea7 align: 0) is too long for segment definition. At least 0x2a7 more bytes

          原因:在xcl文件里修改段大小,-D_IXDATA_END=0xFD53// Revison D (this setting is safe for all revisions)還有可能是定義的大數(shù)組太多了,有時(shí)候某些函數(shù)中定義的數(shù)組有點(diǎn)大,在主函數(shù)中單獨(dú)測(cè)試這個(gè)函數(shù)時(shí)不會(huì)報(bào)錯(cuò)

          Error[e16]: Segment CSTACK (size: 0x50 align: 0x1) is too long for segment definition. At least 0x50 more bytes needed. The problem occurred while processing the segment placement command "-Z(DATA)CSTACK+_STACK_SIZE#",

          原因:此錯(cuò)誤是所定義的全局變量和數(shù)組緩沖區(qū)等所占的RAM超出硬件支持所致,size: 0x50為超出的大小。只要減少不要的全局變量和盡量縮小數(shù)組緩沖區(qū)就可以了!

          Error[e46]: Undefined external "OnBoard_SendPhoto::?relay" referred in hal_key ( C:Texas InstrumentsZStack-1.4.3-1.2.1ProjectszstackSamplesSimpleAppCC2430DBSimpleControllerEBObjhal_key.r51 )

          原因:只有沒有找到該函數(shù)的定義OnBoard_SendPhoto(),只有聲明和使用。一般在鏈接時(shí)發(fā)生此錯(cuò)誤。

          Error[e89]:Too m h object code prod ed(more than 0x1000 bytes)for this package

          原因:4K限制版,請(qǐng)使用非限制版的。

          IAR常見錯(cuò)誤請(qǐng)先從以下幾個(gè)方面入手:

          1、序列號(hào)是否正確。

          2、使用版本是否正確,應(yīng)該使用7.30B打開的工程文件不能用7.20H打開。

          3、盡量不要使用中文路徑。

          4、Zigbee協(xié)議棧文件夾需要放在IAR安裝盤根目錄下。

          5、請(qǐng)確定當(dāng)前編譯文件夾是否有讀寫權(quán)限。

          6、使用的版本是否為限制版。

          下面是我自己的補(bǔ)充(不斷更新哦)

          1.Error[e16]: Segment CODE (size: 0xffe align: 0x1) is too long for segment definition. At least 0x4a more bytes needed. The problem occurred while processing the segmentplacement command "-Z(CODE)CODE=_..X_FLASH_BASE-_..X_FLASH_END", where at the moment of placement the available memory ranges were "CODE:4b-fff"

          Reserved ranges relevant to this placement:

          CODE:34-44NEAR_F
          CODE:45-4aINITTAB

          CODE:4b-fffCODE

          這個(gè)我的修改是 project options---->C/C++ Compiler----->Optimizations(最優(yōu)化)----->size----->High(maximum optimization)

          也就是,將代碼最大限度的優(yōu)化,以節(jié)省空間。
          2.configuration is up-to-data.

          在新建工程時(shí),添加程序文件,需注意,必須添加有效的.c或者匯編文件。

          嘿嘿,筆者新建工程時(shí),保存的.c文件經(jīng)常忘記加后綴,添加進(jìn)入工程時(shí),系統(tǒng)無(wú)法識(shí)別,這種低級(jí)錯(cuò)誤寫出來(lái)是自己提醒自己的。

          3. Warning[Pe069]: integer conversion resulted in truncation程序如下:
          #define SEG_A~0x04
          #define SEG_B~0x01
          #define SEG_C~0x40
          #define SEG_D~0x10
          #define SEG_E~0x08
          #define SEG_F~0x02
          #define SEG_G~0x80
          #define SEG_H~0x20

          SEG_A&SEG_B&SEG_G&SEG_D&SEG_E,//2

          原因:后來(lái)將SEG_A到SEG_H的值求出來(lái)之后,eg,~0x04改為0xFB.問(wèn)題就解決,因該是以數(shù)組中計(jì)算量過(guò)復(fù)雜。



          關(guān)鍵詞: IAR編譯常見錯(cuò)

          評(píng)論


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

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();