你把他们当做连续的一块RAM就好,但是SRAM_L的一部分在启动时会被用于存储中断向量,不可被在再次使用。
以KL25的link文件为例,
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Memory Regions-*/
//define symbol __ICFEDIT_region_ROM_start__ = 0x0;
define symbol __ICFEDIT_region_ROM_start__ = 0x8000;
define symbol __ICFEDIT_region_ROM_end__ = __ICFEDIT_region_ROM_start__ + (128*1024);//********
define symbol __ICFEDIT_region_RAM_end__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_start__ = __ICFEDIT_region_RAM_end__ - (16*1024)/4 + 0x410;//********
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = __ICFEDIT_region_ROM_start__;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = (1*1024);//********
define symbol __ICFEDIT_size_heap__ = (2*1024);//********
/**** End of ICF editor section. ###ICF###*/
define symbol __region_RAM2_start__ = 0x20000000;
define symbol __region_RAM2_end__ = __region_RAM2_start__ + ((16*1024)*3)/4;//********
//define exported symbol __VECTOR_TABLE = 0x00000000;
define exported symbol __VECTOR_TABLE = 0x00008000;
define exported symbol __VECTOR_RAM = __ICFEDIT_region_RAM_start__ - 0x410;
define exported symbol __BOOT_STACK_ADDRESS = __region_RAM2_end__ - 8;
//define symbol __code_start__ = 0x00000410;//********
define symbol __code_start__ = 0x00008410;//********
define memory mem with size = 4G;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];// | mem:[from __region_FlexNVM_start__ to __region_FlexNVM_end__];//********
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__] | mem:[from __region_RAM2_start__ to __region_RAM2_end__];