TI中文支持网
TI专业的中文技术问题搜集分享网站

DSP中ramfuns将程序拷贝到RAM中后,DSP运行不正常

我用的是DSP28069,ramfuns段指定的运行地址是RAML5L8,ebss指定的地址也是RAML5L8。编译程序后如果ramfuns段从0xC000开始,程序运行正常。但是要是不是从0xC000开始,程序运行就不正常(AD中断不能正常进中断,后者上电几秒后才能进中断)。

请问:这是什么原因,ramfuns指定地址有要求吗?还是把ramfuns段和ebss指定到一块会对程序有冲突?

请各位大神和Ti工程师给指导一下,谢谢!

Susan Yang:

请问能否私信一下您的工程?我们来具体看一下,谢谢

user4129436:

回复 Susan Yang:

不好意思,工程加密了,发不出去。您需要什么信息,我照图片。谢谢。

Susan Yang:

回复 user4129436:

那能否给出您的cmd文件?

user4129436:

回复 Susan Yang:

_Cla1Prog_Start = _Cla1funcsRunStart;-heap 0x400-stack 0x400

// Define a size for the CLA scratchpad area that will be used// by the CLA compiler for local symbols and temps// Also force references to the special symbols that mark the// scratchpad are. // CLA_SCRATCHPAD_SIZE = 0x100;–undef_sym=__cla_scratchpad_end–undef_sym=__cla_scratchpad_start

MEMORY{PAGE 0 : /* BEGIN is used for the "boot to SARAM" bootloader mode */

//BEGIN : origin = 0x000000, length = 0x000002 RAMM0 : origin = 0x000050, length = 0x0003B0 CLARAM2 : origin = 0x008000, length = 0x000800 RAML5L8 : origin = 0x00C000, length = 0x008000

/* RAML0_L2 : origin = 0x008000, length = 0x001000 */ RAML3 : origin = 0x009000, length = 0x001000

OTP : origin = 0x3D7800, length = 0x000400 /* on-chip OTP */

FLASHH : origin = 0x3D8000, length = 0x004000 /* on-chip FLASH */ FLASHG : origin = 0x3DC000, length = 0x004000 /* on-chip FLASH */ FLASHF : origin = 0x3E0000, length = 0x004000 /* on-chip FLASH */ FLASHE : origin = 0x3E4000, length = 0x004000 /* on-chip FLASH */ FLASHD : origin = 0x3E8000, length = 0x004000 /* on-chip FLASH */ FLASHC : origin = 0x3EC000, length = 0x004000 /* on-chip FLASH */ FLASHA : origin = 0x3F4000, length = 0x003F80 /* on-chip FLASH */ CSM_RSVD : origin = 0x3F7F80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */ BEGIN : origin = 0x3F7FF6, length = 0x000002 /* Part of FLASHA. Used for "boot to Flash" bootloader mode. */ CSM_PWL_P0 : origin = 0x3F7FF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */

/* FPU Tables in Boot ROM */ FPUTABLES : origin = 0x3FD860, length = 0x0006A0

/* IQ Math Tables in Boot ROM */ IQTABLES : origin = 0x3FDF00, length = 0x000B50 IQTABLES2 : origin = 0x3FEA50, length = 0x00008C IQTABLES3 : origin = 0x3FEADC, length = 0x0000AA

BOOTROM : origin = 0x3FF3B0, length = 0x000C10

RESET : origin = 0x3FFFC0, length = 0x000002 VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM */

PAGE 1 :

/* Part of M0, BOOT rom will use this for stack */ BOOT_RSVD : origin = 0x000000, length = 0x000050 /* on-chip RAM block M1 */ RAMM1 : origin = 0x000480, length = 0x000380 CLARAM0 : origin = 0x008800, length = 0x000400 CLARAM1 : origin = 0x008C00, length = 0x000400// CLARAM2 : origin = 0x008000, length = 0x000800 /* on-chip RAM block L4-L8 */ RAML4 : origin = 0x00A000, length = 0x002000 /* RAML5 : origin = 0x00C000, length = 0x002000 */ /* RAML6 : origin = 0x00E000, length = 0x002000 */ /* RAML7 : origin = 0x010000, length = 0x002000 */ /* RAML8 : origin = 0x012000, length = 0x002000 */ USB_RAM : origin = 0x040000, length = 0x000800 /* USB RAM */ FLASHB : origin = 0x3F0000, length = 0x004000 /* on-chip FLASH */ CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080 CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080

RESET : origin = 0x3FFFC0, length = 0x000002 VECTORS : origin = 0x3FFFC2, length = 0x00003E /* part of boot ROM */}

