在使用IAR的时候编写CC2430程序会遇到如下错误: 1 Error[e16]: Segment XDATA_Z (size: 0x19a1 align: 0) is too long forsegment definition. At least 0xe4c more bytes
needed. The problem occurred while processing the segment placementcommand
"-Z(XDATA)XDATA_N,XDATA_Z,XDATA_I=_XDATA_START-_XDATA_END", whereat the moment of
placement the available memory ranges were"XDATA:f1ff-fd53"
Reservedranges 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]; 这两种方法其实效果是一致的,定义完数组之后,调用的部分就是需要用指针来调用数组里面的数值了。 2 烧写程序时无法跳入断点 | 为什么我每次烧程序都出现:The stack plug-in failed to set a breakpoint on"main". The Stack window will not be able to display stackcontents. (You can change this setting in the Tool>Optionsdialog box.)的警告。但是程序能烧进去,只是不能调试。 确认设置没有问题(和好用的工程相比)
|
| 这是设置不对,请找下面顺序修改: iar->options->linker->output->format;
选择 Debug information for c-SPY选项 |
|
3 错误提示: Fatal Error[Cp001]: Copy protecTIon check, No valid license foundfor this product [20] 可以将IAR全部安装上,但是在编译文件时却会报这个错,原因是安装的时候没有把注册机的0x.....字串的小写字母改为大写字母。 4 “Error[e16]: Segment CSTACK (size: 0x50 align: 0x1) is too long forsegment definition. At least 0x50 more bytes needed. The problemoccurred while processing the segment placement command"-Z(DATA)CSTACK+_STACK_SIZE#", ” 此错误是所定义的全局变量和数组缓冲区等所占的RAM超出硬件支持所致:size: 0x50为超出的大小。只要减少不不要的全局变量和尽量缩小数组缓冲区就可以了! 5 Warning[Pe001]: last line of file ends without a newlineF:\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
Fatal Error[e72]: Segment BANK_RELAYS must be defined in a segmentdefinition option (-Z, -b or -P) 使用无线龙的串口互发,发现上述错误,原因是版本太高,具体原因不清,下载一下7.20H就可以了
|