我用LPC2378接一个外部RAM,发现在外部RAM上定义数组不方便,查了一些帖子,大概有几种: 1、用指针:volatile INT32U *buf; buf = (volatile INT32U *)0x7fe00000; buf[1] = 0xdf; 2、分散加载: char this_main_arry[1056] __at(0x21000000); LR_ROM1 0x00200000 { ; load region ER_ROM1 0x00200000 0x00004000 { ; load address = execution address *.o (RESET, +First) *(InRoot$$Sections) .ANY (+RO) } RW_RAM1 0x00210000 0x00003000 { ; RW data .ANY (+RW +ZI) } RW_IRAM1 0x20000000 0x10000000 { .ANY (+RW +ZI) } } 我试了,编译通不过,我用KEIL 3.
最好能改一下分散加栽文件,直接可以用外部RAM了, 请教谁有好方法,谢谢!
|