资源预览内容
第1页 / 共26页
第2页 / 共26页
第3页 / 共26页
第4页 / 共26页
第5页 / 共26页
第6页 / 共26页
第7页 / 共26页
第8页 / 共26页
第9页 / 共26页
第10页 / 共26页
亲,该文档总共26页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
无编号警告类型:1、 Sat Jun 23, 2012 17:41:05: The stack pointer for stack Stack (currently Memory:0xF5336) is原因:http:/blog.sina.com.cn/s/blog_4c0cb1c0010153l9.htmlIAR 相关设置:Tools-Option-Stack-Warn when stack pointer is out of bounds.2、无法查看结构体/共同体/ 联合体 变量Syntax error, unexpected $end, expecting COLON2 column 1struct drpointuint16 x;uint16 y; drpoint10;改成:struct uint16 x;uint16 y; drpoint10;参考:http:/tech.groups.yahoo.com/group/lpc2000/messages/34213?threaded=1&m=e&var=1&tidx=1UESTC 2012.12IAR 各版本 BUG 错误修正历史: ftp:/efo-6.ip.peterstar.net/pub/efo-ftp/TMP/pub/atmel/_AVR32_MCUs_32bit/Compilers/IAR/IAR_2.20/Install software/EWAVR32-KS-CD-220A/doc/common/doc/CorrectedProblems.pdf有编号警告类型:Errore16: 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-fd53Reserved ranges relevant to this placement:XDATA:f000-f1fe XSTACKXDATA:f1ff-fd53 XDATA_NBIT:0-7 BREGBIT:80-97 SFR_ANBIT:a8-af SFR_ANBIT:b8-c7 SFR_ANBIT:d8-df SFR_ANBIT:e8-ef SFR_ANA:其实这个问题并不是你的程序本身有问题,主要是因为你编写的程序太大了,超出了芯片本身的定义。今天在群里学习了一招,就是将数组定义到 code 里,我们看一下例子。我们定义一个 5100 个元素的数组,有以下两种方法:mermaid 提出的方法是:typedef unsigned char const _code INT8U;extern INT8U shuzi5100;文晶提出的方法是INT8U code shuzi5100;这两种方法其实效果是一致的,定义完数组之后,调用的部分就是需要用指针来调用数组里面的数值了。Errore16: Segment DATA16_I (size: 0xa80 align: 0x1) is too long for segment definition. At least 0x27f more bytes needed. Theproem occurred while processing the segment placement command-Z(DATA)DATA16_I,DATA16_Z,DATA16_N,HEAP+_HEAP_SIZE=0200-0A00, where at the moment of placement the ailaememory ranges were CODE:200-A00经过验证是由于 RAM 耗尽,程序里估计有很大的数据量,最好使用 const 定义到 FLASH 里面,问题基本可以解决。Errore16: Segment DATA16_Z (size: 0x6b9 align: 0x1) is too long for segment definition. At least 0x317 more bytes needed. The problem occurred while processing the segment placement command -Z(DATA)DATA16_I,DATA16_Z,DATA16_N,TLS16_I,DATA16_HEAP+_DATA16_HEAP_SIZE=0200-09FF, where at the moment of placement the available memory ranges were CODE:5ce-5ff,CODE:602-605,CODE:609-60b,CODE:60d-60d,CODE:60f-61b,CODE:61e-63f,CODE:642-645,CODE:649-64b,CODE:64d-64d,CODE:64f-65b,CODE:65e-9ffReserved ranges relevant to this placement:可能的原因:1、设置的某个数组过大,超过了设置的堆栈。2、设置的堆栈不够大3、选择的型号不对(编写的程序是用在 RAM 较大的一个单片机上的,IAR 里选择的却是 RAM 较小的一个型号)UESTC 2013.3.8 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.)的警告。但是程序能烧进去,只是不能调试。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 全部安装上,但是在编译文件时却会报这个错,原因是安装的时候没有把注册机的 0x.字串的小写字母改为大写字母。4Q:“Errore16: 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 为超出的大小。只要减少不不要的全局变量和尽量缩小数组缓冲区就可以了!5Q:7Q:ErrorPe018: expected a ) C:Documents and SettingsAdministrator桌面CraneCrane 塔吊防碰撞系统 1.1 版(SIM908 倾角查询)5438A 塔吊防碰撞 1.1api_function.h 51、函数或者语句中有变量名复用:#define length 50 / 吊臂长度extern int dec_to_bcd(int dec_dat, unsigned char *bcd, int length);将以上的变量名之一换做别的即可解决。UESTC 2012.3.27Errore27:(变量没有 extern 声明外部可调用) uestchttp:/blog.sina.com.cn/s/blog_4c0cb1c00100z0w1.htmlErrore27: Entry ER_WARN in module AD () redefined in module FINGERPRINT ()解决方法是把变量定义在其中一个 cpp 文件里面,然后在另一个文件里面用 extern 来引用。sample:文件一:int a=0;文件二:extern int a; /此处不能使他等于某个数就可以了,如果此处 a 再赋值 extern int a=0;就会报错 e27以为我在 x.h 文件中定义有变量,然后 x.h 放入 config.h 中,config.h 被其他的各个.c 文件包含,就造成了,x.h 中的变量在各个.c 中定义,造成了重复定义。 UESTC 2012.3.27相关问答:http:/topic.csdn.net/u/20120222/22/c9b258d3-f58e-49dc-bf97-630271a26dfc.html14Q:Errore46:Undefined external _program_start referred in ?ABS_ENTRY_MOD ( )A:该问题应该是 IAR 设置问题,具体设置如下:Project-Option-Linker-Config 勾选Override default program再选择Defined by applicationB、 static ( const)变量是不能被外部文件调用的 ( ? )C、只包含了.h 文件, .c 文件没有添加进工程从 debug 切换到 release 出现错误:release 不会自动继承 debug 的设置,需要自己重新设置:snprintf、fmax 、fmin 这些函数都能在 IAR 帮助中找到,但是却出现下面错误:Errore46: Undefined external fmax referred in cacu_protect ( C:Documents and SettingsAdministrator桌面塔吊安全监控系统-终版 塔吊安全监控系统-终版ReleaseObjcacu_protect.r43 )Errore46: Undefined external fmin referred in cacu_protect ( C:Documents and SettingsAdministrator桌面塔吊安全监控系统-终版 塔吊安全监控系统-终版ReleaseObjcacu_protect.r43 )Errore46: Undefined external snprintf referred in gprs_8 ( C:Documents and SettingsAdministrator桌面塔吊安全监控系统-终版 塔吊安全监控系统-终版ReleaseObjgprs_8.r43 )Error while
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号