/* Highest address of the user mode stack */
_estack = 0x20001800; /* end of SRAM */
__SP_INIT = _estack;
/* Generate a link error if heap and stack don't fit into RAM */
__heap_size = 0x800; /* required amount of heap */
__stack_size = 0x200; /* required amount of stack */
/* Specify the memory areas */
MEMORY
{
m_interrupts (rx) : ORIGIN = 0x00000000, LENGTH = 0xC0
m_cfmprotrom (rx) : ORIGIN = 0x00000400, LENGTH = 0x10
m_text (rx) : ORIGIN = 0x00000800, LENGTH = 64K - 0x800
m_data (rwx) : ORIGIN = 0x1FFFF800, LENGTH = 8K /* SRAM */
}
在codewarrior下,
所用的mcu是8k SRAM的,这里的sp指针初始化地址为什么指向0x20001800,因为stack_size 也只有0x200,那后面2k 空间留着干嘛?也即是SRAM_L的2k空间留作何用?
|