TI中文支持网
TI专业的中文技术问题搜集分享网站

在全局定义char a[1024],并对其初始化为1024字节的a,但是为什么.map文件里flash没有增加1024字节,只增加了16字节?我填充的1024字节的a,它占用的空间在哪里?

在全局定义char a[1024],并对其初始化为1024字节的a,但是为什么flash没有增加1024字节,只增加了16字节?

没有执行以下代码时,flash已使用5ad2,执行以下代码后,flash已使用5ae2,只增加了16字节,这是为什么呀?SRAM的使用情况执行前后没有任何变化。

    char a[1024];
    memset(a,'a',sizeof(a));

我填充的1024字节的a,它占用的空间在哪里?

右边是执行前,左边是 char a[1024]; memset(a,'a',sizeof(a));代码执行后

Viki Shi:

能否把代码前后文贴一下?

Viki Shi:

我又看了一下问题,全局变量存储在静态存储区,不在flash或者RAM里,你可以网上查一下各种内容如何存储

user6123042:

回复 Viki Shi:

我这个代码用的是rfPacketRx_CC2640R2_LAUNCHXL_nortos_ccs的源代码,没做然和改动的运行结果,和加了以下红框中的代码运行的结果

user6123042:

回复 Viki Shi:

静态存储区是在CC2640R2F的哪个设备里?

Viki Shi:

回复 user6123042:

这部分编译器里不会显示

Application and Stack RAM Boundary

The application and stack RAM memory maps are based on the common ICALL_RAM0_START defined symbol. This value defines the hard-coded RAM boundary for the end of the RAM space of the application and the start of the image of the stack .BSS and .DATA sections. Unlike the flash boundary, elements of the stack project (such as task stacks and heaps) are allocated in the application project. To ensure proper linking, both the application and stack projects must use the same ICALL_RAM0_START value. By default, ICALL_RAM0_START is configured to allocate unused RAM to the application project through the frontier tool. For information on using the frontier tool to configure the RAM boundary address, see Frontier Tool Operation.

参考下面链接的memory management:

user6123042:

回复 Viki Shi:

我们要用CC2640R2F不间断的接收OV数据,所以想知道CC2640R2F最多能接多少数据保存?

赞(0)
未经允许不得转载:TI中文支持网 » 在全局定义char a[1024],并对其初始化为1024字节的a,但是为什么.map文件里flash没有增加1024字节,只增加了16字节?我填充的1024字节的a,它占用的空间在哪里?
分享到: 更多 (0)