打印
[技术问题解答]

KE02系列的SRAM使用问题。

[复制链接]
1375|3
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
蓝水易|  楼主 | 2015-5-13 10:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
沙发
FSL_TICS_Jeremy| | 2015-5-13 11:05 | 只看该作者
你把他们当做连续的一块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__];

define block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };
define block HEAP      with alignment = 8, size = __ICFEDIT_size_heap__     { };

initialize manually { readwrite };
initialize manually { section .data};
initialize manually { section .textrw };
do not initialize  { section .noinit };

define block CodeRelocate { section .textrw_init };
define block CodeRelocateRam { section .textrw };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place at address mem:__code_start__ { readonly section .noinit };

place in ROM_region   { readonly, block CodeRelocate};

place in RAM_region   { readwrite, block CodeRelocateRam,
                        block CSTACK, block HEAP };

使用特权

评论回复
板凳
蓝水易|  楼主 | 2015-5-14 14:54 | 只看该作者
FSL_TICS_Jeremy 发表于 2015-5-13 11:05
你把他们当做连续的一块RAM就好,但是SRAM_L的一部分在启动时会被用于存储中断向量,不可被在再次使用。
以 ...

非常感谢,以后多多指教:handshake

使用特权

评论回复
地板
FSL_TICS_Jeremy| | 2015-6-3 08:52 | 只看该作者
  非常感谢你关于Kinetis的技术问题。如果你没有其他问题,我们将此帖默认为已解决.

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

2

主题

14

帖子

0

粉丝