This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280049C: cmd文件链接内存分区

Part Number: TMS320F280049C
Other Parts Discussed in Thread: SYSCONFIG

我使用TI的SysConfig一次性配置了多个外设,8个epwm,16个ADCA的SOC。编译报错说内存问题,在memory allocation视图下,初步可以认为是因为.text.1太大,而cmd所连接的内存分区太小而导致的编译报错。我知道这种报错如何修改,只是在回顾曾经写的bug日志有了更多的思考。

对此我有以下两个个疑问。

1. 我使用的ram_cmd进行链接的,该文件所指明的text分区放在RAMLS0、RAMLS1、RAMLS2、RAMLS3、RAMLS4中,但很明显RAMLS2并没有完全使用,RAMLS3、RAMLS4甚至没有写入任何东西,为什么这里提到的这个.text.1反而fail placement?

2. .text分区中的内容是可执行代码和常量,那.text.x的意义是什么呢?如图中的RAMLS0下的.text.2,RAMLS1下的.text.3和RAMLS2下的.text.4。

  • Hi,

    因为您将.text进行了拆分放置,所以会出现几个.text.x输出节。

    您上传的这个图片不太完整,有些东西我看不到。方便的话可否上传更详细些的?

    是否可以将您使用的cmd文件及生成的map文件也上传上来?

    --

    谢谢!

  • 你好,我这边上传文件只能以url的形式上传,我就用网盘传吧。

    链接:pan.baidu.com/.../1rjRpmgmQ4IGcZaH9byvopA
    提取码:zxg5

    里面的内容是这个工程创建出来的.map文件,使用的cmd文件是CCS默认生成的generic_ram_Ink,且没有对其内容作任何修改。

    谢谢!

  • Hi,

    点击上传可以选择本地文件进行上传。

    --

    谢谢

  • file.zip谢谢!cmd和map文件都在里面了

  • Hi,

    方便把编译时的报错信息再发一下吗?谢谢!

  • <Linking>
    "../cmd/28004x_generic_ram_lnk.cmd", line 76: 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 0x186b page 0. Available memory ranges:
    RAMLS0 size: 0x800 unused: 0x0 max hole: 0x0
    RAMLS1 size: 0x800 unused: 0x0 max hole: 0x0
    RAMLS2 size: 0x800 unused: 0x7ab max hole: 0x7ab
    RAMLS3 size: 0x800 unused: 0x800 max hole: 0x800
    RAMLS4 size: 0x800 unused: 0x800 max hole: 0x800
    error #10010: errors encountered during linking; "Project00-ProjectTemplate-2022-12-27 13-01-27.out" not built

    >> Compilation failure
    makefile:185: recipe for target 'Project00-ProjectTemplate-2022-12-27 13-01-27.out' failed
    gmake[1]: *** [Project00-ProjectTemplate-2022-12-27 13-01-27.out] Error 1
    makefile:181: recipe for target 'all' failed
    gmake: *** [all] Error 2

    **** Build Finished ****

  • Hi,

    确实是内存不足引起的。

    placement with alignment/blocking fails for section ".text" size 0x186b page 0.

    放置失败的这一部分大小是0x186b,

    RAMLS2 size: 0x800 unused: 0x7ab max hole: 0x7ab
    RAMLS3 size: 0x800 unused: 0x800 max hole: 0x800
    RAMLS4 size: 0x800 unused: 0x800 max hole: 0x800

    而剩余可用的内存大小是0x17ab。