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

TMS320F28377S: 内存溢出

Part Number:TMS320F28377S

我编写的代码用ram的cmd会出现:

的提示,我将代码一些内容删掉后好像就不会出现了,我修改CMD文件的内存分配也没有其他作用下面是cmd的内容:

MEMORY
{
PAGE 0 :/* BEGIN is used for the "boot to SARAM" bootloader mode*/BEGIN	: origin = 0x000000, length = 0x000002RAMM0	: origin = 0x000122, length = 0x0002DE////RAMD0	: origin = 0x00B000, length = 0x000800RAMD0	: origin = 0x008000, length = 0x008000/*RAMLS0	: origin = 0x008000, length = 0x000800RAMLS1	: origin = 0x008800, length = 0x000800RAMLS2		: origin = 0x009000, length = 0x000800RAMLS3		: origin = 0x009800, length = 0x000800RAMLS4		: origin = 0x00A000, length = 0x000800*///RAMLS0	: origin = 0x00A800, length = 0x000800RESET	: origin = 0x3FFFC0, length = 0x000002

PAGE 1 :BOOT_RSVD: origin = 0x000002, length = 0x000120/* Part of M0, BOOT rom will use this for stack */RAMM1: origin = 0x000400, length = 0x000400/* on-chip RAM block M1 */RAMD1: origin = 0x00B800, length = 0x000800//RAMLS5: origin = 0x00A800, length = 0x000800RAMLS5: origin = 0x00B000, length = 0x000800RAMGS0: origin = 0x00C000, length = 0x001000RAMGS1: origin = 0x00D000, length = 0x001000RAMGS2: origin = 0x00E000, length = 0x001000RAMGS3: origin = 0x00F000, length = 0x001000RAMGS4: origin = 0x010000, length = 0x001000RAMGS5: origin = 0x011000, length = 0x001000RAMGS6: origin = 0x012000, length = 0x001000RAMGS7: origin = 0x013000, length = 0x001000RAMGS8: origin = 0x014000, length = 0x001000RAMGS9: origin = 0x015000, length = 0x001000RAMGS10: origin = 0x016000, length = 0x001000RAMGS11: origin = 0x017000, length = 0x001000CANA_MSG_RAM: origin = 0x049000, length = 0x000800CANB_MSG_RAM: origin = 0x04B000, length = 0x000800
}


SECTIONS
{codestart: > BEGIN,PAGE = 0//.text: >>RAMM0 | RAMD0 |  RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,PAGE = 0.text: >>RAMM0 | RAMD0  ,PAGE = 0//.cinit: > RAMM0 | RAMD0,PAGE = 0.cinit: > RAMD1,PAGE = 1.pinit: > RAMM0,PAGE = 0.switch: > RAMM0,PAGE = 0.reset: > RESET,PAGE = 0, TYPE = DSECT /* not used, */.stack: > RAMM1,PAGE = 1.ebss: > RAMLS5|RAMGS0,PAGE = 1.econst: > RAMLS5|RAMGS0,PAGE = 1.esysmem: > RAMLS5,PAGE = 1ramgs0: > RAMGS0,PAGE = 1ramgs1: > RAMGS1,PAGE = 1

#ifdef __TI_COMPILER_VERSION__#if __TI_COMPILER_VERSION__ >= 15009000.TI.ramfunc : {} > RAMM0,PAGE = 0#elseramfuncs: > RAMM0PAGE = 0#endif
#endif/* The following section definitions are for SDFM examples */Filter1_RegsFile : > RAMGS1,	PAGE = 1, fill=0x1111Filter2_RegsFile : > RAMGS2,	PAGE = 1, fill=0x2222Filter3_RegsFile : > RAMGS3,	PAGE = 1, fill=0x3333Filter4_RegsFile : > RAMGS4,	PAGE = 1, fill=0x4444Difference_RegsFile : >RAMGS5, 	PAGE = 1, fill=0x3333
}

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

如果我用flash的cmd文件就没有这样的情况代码也能正常运行,请问我应该修改什么内容呢

Ben Qin:

你好,cmd是例程中的cmd吗?有做过任何修改吗?运行TI的例程能否正常运行?

,

user6057760:

我用了官方例程序报错:

