Hi,
我在编译的时候出错,提示.text的section空间不够,提示空间需要0x453a,差不多17k空间,我看了280049的规格书中LS RAM总共才16k空间,不知道在我这种情况下,我应该怎么去分配text这个空间?
报错具体如下:
<a href="file:/D:/TI/ccs1011/ccs/tools/compiler/dmed/HTML/10099.html">#10099-D</a> 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 0x453a page 0.
规格书的存储空间如下:
Susan Yang:
您可以在.text分配上合并LSRAM和 GSRAM
,
xiao kelvin:
Hi Susan,
GSRAM我大部分分配给了.ebss。
我现在做了一个测试就是把flash_bank0分配给了.text,在运行程序发现无法正常控制EPWM模块。。不知道怎么回事。
MEMORY { PAGE 0 :/* BEGIN is used for the "boot to SARAM" bootloader mode*/BEGIN: origin = 0x000000, length = 0x000002RAMM0: origin = 0x0000F4, length = 0x00030CRAMLS0: origin = 0x008000, length = 0x000800RAMLS1: origin = 0x008800, length = 0x000800RAMLS2: origin = 0x009000, length = 0x000800RAMLS3: origin = 0x009800, length = 0x000800RAMLS4: origin = 0x00A000, length = 0x000800RESET: origin = 0x3FFFC0, length = 0x000002/* Flash sectors: you can use FLASH for program memory when the RAM is filled up*//* BANK 0 */FLASH_BANK0_SEC0: origin = 0x080000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC1: origin = 0x081000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC2: origin = 0x082000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC3: origin = 0x083000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC4: origin = 0x084000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC5: origin = 0x085000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC6: origin = 0x086000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC7: origin = 0x087000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC8: origin = 0x088000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC9: origin = 0x089000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x001000 /* on-chip Flash *//* BANK 1 */FLASH_BANK1_SEC0: origin = 0x090000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC1: origin = 0x091000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC2: origin = 0x092000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC3: origin = 0x093000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC4: origin = 0x094000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC5: origin = 0x095000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC6: origin = 0x096000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC7: origin = 0x097000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC8: origin = 0x098000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC9: origin = 0x099000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC10 : origin = 0x09A000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC11 : origin = 0x09B000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC12 : origin = 0x09C000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC13 : origin = 0x09D000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC14 : origin = 0x09E000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC15 : origin = 0x09F000, length = 0x001000 /* on-chip Flash */PAGE 1 :BOOT_RSVD: origin = 0x000002, length = 0x0000F1/* Part of M0, BOOT rom will use this for stack */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" */RAMLS5: origin = 0x00A800, length = 0x000800RAMLS6: origin = 0x00B000, length = 0x000800RAMLS7: origin = 0x00B800, length = 0x000800RAMGS0: origin = 0x00C000, length = 0x002000RAMGS1: origin = 0x00E000, length = 0x002000RAMGS2: origin = 0x010000, length = 0x002000RAMGS3: origin = 0x012000, length = 0x001FF8 //RAMGS3_RSVD : origin = 0x013FF8, length = 0x000008/* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ }/*You can arrange the .text, .cinit, .const, .pinit, .switch and .econst to FLASH when RAM is filled up.*/ SECTIONS {codestart: > BEGIN,PAGE = 0.TI.ramfunc: > RAMM0,PAGE = 0 //.text: >> RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,PAGE = 0.text: >> FLASH_BANK0_SEC0 | FLASH_BANK0_SEC1 | FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4,PAGE = 0.cinit: > RAMM0,PAGE = 0.switch: > RAMM0,PAGE = 0.reset: > RESET,PAGE = 0, TYPE = DSECT /* not used, */.stack: > RAMM1,PAGE = 1#if defined(__TI_EABI__).bss: > RAMLS5,PAGE = 1.bss:output: > RAMLS5,PAGE = 1.init_array: > RAMM0,PAGE = 0.const: > RAMLS5,PAGE = 1.data: > RAMLS5,PAGE = 1.sysmem: > RAMLS5,PAGE = 1.bss:cio: > RAMLS0,PAGE = 0 #else.pinit: > RAMM0,PAGE = 0.ebss: > RAMLS5|RAMLS6|RAMLS7|RAMGS0|RAMGS1|RAMGS2,PAGE = 1.econst: > RAMGS3,PAGE = 1.esysmem: > RAMGS3,PAGE = 1.cio: > RAMGS3,PAGE = 1 #endiframgs0: > RAMGS0,PAGE = 1ramgs1: > RAMGS1,PAGE = 1}
,
xiao kelvin:
Hi Susan,
还有一个问题就是,我尝试给.ebss分配了RAMLS的空间,在编译的时候提示空间需要0X1148,差不多4k,但是实际上我给他分配了16k,为啥还是会提示空间不够呢?
配置代码为:
.ebss : > RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4 | RAMLS5 | RAMLS6 | RAMLS7, PAGE = 0
报错描述为:
<a href="file:/D:/TI/ccs1011/ccs/tools/compiler/dmed/HTML/10099.html">#10099-D</a> 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. run placement with alignment/blocking fails for section ".ebss" size 0x1148page 0.
这个是哪里出了问题了?
,
Susan Yang:
若是可以的话,请您私信一下工程吧,我们具体看一下,谢谢
,
xiao kelvin:
你好,我已经私信你了,请查收!
,
xiao kelvin:
Hi Susan,我把.text的段分配到flash,然后再debug的时候,无法正常运行,提示错误为:
Break at address "0x3fbd92" with no debug information available, or outside of program code.段配置如下:.text: >> FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC5,PAGE = 0, ALIGN(4)
你也一起帮我看了,
thanks!
,
Susan Yang:
查看您的工程可以看到,您之前cmd的分配并没有成功
而后我修改了一些,您可以看一下。编译后,就没有警告了
MEMORY { PAGE 0 :/* BEGIN is used for the "boot to SARAM" bootloader mode*/BEGIN: origin = 0x000000, length = 0x000002RAMM0: origin = 0x0000F4, length = 0x00030CRAMLS0: origin = 0x008000, length = 0x002000//RAMLS1: origin = 0x008800, length = 0x000800// RAMLS2: origin = 0x009000, length = 0x000800// RAMLS3: origin = 0x009800, length = 0x000800// RAMLS4: origin = 0x00A000, length = 0x000800RESET: origin = 0x3FFFC0, length = 0x000002/* Flash sectors: you can use FLASH for program memory when the RAM is filled up*//* BANK 0 */FLASH_BANK0_SEC0: origin = 0x080000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC1: origin = 0x081000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC2: origin = 0x082000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC3: origin = 0x083000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC4: origin = 0x084000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC5: origin = 0x085000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC6: origin = 0x086000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC7: origin = 0x087000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC8: origin = 0x088000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC9: origin = 0x089000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC10 : origin = 0x08A000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC11 : origin = 0x08B000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC12 : origin = 0x08C000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC13 : origin = 0x08D000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC14 : origin = 0x08E000, length = 0x001000 /* on-chip Flash */FLASH_BANK0_SEC15 : origin = 0x08F000, length = 0x001000 /* on-chip Flash *//* BANK 1 */FLASH_BANK1_SEC0: origin = 0x090000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC1: origin = 0x091000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC2: origin = 0x092000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC3: origin = 0x093000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC4: origin = 0x094000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC5: origin = 0x095000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC6: origin = 0x096000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC7: origin = 0x097000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC8: origin = 0x098000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC9: origin = 0x099000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC10 : origin = 0x09A000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC11 : origin = 0x09B000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC12 : origin = 0x09C000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC13 : origin = 0x09D000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC14 : origin = 0x09E000, length = 0x001000 /* on-chip Flash */FLASH_BANK1_SEC15 : origin = 0x09F000, length = 0x001000 /* on-chip Flash */PAGE 1 :BOOT_RSVD: origin = 0x000002, length = 0x0000F1/* Part of M0, BOOT rom will use this for stack */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" */RAMLS5: origin = 0x00A800, length = 0x000800RAMLS6: origin = 0x00B000, length = 0x000800RAMLS7: origin = 0x00B800, length = 0x000800RAMGS0: origin = 0x00C000, length = 0x002000RAMGS1: origin = 0x00E000, length = 0x002000RAMGS2: origin = 0x010000, length = 0x002000RAMGS3: origin = 0x012000, length = 0x001FF8 //RAMGS3_RSVD : origin = 0x013FF8, length = 0x000008/* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ }/*You can arrange the .text, .cinit, .const, .pinit, .switch and .econst to FLASH when RAM is filled up.*/ SECTIONS {codestart: > BEGIN,PAGE = 0.TI.ramfunc: > RAMM0,PAGE = 0 //.text: >> RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,PAGE = 0 //.text: >> FLASH_BANK0_SEC0 | FLASH_BANK0_SEC1 | FLASH_BANK0_SEC2 | FLASH_BANK0_SEC3 | FLASH_BANK0_SEC4,PAGE = 0.text: >> RAMLS5|RAMLS6|RAMLS7|RAMGS0|RAMGS1|RAMGS2,PAGE = 1.cinit: > RAMM0,PAGE = 0.switch: > RAMM0,PAGE = 0.reset: > RESET,PAGE = 0, TYPE = DSECT /* not used, */.stack: > RAMM1,PAGE = 1#if defined(__TI_EABI__).bss: > RAMLS5,PAGE = 1.bss:output: > RAMLS5,PAGE = 1.init_array: > RAMM0,PAGE = 0.const: > RAMLS5,PAGE = 1.data: > RAMLS5,PAGE = 1.sysmem: > RAMLS5,PAGE = 1.bss:cio: > RAMLS0,PAGE = 0 #else.pinit: > RAMM0,PAGE = 0 //.ebss: > RAMLS5|RAMLS6|RAMLS7|RAMGS0|RAMGS1|RAMGS2,PAGE = 1.ebss: > RAMLS0,PAGE = 0.econst: > RAMGS3,PAGE = 1.esysmem: > RAMGS3,PAGE = 1.cio: > RAMGS3,PAGE = 1 #endiframgs0: > RAMGS0,PAGE = 1ramgs1: > RAMGS1,PAGE = 1}/* //=========================================================================== // End of file. //=========================================================================== */
,
xiao kelvin:
Hi Susan,
我看你就是把LS0 1 2 3 4 合并在一起了。我按照你的写法改,空间确实分配开了,也可以debug,但是为什么合并就可以,分开就不行呢?
,
Susan Yang:
此贴已结,我们将在下面的链接继续讨论后续问题
e2echina.ti.com/…/198968