以Blackfin 531來說,預設最小使用的SDRAM是16MB
當我們要使用2MB的SDRAM時,則須對環境進行一些設定
以2MB為例,當設定為16MB模式時實際記憶體配置如下,為兩個分離的區塊
Project產生時預設最小可設定為16MB,這時需手動對LDF進行一些修改
將BANK的大小修正,與移除不存在的BANK
MEM_L1_SCRATCH { TYPE(RAM) START(0xFFB00000) END(0xFFB00FFF) WIDTH(8) }
MEM_L1_CODE_CACHE { TYPE(RAM) START(0xFFA10000) END(0xFFA13FFF) WIDTH(8) }
MEM_L1_CODE { TYPE(RAM) START(0xFFA08000) END(0xFFA0BFFF) WIDTH(8) }
MEM_ARGV { TYPE(RAM) START(0xFF804000) END(0xFF8040FF) WIDTH(8) }
MEM_L1_DATA_A { TYPE(RAM) START(0xFF804100) END(0xFF807FFF) WIDTH(8) }
MEM_ASYNC3 { TYPE(ASYNC3_MEMTYPE) START(0x20300000) END(0x203FFFFF) WIDTH(8) }
MEM_ASYNC2 { TYPE(ASYNC2_MEMTYPE) START(0x20200000) END(0x202FFFFF) WIDTH(8) }
MEM_ASYNC1 { TYPE(ASYNC1_MEMTYPE) START(0x20100000) END(0x201FFFFF) WIDTH(8) }
MEM_ASYNC0 { TYPE(ASYNC0_MEMTYPE) START(0x20000000) END(0x200FFFFF) WIDTH(8) }
MEM_SDRAM0_BANK0 { TYPE(RAM) START(0x00000004) END(0x000fffff) WIDTH(8) }
MEM_SDRAM0_BANK1 { TYPE(RAM) START(0x00400000) END(0x004fffff) WIDTH(8) }
// MEM_SDRAM0_BANK2 { TYPE(RAM) START(0x00800000) END(0x00bfffff) WIDTH(8) }
// MEM_SDRAM0_BANK3 { TYPE(RAM) START(0x00c00000) END(0x00ffffff) WIDTH(8) }
...
RESERVE(___wab0=MEMORY_END(MEM_L1_SCRATCH) - 75, ___l0 = 76)
RESERVE(___wab1=MEMORY_END(MEM_L1_CODE_CACHE) - 75, ___l1 = 76)
RESERVE(___wab2=MEMORY_END(MEM_L1_CODE) - 75, ___l2 = 76)
RESERVE(___wab4=MEMORY_END(MEM_L1_DATA_A) - 75, ___l4 = 76)
RESERVE(___wab5=MEMORY_END(MEM_ASYNC3) - 75, ___l5 = 76)
RESERVE(___wab6=MEMORY_END(MEM_SDRAM0_BANK1) - 75, ___l8 = 76)
RESERVE(___wab1=MEMORY_END(MEM_L1_CODE_CACHE) - 75, ___l1 = 76)
RESERVE(___wab2=MEMORY_END(MEM_L1_CODE) - 75, ___l2 = 76)
RESERVE(___wab4=MEMORY_END(MEM_L1_DATA_A) - 75, ___l4 = 76)
RESERVE(___wab5=MEMORY_END(MEM_ASYNC3) - 75, ___l5 = 76)
RESERVE(___wab6=MEMORY_END(MEM_SDRAM0_BANK1) - 75, ___l8 = 76)
sdram0_bank0
{
INPUT_SECTION_ALIGN(4)
...
} > MEM_SDRAM0_BANK0
sdram0_bank0_bsz ZERO_INIT
{
INPUT_SECTION_ALIGN(4)
INPUT_SECTIONS($OBJECTS(sdram_bsz) $LIBRARIES(sdram_bsz))
INPUT_SECTIONS($OBJECTS(bsz) $LIBRARIES(bsz))
} > MEM_SDRAM0_BANK0
sdram0_bank1
{
INPUT_SECTION_ALIGN(4)
...
} > MEM_SDRAM0_BANK0
sdram0_bank0_bsz ZERO_INIT
{
INPUT_SECTION_ALIGN(4)
INPUT_SECTIONS($OBJECTS(sdram_bsz) $LIBRARIES(sdram_bsz))
INPUT_SECTIONS($OBJECTS(bsz) $LIBRARIES(bsz))
} > MEM_SDRAM0_BANK0
sdram0_bank1
{
INPUT_SECTION_ALIGN(4)
...
} > MEM_SDRAM0_BANK1
移除不存在BANK設定
sdram0_bank2
{
INPUT_SECTION_ALIGN(4)
...
} > MEM_SDRAM0_BANK2
sdram0_bank2_bsz ZERO_INIT
{
INPUT_SECTION_ALIGN(4)
INPUT_SECTIONS($OBJECTS(sdram_bsz) $LIBRARIES(sdram_bsz))
INPUT_SECTIONS($OBJECTS(bsz) $LIBRARIES(bsz))
} > MEM_SDRAM0_BANK2
sdram0_bank3
{
INPUT_SECTION_ALIGN(4)
...
} > MEM_SDRAM0_BANK3
sdram0_bank3_stack_heap
{
INPUT_SECTION_ALIGN(4)
} > MEM_SDRAM0_BANK3
沒有留言:
張貼留言