CC2541 新版本IAR 编译link问题

我用10版的IAR 打开例程 \projects\ble\SimpleBLEPeripheral\CC2541DB编译不通过。

错误提示如下:

Building configuration: SimpleBLECentral - CC2541EM 
Updating build tree... 
Linking 
Error[e16]: Segment ISTACK (size: 0xc0 align: 0) is too long for segment definition. At least 0x8 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:48-ff" 
   Reserved ranges relevant to this placement: 
   IDATA:8-1f           VREG 
   IDATA:21-40          VREG 
   IDATA:41-42          XSP 
   IDATA:43-43          DATA_I 
   IDATA:44-45          DATA_Z 
   IDATA:46-47          IDATA_Z 
   IDATA:48-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 
   BIT:f8-ff            SFR_AN 
Error while running Linker 
 
Total number of errors: 1 
Total number of warnings: 0

后在官方论坛中找到了答案原因如下:

IAR V8.20以后的版本不再需要NR_OF_VIRTUAL_REGISTERS

具体解释:打开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


  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值