DAVE软件默认内存地址分配
- FLASH分配中少了64K的内存
MEMORY
{FLASH_0_cached(RX) : ORIGIN = 0x08000000, LENGTH = 0x00010000FLASH_0_uncached(RX) : ORIGIN = 0x0C000000, LENGTH = 0x00010000 FLASH_1_cached(RX) : ORIGIN = 0x08020000, LENGTH = 0x00020000FLASH_1_uncached(RX) : ORIGIN = 0x0C020000, LENGTH = 0x00020000PSRAM_1(!RX) : ORIGIN = 0x1FFF0000, LENGTH = 0x10000DSRAM_1_system(!RX) : ORIGIN = 0x20000000, LENGTH = 0x10000SRAM_combined(!RX) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000
}
XMC4300参考手册中,关于RAM与FLASH的分配地址:
- 可以看出地址范围0x00000000 - 0x3FFFFFFF
- 但是XMC4300实际是256K(40000)的FLASH与128K(20000)的RAM,
- 表7-2明确了0x00000000-0x00003FFF是BOOT-ROM,16K;
- 明确了0x08000000-0x0801FFFF与0x0C000000-0x0C01FFFF对应FLASH,256K;
- 0x1FFF0000-0x2000FFFF对应RAM,128K;
- 表8-1进一步说明了,0x0C000000或者0x08000000对应的物理内存空间是一样的
- 在表8-2中,详细说明了FLASH的分配情况,共0x40000size大小。
在生成的.map文件中:
//flash size
3709 0x0000eb0c __text_size = (__exidx_end - sText + __data_size + __ram_code_size)
//ram size 1964+ffc0
3884 0x00001964 __bss_size =
3911 0x0000ffc0 __Heap_Bank_size =