微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > IAR编译出现问题

IAR编译出现问题

时间:10-02 整理:3721RD 点击:
大家好,我是直接打开别人的实验资料,什么都没有改动,只是编译了一下,但是出现这样情况 Building configuration: SimpleBLETest - CC2541 Updating build tree... Linking Error[e16]: Segment ISTACK (size: 0xc0 align: 0) is too long for segment definition. At least 0xd more bytes needed. The problem occurred while processing the segment placement command "-Z(IDATA)ISTACK+_IDATA_STACK_SIZE#08-_IDATA_END", where at the moment of placement the available memory ranges were "IDATA:4d-ff" Reserved ranges relevant to this placement: IDATA:8-1f VREG IDATA:21-40 VREG IDATA:41-42 XSP IDATA:43-4a DATA_Z IDATA:4b-4c IDATA_Z IDATA:4d-ff ISTACK BIT:0-7 BREG BIT:80-97 SFR_AN BIT:a0-af SFR_AN BIT:b8-c7 SFR_AN BIT:e8-ef SFR_AN Error while running Linker Total number of errors: 1 Total number of warnings: 0 但是他们肯定编译成功过的,我的IAR版本是9.2的,比他们要高。 请大家帮助我一下,一起分析一下

xiao,

IAR比较敏感。换更高的版本试试?最好用最新的版本,加上TI最新的SDK。

当然,你可以试一下在你的工程里面,options->General options->number of virtual registers, 改成8试试?

这个问题我以前回答过,比不是你的程序问题,而是IAR版本更新时的配置问题。

我想你一定是用的IAR V8.20以后的版本,在这个版本之后IAR不再需要NR_OF_VIRTUAL_REGISTERS,也就是这个问题中的+_IDATA_STACK_SIZE#08-_IDATA_END,IAR能够对其自动优化。具体解释:打开IAR软件,可以在release notes中找到highlights,linker configuration files ,

看到如下信息

其中

  • EW24413: Linker configuration files (with the filename extension .xcl) from version 8.20 or older contain:
    -Z(DATA)VREG+_NR_OF_VIRTUAL_REGISTERS=08-7F.
    In the 8.30.1 release this internal _NR_OF_VIRTUAL_REGISTERS symbol was deprecated. In the new version of these files, this changed to:
    -Z(DATA)VREG=08-7F.
    This change is now also applied to the Texas Instruments (Chipcon) linker configuration files.

是引起这个问题的最终原因,你需要找到协议栈安装路径$PROJ_DIR$\..\..\common\cc2540\ti_51ew_cc2540b.xcl的这个文件,将-Z(DATA)VREG+_NR_OF_VIRTUAL_REGISTERS=08-7F改为-Z(DATA)VREG=08-7F

请参考: http://www.deyisupport.com/question_answer/wireless_connectivity/bluetooth/f/103/t/66756.aspx?pi2132219853=1

谢谢大家,我今天google了一下,也找到了这样的解释,谢谢!

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top