在IAR中,硬件环境为STM32F464单片机,额外的CCM不能用DMA访问,但可以作为内部额外扩充RAM使用

修改文件中的内容为:

define symbol __ICFEDIT_region_ROM_start__    = 0x08000000;
define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF;
define symbol __ICFEDIT_region_CCMRAM_start__ = 0x10000000;
define symbol __ICFEDIT_region_CCMRAM_end__ = 0x1000FFFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__ = 0x800;
/**** End of ICF editor section. ###ICF###*/ define memory mem with size = 4G;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to
__ICFEDIT_region_ROM_end__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to
__ICFEDIT_region_RAM_end__];
define region CCMRAM_region = mem:[from __ICFEDIT_region_CCMRAM_start__ to
__ICFEDIT_region_CCMRAM_end__]; define block CSTACK with alignment = , size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = , size = __ICFEDIT_size_heap__ { }; initialize by copy {readwrite};
do not initialize { section .noinit }; place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; place in ROM_region { readonly };
place in CCMRAM_region { readwrite }; //内存分配CCM优先(除堆栈)
place in RAM_region { block CSTACK, block HEAP }; //堆区和栈区设置在SRAM

要具设置某个文件生成在CCM区,place in CCMRAM_region { readwrite };修改为:

place in CCMRAM_region {readwrite object tasks.o,

                           readwrite object heap_4.o };

 

或者具体到内存中分配的类型(具体查看生成的map文件)修改为:

place in CCMRAM_region {section .bss object tasks.o,

                           section .bss object heap_4.o };

内存灵活配置,当然也可配置为(注意CCM区不能使用DMA):

place in CCMRAM_region { block CSTACK, block HEAP };    //堆区和栈区设置在CCM

 place in RAM_region   { readwrite };  ///内存分配CCM优先(除堆栈)

/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__ = 0x2001FFFF;
define symbol __ICFEDIT_region_CCMRAM_start__ = 0x10000000;
define symbol __ICFEDIT_region_CCMRAM_end__ = 0x1000FFFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x800;
define symbol __ICFEDIT_size_heap__ = 0x18C00;
/**** End of ICF editor section. ###ICF###*/
define memory mem with size = 4G;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
define region CCMRAM_region = mem:[from __ICFEDIT_region_CCMRAM_start__ to __ICFEDIT_region_CCMRAM_end__]; define block CSTACK with alignment = , size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = , size = __ICFEDIT_size_heap__ { }; initialize by copy { readwrite };
do not initialize { section .noinit }; place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; place in ROM_region { readonly };
place in RAM_region { readwrite,
block CSTACK, block HEAP };
place in CCMRAM_region{ readwrite object heap_4.o,
readwrite object tasks.o,
readwrite object port.o,
readwrite object cmsis_os.o,
};

最新文章

  1. C++-Qt【5】-QT的QString,char*,QByteArray转化以及中文乱码的问题
  2. 初学Python遇到的问题一二
  3. JavaScript调用函数的方法
  4. java提高篇(二一)-----ArrayList
  5. c++ operator
  6. 背景虚化 Google Camera App Nokia Refocus HTC One M8 的 Duo景深相机
  7. Keycode对照表
  8. 普通委托到泛型委托到Linq
  9. NOT EXISTS优化的一个案例 .
  10. shape的属性
  11. centOS 6.4 vsftpd 配置
  12. C语言宏定义使用技巧
  13. SQL Server 中同时操作的例子:
  14. ListView ,recycleView列表带进度条
  15. HDU1754-ZKW线段树
  16. Vue项目分环境打包的实现步骤
  17. 第十七周翻译-SQL Server中事务日志管理的阶梯,级别5:以完全恢复模式管理日志
  18. 值得推荐的五大敏捷PHP开发框架
  19. Shell-删除误解压的文件
  20. M斐波那契数列(矩阵快速幂+费马小定理)

热门文章

  1. ES6 Promise对象(七)
  2. Golang循环中调用go func参数异常分析
  3. Mysql-MariaDB设置延迟同步
  4. Django框架(四)-- 路由控制:有名/无名分组、反向解析、路由分发、名称空间、伪静态、APPEND_SLASH、不同版本的Django区别、Django虚拟环境搭建
  5. IntelliJ idea SpringBoot打war包
  6. Elasticsearch+x-pack认证license过期处理
  7. mysql 命令修复表
  8. ROS学习笔记(二) :使用roslaunch
  9. windows平台上MongoDB安装配置
  10. Java精通并发-Condition方法实现分析与讲解