2022年IAR软件错误调试 .pdf
《2022年IAR软件错误调试 .pdf》由会员分享,可在线阅读,更多相关《2022年IAR软件错误调试 .pdf(8页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、使用 IAR 时遇到的一些Error 、Waring http:/ 的时候编写 CC2430 、Z-Stack2006 程序会遇到如下一些错误,当然随着学习的深入,我会持续更新。1Q:Errore16: Segment XDATA_Z (size: 0 x19a1 align: 0) is too long for segment definition. At least 0 xe4c more bytes needed. The problem occurred while processing the segment placement command -Z(XDATA)XDATA_N,X
2、DATA_Z,XDATA_I=_XDATA_START-_XDATA_END, where at the moment of placement the available memory ranges were XDATA:f1ff-fd53 Reserved ranges relevant to this placement: XDATA:f000-f1fe XSTACK XDATA:f1ff-fd53 XDATA_N BIT:0-7 BREG BIT:80-97 SFR_AN BIT:a8-af SFR_AN BIT:b8-c7 SFR_AN BIT:d8-df SFR_AN BIT:e8
3、-ef SFR_ANA:其实这个问题并不是你的程序本身有问题,主要是因为你编写的程序太大了,超出了芯片本身的定义。今天在群里学习了一招,就是将数组定义到code 里,我们看一下例子。我们定义一个5100 个元素的数组,有以下两种方法:mermaid 提出的方法是:typedef unsigned char const _code INT8U;名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 8 页 - - - - - - - - - extern INT8U shuzi51
4、00;文晶提出的方法是INT8U code shuzi5100;这两种方法其实效果是一致的,定义完数组之后,调用的部分就是需要用指针来调用数组里面的数值了。2Q:烧写程序时无法跳入断点为什么我每次烧程序都出现: The stack plug-in failed to set a breakpoint on main. The Stack window will not be able to display stack contents. (You can change this setting in the ToolOptions dialog box.)的警告。但是程序能烧进去, 只是不能调
5、试。A:确认设置没有问题(和好用的工程相比)这是设置不对 ,请找下面顺序修改 :iar-options-linker-output-format; 选择 Debug information for c-SPY选项3Q:/* * */错误提示:Fatal ErrorCp001: Copy protecTIon check, No valid license found for this product 20A:可以将 IAR 全部安装上,但是在编译文件时却会报这个错,原因是安装的时候没有把注册机的 0 x.字串的小写字母改为大写字母。名师资料总结 - - -精品资料欢迎下载 - - - - -
6、- - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 8 页 - - - - - - - - - /* * */4Q:“Errore16: Segment CSTACK (size: 0 x50 align: 0 x1) is too long for segmentdefinition. At least 0 x50 more bytes needed. The problem occurred while processing the segment placement command -Z(DATA)CSTACK+_STACK_SI
7、ZE#, ”A:此错误是所定义的全局变量和数组缓冲区等所占的RAM 超出硬件支持所致:size: 0 x50 为超出的大小。 只要减少不不要的全局变量和尽量缩小数组缓冲区就可以了!/* * */5Q:WarningPe001: last line of file ends without a newline F:emoTionIARPK升级CC1110-8main.c 179 A:在使用 IAR 时常常会弹出类似这样一个警告,其实只要在最后一行多加一个回车就不会再有这个警告了 ./* * */6Q:在编写一个串口程序时:编译没有错,但MAKE 时就出现下面的错误undefined extern
8、al“UART1_ISR ”referred in startupA:名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 8 页 - - - - - - - - - 串口1 中断向量没有定义,实际上是串口1 中断向量定义其他名称,而不是UART1_ISR.出现这样的调试IAR 错误时: Fatal error: Unknown exception in driver (#E1),是因为 IAR 软件没有跟 Texas Instruments 文件放在同一个系统盘下7Q:Fat
9、al Errore72: Segment BANK_RELAYS must be defined in a segment definition option (-Z, -b or -P)A:使用无线龙的串口互发, 发现上述错误, 原因是版本太高, 具体原因不清, 下载一下 7.20H 就可以了8 Q:ErrorPe136: struct has no field SampleApp_Periodic_DstAddr D:Program FilesTexas SampleApp.c 417/-/ afAddrType_t dstAddr; dstAddr.addrMode = afAddrBr
10、oadcast; dstAddr.addr.shortAddr = 0 xFFFF; / 广播发送cdwxl dstAddr.endpoint = SAMPLEAPP_ENDPOINT;/error 所在/-/A:我们看看 afAddrType_t 这个结构就明白错在哪里了。typedef struct union 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 8 页 - - - - - - - - - uint16 shortAddr; addr; afAddrMod
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年IAR软件错误调试 2022 IAR 软件 错误 调试
限制150内