IAR for 8051 版本兼容解决办法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/nicole088/article/details/87214553

IAR for 8051 版本兼容解决办法


———————————————————————————————————————————————————

低版本向高版本移植

随着Z-Stack 3.0.1的推出IAR IDE的版本也不断更新,目前官方介绍Z-Stack 3.0协议栈需要IAR EW8051-10101以上版本。很多朋友在PC机安装两个不同的版本来支持ZStack-CC2530-2.5.1a和 Z-Stack 3.0.1不同版本的协议栈。今天给大家介绍解决兼容的办法。

第一步

安装IAR EW8051-10101以上版本后直接编译源码(安装方法本文不做介绍)
编译报错信息如下截图:
在这里插入图片描述

Error[e16]: Segment ISTACK (size: 0xc0 align: 0) is too long for segment definition. At least 0xe 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:4e-ff”

方法

  1. 右击->Options -> Number of virtual: == 将16改为8==
  2. 替换C:\Texas Instruments\ZStack-CC2530-2.5.1a\Projects\zstack\ZMain\TI2530DB下的chipcon_cstartup.s51文件
    文件下载
    在这里插入图片描述
  3. 再次点击 rebuild all 提示如下错误信息

第二步

在这里插入图片描述

Error[e16]: Segment RAM_CODE_FLASH (size: 0x27 align: 0) is too long for segment definition. At least 0x4 more bytes needed. The problem occurred
while processing the segment placement command “-Z(CODE)RAM_CODE_FLASH=_RAM_CODE_FLASH_START-_RAM_CODE_FLASH_END”, where at the moment of placement the
available memory ranges were “CODE:39ddd-39dff”

方法
根据上面说的,RAM_CODE_FLASH需要再扩大至少4个字节

  • 打开Tool-fw82530.xcl文件,将RAM_CODE_FLASH_END的值再增大至少0x4, 将0x22改为0x26
    如下:
-D_RAM_CODE_FLASH_START=0x39DDD
-D_RAM_CODE_FLASH_END=(_RAM_CODE_FLASH_START+0x26)

再次rebuild all即可消除错误

猜你喜欢

转载自blog.csdn.net/nicole088/article/details/87214553