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.

TMS320F28035: 加入卡尔曼滤波器后 出现error 记忆体如何配置

Part Number: TMS320F28035


滤波器已经有验算过 本身运算应该是没问题

用RAM build后 会出现以下问题

细部error如下:

"../F28035_RAM_HVACI_Sensorless.CMD", line 82: error: 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 0x1fe8 page 0. Available
memory ranges:
progRAM size: 0x1800 unused: 0x16e1 max hole: 0x16e1


"../F28035_RAM_HVACI_Sensorless.CMD", line 84: error: 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 0x54f page 0. Available
memory ranges:
RAMM0 size: 0x3b0 unused: 0x3ac max hole: 0x3ac


"../F28035_RAM_HVACI_Sensorless.CMD", line 138: error: 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 "DLOG" size 0x320 page 1. Available
memory ranges:
dataRAM size: 0x800 unused: 0x1ac max hole: 0x1ac

error: errors encountered during linking; "HVACI_Sensorless.out" not built
gmake: *** [HVACI_Sensorless.out] Error 1
gmake: Target 'all' not remade because of errors.

网上查过应该是记忆体配置的问题
调整过长度也去对照他的长度去改过还是不行

之后也用FLASH build 也出现类似的问题如下:


请问有相关经验的人可以给点建议吗?

有想过要直接重置记忆体的部分
但没有找到方法

谢谢

  • 抱歉不太了解“卡尔曼滤波器”,所以只能对报错给出一点建议。

    ram和flash模式下,报错原因基本差不多,都是因为ram或者flash空间不足。ram模式下显示的是progRAM、RAMM0和dataRAM这3个ram区不足,flash模式下是FLASHD区不足。不知道你的滤波器占用空间多大,只能先考虑加大这几个区域的容量来解决报错问题。空间足够的情况下可以多加大一些

  • 谢谢你的回覆
    我有试着更改空间不足的区域 程式确实也可以顺利跑 非常感谢

    但debug后出现这个 是有写到不可写的区域

    C28xx: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will not actually be written to the target. Check your linker configuration and/or memory map.

    到这步我就有点不太要怎么改了
    以下是我的memory allocation 是要从这个看吗?

  • 研究了一下发现应该是我改的地方有重叠到不可写入的內存区域

    我有更改的地方是这三行

    RAMM0 : origin = 0x000050, length = 0x000600   (原: origin = 0x000050, length = 0x0003B0

    progRAM : origin = 0x008000, length = 0x002100   (原: origin = 0x008000, length = 0x001800

    dataRAM    : origin = 0x009800, length = 0x0001000   (原: origin = 0x009800, length = 0x000800

    对照存储器映射的图来看
    progRAM的长度写到保留空间去了 如果我的想法没错的话

    请问有建议更好的更改方式吗? 

    谢谢!

  • 应该是因为改到reserved区域去的原因。

    测试过progRAM的长度必须要0x002100才足够吗?能不能0x002000,这样正好在reserved之前。

  • 没错 只要小于2100 就会error

    不知道要怎么改了

  • 有没有试过代码优化?优化之后可能代码占用的空间会小一点。