首页 IAR软件应用中的错误提示及解决方法

IAR软件应用中的错误提示及解决方法

举报
开通vip

IAR软件应用中的错误提示及解决方法IAR软件应用中的错误提示及解决方法 1、Q: Error[e16]: Segment XDATA_Z (size: 0x19a1 align: 0) is too long for segment definition. At least 0xe4c more bytes needed. The problem occurred while processing the segment placement command "-Z(XDATA)XDATA_N,XDATA_Z,XDATA_I=_XDATA_START...

IAR软件应用中的错误提示及解决方法
IAR软件应用中的错误提示及解决方法 1、Q: Error[e16]: Segment XDATA_Z (size: 0x19a1 align: 0) is too long for segment definition. At least 0xe4c 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全部安装上,但是在编译文件时却会报这个错,原因是安装的时候没有把注册机的0x.....字串的小写字母改为大写字母。 /********************************************************************* * */ 4、Q: “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#", ” A: 此错误是所定义的全局变量和数组缓冲区等所占的RAM超出硬件支持所致:size: 0x50为超出的大小。只要减少不不要的全局变量和尽量缩小数组缓冲区就可以了! /********************************************************************* * */ 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 = 0xFFFF; // 广播发送 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 Fatal Error[e72]: Segment BANK_RELAYS must be defined in a segment definition option (-Z, -b or -P) 使用无线龙的串口互发,发现上述错误,原因是版本太高,具体原因不清,下载一下7.20H就可以了 17 烧写程序时无法跳入断点,为什么我每次烧程序都出现: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.)的警告。但是程序能烧进去,只是不能调试。 确认设置没有问题(和好用的工程相比)这是设置不对,请找下面顺序修改: iar->options->linker->output->format; 选择 Debug information for c-SPY选项 3 /********************************************************************* * */ 错误提示: Fatal Error[Cp001]: Copy protecTIon check, No valid license found for this product [20] 可以将IAR全部安装上,但是在编译文件时却会报这个错,原因是安装的时候没有把注册机的0x.....字串的小写字母改为大写字母。 /********************************************************************* * */ 4 "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#", " 此错误是所定义的全局变量和数组缓冲区等所占的RAM超出硬件支持所致:size: 0x50 为超出的大小。只要减少不不要的全局变量和尽量缩小数组缓冲区就可以了! /********************************************************************* * */ 5 Warning[Pe001]: last line of file ends without a newline F:\emoTion\IAR\PK 升级\CC1110-8\main.c 179 在使用IAR时常常会弹出类似这样一个警告,其实只要在最后一行多加一个回车就不会再有这个警告了. /********************************************************************* * */ 6 在编写一个串口程序时:编译没有错,但MAKE时就出现下面的错误 undefined external"UART1_ISR"referred in startup 串口1中断向量没有定义,实际上是串口1中断向量定义其他名称,而不是UART1_ISR. 出现这样的调试IAR错误时:Fatal error: Unknown exception in driver (#E1),是因为IAR软件没有跟Texas Instruments文件放在同一个系统盘下 7 Error[e16]: Segment XDATA_Z (size: 0x19a1 align: 0) is too long for segment definition. At least 0xe4c 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 其实这个问题并不是你的程序本身有问题,主要是因为你编写的程序太大了,超出了芯片本身的定义。今天在群里学习了一招,就是将数组定义到code里,我们看一下例子。我们定义一个 5100个元素的数组,有以下两种方法: mermaid提出的方法是: typedef unsigned char const __code INT8U; extern INT8U shuzi[5100]; 文晶提出的方法是 INT8U code shuzi[5100]; 这两种方法其实效果是一致的,定义完数组之后,调用的部分就是需要用指针来调用数组里面的数值了。 
本文档为【IAR软件应用中的错误提示及解决方法】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_906023
暂无简介~
格式:doc
大小:44KB
软件:Word
页数:7
分类:
上传时间:2012-11-05
浏览量:362