IAR软件错误调试_第1页
IAR软件错误调试_第2页
IAR软件错误调试_第3页
IAR软件错误调试_第4页
IAR软件错误调试_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

使用使用 IAR 时遇到的一些时遇到的一些 Error Waring 作为菜虫 在使用 IAR 的时候编写 CC2430 Z Stack2006 程序会遇到如下一些 错误 当然随着学习的深入 我会持续更新 1 Q Error e16 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 XDATA 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 ef SFR AN A 其实这个问题并不是你的程序本身有问题 主要是因为你编写的程序太大了 超出 了芯片本身的定义 今天在群里学习了一招 就是将数组定义到 code 里 我们看 一下例子 我们定义一个 5100 个元素的数组 有以下两种方法 mermaid 提出的方法是 typedef unsigned char const code INT8U extern INT8U shuzi 5100 文晶提出的方法是 INT8U code shuzi 5100 这两种方法其实效果是一致的 定义完数组之后 调用的部分就是需要用指针来调 用数组里面的数值了 2 Q 烧写程序时无法跳入断点 为什么我每次烧程序都出现 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 Tool Options dialog box 的警告 但是程序能烧进去 只是不能调试 A 确认设置没有问题 和好用的工程相比 这是设置不对 请找下面顺序修改 iar options linker output format 选择 Debug information for c SPY 选项 3 Q 错误提示 Fatal Error Cp001 Copy protecTIon check No valid license found for this product 20 A 可以将 IAR 全部安装上 但是在编译文件时却会报这个错 原因是安装的时候 没有把注册机的 0 x 字串的小写字母改为大写字母 4 Q Error e16 Segment CSTACK size 0 x50 align 0 x1 is too long for segment definition At least 0 x50 more bytes needed The problem occurred while processing the segment placement command Z DATA CSTACK STACK SIZE A 此错误是所定义的全局变量和数组缓冲区等所占的 RAM 超出硬件支持所致 size 0 x50 为超出的大小 只要减少不不要的全局变量和尽量缩小数组缓冲区 就可以了 5 Q Warning Pe001 last line of file ends without a newline F emoTion IAR PK 升 级 CC1110 8 main c 179 A 在使用 IAR 时常常会弹出类似这样一个警告 其实只要在最后一行多加一个回车 就不会再有这个警告了 6 Q 在编写一个串口程序时 编译没有错 但 MAKE 时就出现下面的错误 undefined external UART1 ISR referred in startup A 串口 1 中断向量没有定义 实际上是串口 1 中断向量定义其他名称 而不是 UART1 ISR 出现这样的调试 IAR 错误时 Fatal error Unknown exception in driver E1 是因为 IAR 软件没有跟 Texas Instruments 文件放在同一个系统盘下 7 Q Fatal Error e72 Segment BANK RELAYS must be defined in a segment definition option Z b or P A 使用无线龙的串口互发 发现上述错误 原因是版本太高 具体原因不清 下 载一下 7 20H 就可以了 8 Q Error Pe136 struct has no field SampleApp Periodic DstAddr D Program Files Texas Instruments ZStack 1 4 3 1 2 1 Projects zstack Samples SampleApp Source SampleApp c 417 afAddrType t dstAddr dstAddr addrMode afAddrBroadcast dstAddr addr shortAddr 0 xFFFF 广播发送 cdwxl dstAddr endpoint SAMPLEAPP ENDPOINT error 所在 A 我们看看 afAddrType t 这个结构就明白错在哪里了 typedef struct union uint16 shortAddr addr afAddrMode taddrMode byteendPoint afAddrType t 居然是 endPoint 大小写错误 9 Q 我最开始也是 IAR 仿真时找不到 main 函数 显示 Fri Jun 11 14 37 00 2010 Error col 1 Unknown or ambiguous symbol main Fri Jun 11 14 37 01 2010 Error col 1 Unknown or ambiguous symbol main Fri Jun 11 14 37 01 2010 Couldn t go to main 之后在 project options linker 里面的 format 设成 debug 没有这个 问题了 但是 程序又不能通过 TI 的那个 Flash Programmer 下载到板子里了 说是 Could not open specified HEX file A 这个烧录工具只认 release code 而且扩展名必须是 hex 所以要用这个烧录工具来烧录必须做两件事 1 output file 设为 release version 2 output file 扩展名改为 hex 默认的是 a51 测试学习阶段可以不用 但产品量产就必须生成二进制文件 同时 programmer 还有些其它的功能会常用的 10 Q Warning Pe188 enumerated type mixed with another type D Program Files Texas Instruments ZStack 1 4 3 Projects zstack Samples SampleApp Source SampleApp c 206 A SampleApp Periodic DstAddr addrMode Addr16Bit afAddrMode t afAddrGroup typedef enum afAddrNotPresent AddrNotPresent afAddr16Bit Addr16Bit afAddrGroup AddrGroup afAddrBroadcast AddrBroadcast afAddrMode t 问题就在于 Addr16Bit 未加 afAddrMode t 这个套子 11 Q Error Pe513 a value of type int uint8 uint8 cannot be assigned to an entity of type halUARTCBack t D Program Files Texas Instruments ZStack 1 4 3 1 2 1 Components stack sapi sapi c 968 A 估计是一个函数本没有返回值即 void 类型 而你却将这个函数赋给了一个 int 型变量了 static rxCB uint8 port uint8 event 改为 static void rxCB uint8 port uint8 event 12 Q Warning Pe177 function rxCB was declared but never referenced D Program Files Texas Instruments ZStack 1 4 3 1 2 1 Components stack sapi sapi c 982 A 函数虽定义但从未被引用 使用 如果你需要使用该函数 就需要检查 否则略过 13 Q Fri Jun 11 14 37 00 2010 Error col 1 Unknown or ambiguous symbol main Fri Jun 11 14 37 01 2010 Error col 1 Unknown or ambiguous symbol main Fri Jun 11 14 37 01 2010 Couldn t go to main A project options linker 看看里面的 format 是不是设成 debug 详见 14 Q Error e46 Undefined external program start referred in ABS ENTRY MOD A 该问题应该是 IAR 设置问题 具体设置如下 Project Option Linker Config 勾选 Override default program 再选择 Defined by application 15 Q Fatal Error Cp001 Copy protection check No valid license found for this product 24 XP 下装的 IAR 到了 Win7 下出来的问题 A 这个问题是使用注册机带来的 系统换了 本机 ID 也要改了 单击 IARID EXE 得到本机的 ID 号 右键点 Key cmd 选择编辑 打开 将 ID 修改为本机 ID 运行 KEY cmd 在 key txt 中的含有 EW8051 EV 的序列号就是 7 30 的序 列号 16 Q 在用 iar debug 下载进已有程序板子出现的 A 将核心板与扩展板分开 只烧写核心板 17 Q A 自小峰关于协议栈 XDATA 溢出的小结 1 减小程序 减小程序 2 把配置文件把配置文件 f8w2430 xcl f8w2430pm xcl 中的中的 D CODE END 改大点 改大点 f8w2430 xcl CODE These settings determine the size location of the ROOT segment Increase CODE END to increase ROOT memory i e for constants D CODE START 0 x0000 Code size 128k for CC2430 F128 D CODE END 0 x4000 Last a

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论