微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI Zigbee设计交流 > CC2530能否把Cluster List建立在Code区?

CC2530能否把Cluster List建立在Code区?

时间:10-02 整理:3721RD 点击:

Cluster List是z-stack中一个RAM开销大户,能否把Cluster List建立在Code区?

定义cluster时都有使用const,显然是放在code区。

const cId_t ipdInClusterList[IPD_MAX_INCLUSTERS] =

{
ZCL_CLUSTER_ID_GEN_BASIC,
ZCL_CLUSTER_ID_GEN_IDENTIFY,
ZCL_CLUSTER_ID_GEN_TIME,
ZCL_CLUSTER_ID_SE_PRICING,
ZCL_CLUSTER_ID_SE_MESSAGE
};

#define IPD_MAX_OUTCLUSTERS 5
const cId_t ipdOutClusterList[IPD_MAX_OUTCLUSTERS] =
{
ZCL_CLUSTER_ID_GEN_BASIC,
ZCL_CLUSTER_ID_GEN_IDENTIFY,
ZCL_CLUSTER_ID_GEN_TIME,
ZCL_CLUSTER_ID_SE_PRICING,
ZCL_CLUSTER_ID_SE_MESSAGE
};

IAR 8051里面,const不等于code区,应该是CONST才是定义在code区。

Static and global objects declared const and located in memories using the memory 

attributes __code, __far_code, and __huge_codeare allocated in ROM. For all
other memory attributes, the objects are allocated in RAM and initialized by the runtime
system at startup.

const只是表示不可变,但仍然放在RAM中

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

网站地图

Top