SECTIONS{

/* Setup for "boot to SARAM" mode: The codestart section (found in DSP28_CodeStartBranch.asm) re-directs execution to the start of user code. */ codestart : > BEGIN, PAGE = 0 //ramfuncs : > RAMM0, PAGE = 0 .text : > FLASHA, PAGE = 0 .cinit : > FLASHA, PAGE = 0 .pinit : > FLASHA, PAGE = 0 .switch : > FLASHA, PAGE = 0 .econst : > FLASHA, PAGE = 0

ramfuncs : LOAD = FLASHD, RUN = RAML5L8, LOAD_START(_RamfuncsLoadStart), LOAD_END(_RamfuncsLoadEnd), RUN_START(_RamfuncsRunStart), LOAD_SIZE(_RamfuncsLoadSize), PAGE = 0

csmpasswds : > CSM_PWL_P0, PAGE = 0 csm_rsvd : > CSM_RSVD, PAGE = 0

.stack : > RAML4, PAGE = 1 //.ebss : > RAML4, PAGE = 1 .ebss : > RAML5L8, PAGE = 0 .esysmem : > RAML4, PAGE = 1 .sysmem : > RAML4, PAGE = 1 .cio : > RAML4, PAGE = 1

.scratchpad : > CLARAM0, PAGE = 1 .bss_cla : > CLARAM0, PAGE = 1 .const_cla : > CLARAM0, PAGE = 1 IQmath : > FLASHA, PAGE = 0 IQmathTables : > IQTABLES, PAGE = 0, TYPE = NOLOAD /* Allocate FPU math areas: */ FPUmathTables : > FPUTABLES, PAGE = 0, TYPE = NOLOAD

Cla1Prog : LOAD = FLASHH,//LOAD = RAML0_L2, RUN = RAML3, LOAD_START(_Cla1funcsLoadStart), LOAD_END(_Cla1funcsLoadEnd), LOAD_SIZE(_Cla1funcsLoadSize), RUN_START(_Cla1funcsRunStart), PAGE = 0/* Cla1Prog : > RAML3, LOAD_START(_Cla1funcsLoadStart), LOAD_END(_Cla1funcsLoadEnd), LOAD_SIZE(_Cla1funcsLoadSize), RUN_START(_Cla1funcsRunStart), PAGE = 0*/

Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, PAGE = 1 CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, PAGE = 1 Cla1DataRam0 : > CLARAM0, PAGE = 1 Cla1DataRam1 : > CLARAM1, PAGE = 1 Cla1DataRam2 : > CLARAM2, PAGE = 0

CLA1mathTables : LOAD = FLASHG,//LOAD = RAML0_L2, RUN = CLARAM2,//RAML3, LOAD_START(_Cla1mathTablesLoadStart), LOAD_END(_Cla1mathTablesLoadEnd), LOAD_SIZE(_Cla1mathTablesLoadSize), RUN_START(_Cla1mathTablesRunStart), PAGE = 0

CLAscratch : { *.obj(CLAscratch) . += CLA_SCRATCHPAD_SIZE; *.obj(CLAscratch_end) } > CLARAM0, PAGE = 1

.reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */ vectors : > VECTORS, PAGE = 0, TYPE = DSECT

/* Uncomment the section below if calling the IQNexp() or IQexp() functions from the IQMath.lib library in order to utilize the relevant IQ Math table in Boot ROM (This saves space and Boot ROM is 1 wait-state). If this section is not uncommented, IQmathTables2 will be loaded into other memory (SARAM, Flash, etc.) and will take up space, but 0 wait-state is possible. */ /* IQmathTables2 : > IQTABLES2, PAGE = 0, TYPE = NOLOAD {

IQmath.lib<IQNexpTable.obj> (IQmathTablesRam)

} */ /* Uncomment the section below if calling the IQNasin() or IQasin() functions from the IQMath.lib library in order to utilize the relevant IQ Math table in Boot ROM (This saves space and Boot ROM is 1 wait-state). If this section is not uncommented, IQmathTables2 will be loaded into other memory (SARAM, Flash, etc.) and will take up space, but 0 wait-state is possible. */ /* IQmathTables3 : > IQTABLES3, PAGE = 0, TYPE = NOLOAD {

IQmath.lib<IQNasinTable.obj> (IQmathTablesRam)

} */

}

user4129436:

回复 Susan Yang:

您好,这是cmd文件,请您看一下

赞(0)
未经允许不得转载:TI中文支持网 » DSP中ramfuns将程序拷贝到RAM中后,DSP运行不正常
分享到: 更多 (0)