line 58: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".text" size 0x3476 page 0. Available memory ranges: RAMM0 size: 0x2de unused: 0x0 max hole: 0x0 RAMD0 size: 0x800 unused: 0x0 max hole: 0x0 RAMLS0 size: 0x800 unused: 0x0 max hole: 0x0 RAMLS1 size: 0x800 unused: 0x5 max hole: 0x5 RAMLS2 size: 0x800 unused: 0x2 max hole: 0x2 RAMLS3 size: 0x800 unused: 0x7 max hole: 0x7 RAMLS4 size: 0x800 unused: 0x78f max hole: 0x78f "2024.1.16moto_RAM/2837xS_Generic_RAM_lnk.cmd", line 59: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".cinit" size 0x561 page 0. Available memory ranges: RAMM0 size: 0x2de unused: 0x0 max hole: 0x0 "2024.1.16moto_RAM/2837xS_Generic_RAM_lnk.cmd", line 66: error #10099-D: program will not fit into available memory, or the section contains a call site that requires a trampoline that can't be generated for this section. placement with alignment/blocking fails for section ".econst" size 0x414 page 1. Available memory ranges: RAMLS5 size: 0x800 unused: 0x173 max hole: 0x173 error #10010: errors encountered during linking; "2024.1.16moto_RAM.out" not built >> Compilation failuremakefile:182: recipe for target '2024.1.16moto_RAM.out' failedgmake[1]: *** [2024.1.16moto_RAM.out] Error 1makefile:178: recipe for target 'all' failedgmake: *** [all] Error 2

**** Build Finished ****

cmd如下:

MEMORY
{
PAGE 0 :/* BEGIN is used for the "boot to SARAM" bootloader mode*/BEGIN: origin = 0x000000, length = 0x000002RAMM0: origin = 0x000122, length = 0x0002DERAMD0: origin = 0x00B000, length = 0x000800RAMLS0: origin = 0x008000, length = 0x000800RAMLS1: origin = 0x008800, length = 0x000800RAMLS2: origin = 0x009000, length = 0x000800RAMLS3: origin = 0x009800, length = 0x000800RAMLS4: origin = 0x00A000, length = 0x000800RAMGS14: origin = 0x01A000, length = 0x001000RAMGS15: origin = 0x01B000, length = 0x001000RESET: origin = 0x3FFFC0, length = 0x000002PAGE 1 :BOOT_RSVD: origin = 0x000002, length = 0x000120/* Part of M0, BOOT rom will use this for stack */RAMM1: origin = 0x000400, length = 0x000400/* on-chip RAM block M1 */RAMD1: origin = 0x00B800, length = 0x000800RAMLS5: origin = 0x00A800, length = 0x000800RAMGS0: origin = 0x00C000, length = 0x001000RAMGS1: origin = 0x00D000, length = 0x001000RAMGS2: origin = 0x00E000, length = 0x001000RAMGS3: origin = 0x00F000, length = 0x001000RAMGS4: origin = 0x010000, length = 0x001000RAMGS5: origin = 0x011000, length = 0x001000RAMGS6: origin = 0x012000, length = 0x001000RAMGS7: origin = 0x013000, length = 0x001000RAMGS8: origin = 0x014000, length = 0x001000RAMGS9: origin = 0x015000, length = 0x001000RAMGS10: origin = 0x016000, length = 0x001000RAMGS11: origin = 0x017000, length = 0x001000RAMGS12: origin = 0x018000, length = 0x001000RAMGS13: origin = 0x019000, length = 0x001000}SECTIONS
{codestart: > BEGIN,PAGE = 0#ifdef __TI_COMPILER_VERSION__#if __TI_COMPILER_VERSION__ >= 15009000.TI.ramfunc : {} > RAMM0,PAGE = 0#elseramfuncs: > RAMM0PAGE = 0#endif
#endif.text: >>RAMM0 | RAMD0 |RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,PAGE = 0.cinit: > RAMM0,PAGE = 0.pinit: > RAMM0,PAGE = 0.switch: > RAMM0,PAGE = 0.reset: > RESET,PAGE = 0, TYPE = DSECT /* not used, */.stack: > RAMM1,PAGE = 1.ebss: > RAMLS5,PAGE = 1.econst: > RAMLS5,PAGE = 1.esysmem: > RAMLS5,PAGE = 1ramgs0: > RAMGS0,PAGE = 1ramgs1: > RAMGS1,PAGE = 1
}/*
//===========================================================================
// End of file.
//===========================================================================
*/

路径为:

C:\ti\ccs1100\ccs\ccs_base\c2000\include

,

Ben Qin:

你的程序太大了,所以需要修改下cmd,可以把报错的段多放几个ram区,参考下下面这个文件:

TI Linker Command File Primer

赞(0)
未经允许不得转载:TI中文支持网 » TMS320F28377S: 内存溢出
分享到: 更多 (0)