Board logo

标题: 挑战高手 [打印本页]

作者: lamb313    时间: 2006-2-23 13:55     标题: 挑战高手

我用TMS320VC33开发了一套系统,遇到问题如下:


.global _IMUDATA


.bss  _IMUDATA,0ffh


在C中


extern int IMUDATA[256];


for(i=0;i<256;i++)


IMUDATA=i;


bss段导入到外部静态随机存储器SRAM中,_IMUDATA地址为0x20000,DP=800000h,经高手指点,可以改程序为


extern int IMUDATA[256];


for(i=0;i<256;i++)


*(int *)(IMUDATA+i)=i;仍然不行。赋值不成功,数组内容没有任何改变。请各位大侠看看问题在哪里。谢谢,我的邮箱lamb313@163.com


作者: BlueSeaHaiChao    时间: 2006-2-28 02:28

You may need to setup a .gel file to initialize the registers so
that your ram is visible to CCS at reset. Here's an example of
reload.gel file that adds menus to the GEL menu. This one is used without external ram, but it should point you in the right
direction.

#define PMST 0x1d
#define PMST_FLASH_VAL 0xFFC0
#define SWWSR 0x28
#define SWWSR_VAL 0x7FFF
#define BSCR 0x29
#define BSCR_VAL 0x02

hotmenu Reset_Extended()
{
*(int *)PMST = PMST_FLASH_VAL;
*(int *)SWWSR = SWWSR_VAL;
*(int *)BSCR = BSCR_VAL;
GEL_Reset();

GEL_XMDef( 0, 0x1E, 1, 0x8000, 0x7F );
GEL_XMOn();
GEL_MapAdd( 0x18000, 1, 0x8000, 1, 1 );
GEL_MapAdd( 0x28000, 0, 0x8000, 1, 1 );
GEL_MapAdd( 0x38000, 0, 0x8000, 1, 1 );
}

Why can you not use DSK schematic as your guide? Just copy the external
SRAM
design and connections on that board *exactly* and then use the same .gel file
in
CCS. If you follow the TI example, you can't miss.







欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0