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

TMS320F28388D: 在程序中定义数组,当数组比较大时单片机上电无法启动,数组小可以,初步怀疑是有溢出,但是不报错,请问怎样更改CMD文件

Part Number:TMS320F28388D

CLA_SCRATCHPAD_SIZE = 0x100;
–undef_sym=__cla_scratchpad_end
–undef_sym=__cla_scratchpad_start

MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
RAMD0 : origin = 0x00C000, length = 0x000800
RAMD1 : origin = 0x00C800, length = 0x000800
RAMLS01 : origin = 0x008000, length = 0x001000
// RAMLS1 : origin = 0x008800, length = 0x000800
RAMLS2 : origin = 0x009000, length = 0x000800
RAMLS3 : origin = 0x009800, length = 0x000800
RAMLS4 : origin = 0x00A000, length = 0x000800
RAMLS5 : origin = 0x00A800, length = 0x001800//RAMLS5、6、7CLA专用RAM
// RAMLS6 : origin = 0x00B000, length = 0x001000
// RAMLS7 : origin = 0x00B800, length = 0x000800
RAMGS0123 : origin = 0x00D000, length = 0x004000
RAMGS4 : origin = 0x011000, length = 0x001000
RAMGS5 : origin = 0x012000, length = 0x001000
RAMGS6 : origin = 0x013000, length = 0x001000
RAMGS7 : origin = 0x014000, length = 0x001000
RAMGS8 : origin = 0x015000, length = 0x001000
RAMGS9 : origin = 0x016000, length = 0x001000
RAMGS10 : origin = 0x017000, length = 0x001000
RAMGS11 : origin = 0x018000, length = 0x001000
RAMGS12 : origin = 0x019000, length = 0x001000
RAMGS13 : origin = 0x01A000, length = 0x001000
RAMGS14 : origin = 0x01B000, length = 0x001000
RAMGS15 : origin = 0x01C000, length = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

/* Flash sectors */
FLASHA : origin = 0x080002, length = 0x01EFFE /* on-chip Flash */
FLASHB : origin = 0x09F000, length = 0x01D000 /* on-chip Flash */
FLASHC : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */
FLASHD : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */

CPU1TOCPU2RAM : origin = 0x03A000, length = 0x000800
CPU2TOCPU1RAM : origin = 0x03B000, length = 0x000800
CPUTOCMRAM : origin = 0x039000, length = 0x000800
CMTOCPURAM : origin = 0x038000, length = 0x000800

CANA_MSG_RAM : origin = 0x049000, length = 0x000800
CANB_MSG_RAM : origin = 0x04B000, length = 0x000800

RESET : origin = 0x3FFFC0, length = 0x000002

CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000038
CLA1_MSGRAMHIGH : origin = 0x0014B8, length = 0x0000C8
}

SECTIONS
{
codestart : > BEGIN, ALIGN(8)
.text : >>FLASHA , ALIGN(8)
.cinit : > FLASHA , ALIGN(8)
.switch : > FLASHA , ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1

#if defined(__TI_EABI__)
.init_array : > FLASHA , ALIGN(8)
.bss : > RAMLS4
.bss:output : > RAMLS3
.data : > RAMGS0123
.sysmem : > RAMLS4
/* Initalized sections go in Flash */
.const : > FLASHA , ALIGN(8)
#else
.pinit : > FLASHA , ALIGN(8)
.ebss : > RAMLS3
.esysmem : > RAMLS4
/* Initalized sections go in Flash */
.econst : >> FLASHA , ALIGN(8)
#endif

MSGRAM_CPU1_TO_CPU2 : > CPU1TOCPU2RAM, type=NOINIT
MSGRAM_CPU2_TO_CPU1 : > CPU2TOCPU1RAM, type=NOINIT
MSGRAM_CPU_TO_CM : > CPUTOCMRAM, type=NOINIT
MSGRAM_CM_TO_CPU : > CMTOCPURAM, type=NOINIT

/* CLA specific sections */

Cla1Prog : LOAD = FLASHA ,
RUN = RAMLS5,
LOAD_START(Cla1funcsLoadStart),
LOAD_END(Cla1funcsLoadEnd),
RUN_START(Cla1funcsRunStart),
LOAD_SIZE(Cla1funcsLoadSize),
ALIGN(8)

CLADataLS0 : > RAMLS01
CLADataLS1 : > RAMLS01

Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, type=NOINIT
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, type=NOINIT
Cla1DataRam : >> RAMLS01

/* CLA C compiler sections */
//
// Must be allocated to memory the CLA has write access to
//
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS01

.scratchpad : > RAMLS01
.bss_cla : > RAMLS01
#if defined(__TI_EABI__)
.const_cla : LOAD = FLASHA ,
RUN = RAMLS01 ,
RUN_START(Cla1ConstRunStart),
LOAD_START(Cla1ConstLoadStart),
LOAD_SIZE(Cla1ConstLoadSize)
#else
.const_cla : LOAD = FLASHA,
RUN = RAMLS01 ,
RUN_START(_Cla1ConstRunStart),
LOAD_START(_Cla1ConstLoadStart),
LOAD_SIZE(_Cla1ConstLoadSize)
#endif

#if defined(__TI_EABI__)
.TI.ramfunc : {} LOAD = FLASHA ,
RUN = RAMD0,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)
#else
.TI.ramfunc : {} LOAD = FLASHA ,
RUN = RAMD0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
ALIGN(8)
#endif

}

/*
//===========================================================================
// End of file.
//===========================================================================
*/

Susan Yang:

请问您是在何处定义的数组?另外请参考我刚刚的回复

https://e2echina.ti.com/support/microcontrollers/c2000/f/c2000-microcontrollers-forum/203823/ccs-dsp280049 

,

DSP应用:

在.h文件中定义的,就多定义了如下几个数组,程序在线运行是正常的,但是从新上电启动不起来,去掉这几个数组就能够正常

Uint16 Channel_Cur2[16]; Uint16 Channel_Vot3[16]; Uint16 Channel_Cur4[16]; Uint16 Channel_Vot5[16]; Uint16 Channel_Cur5[16];

,

DSP应用:

能不能帮解决?不能解决换芯片了!!!

,

Susan Yang:

若是可以的话,请您上传或私信一下工程,我们在开发板上测试后给您回复

,

Susan Yang:

之前有客户遇到类似的问题,您可以看一下

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/566950/f28335-array-of-pointers-to-arrays-makes-the-dsp-go-crazy 

,

DSP应用:

问题是由于数据太他后引导程序出问题

,

Susan Yang:

好的,谢谢您的反馈

赞(0)
未经允许不得转载:TI中文支持网 » TMS320F28388D: 在程序中定义数组,当数组比较大时单片机上电无法启动,数组小可以,初步怀疑是有溢出,但是不报错,请问怎样更改CMD文件
分享到: 更多 (0)