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.
您好,我在CLA里增加代码的时候遇到了一个问题。
比如当前的CLA的RAM空间还有71%,然后我加入一段含有fabs函数的代码,编译就会报CLA RAM空间不足,如果去掉fabs这个函数,编译就可以通过,请问这个是什么原因,在CLA调用fabs会占用很大空间吗?
加入fabs函数之前,CAL RAM空间仅用了71%,
在CLA调用fabs函数之后,编译会报CLA RAM空间不足的故障:
您好,您给CLA1 program分配了哪些内存空间?
可以给它增加一些内存分配试试看。
您有参考哪个例程吗?我没有在CLA的相关文档中找到关于函数fabs的描述。方便的话请告知一下。
您好!
谢谢你的回复。
我是自己编写的程序,CMD文件分配的空间是Cla1Prog : origin = 0x008000, length = 0x002000;
我发现在CLA里面,如果写了fabs(A*B*C)这样的语句,就会编译不过去,但是如果加入一个中间变量,改写为D = A*B*C, fabs(D),这样子就可以编译过去了,空间也没增加多少。
我不大清楚为什么在CLA里面,按照fabs(A*B*C)这样子写会报空间不足?
我的推测是这可能与类型转换有关。
fabs(A*B*C)
直接使用类似的写法,可能直接会传一个64位的数据给该函数,而CLA最高只支持32位的数据。所以会报程序与内存不兼容。您帖上来的报错不完整,后面的内容我无法知晓,但感觉并不是程序大小的问题。
D = A*B*C, fabs(D)
而您使用类似写法,加入一个中间变量时,D会被编译器强制优化为32位的数据
谢谢你的回复,我把编译不过时的结果复制下来了,请帮忙看一下,谢谢!
<Linking>
"../cmd/28003x_cla_flash_lnk.cmd", line 85: 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. run placement with alignment/blocking fails for section "Cla1Prog" size 0x23de page 0. Available memory ranges:
Cla1Prog size: 0x2000 unused: 0x2000 max hole: 0x2000
error #10010: errors encountered during linking; "3-6KW_280039_V0.10.33.out" not built
>> Compilation failure
makefile:208: recipe for target '3-6KW_280039_V0.10.33.out' failed
gmake[1]: *** [3-6KW_280039_V0.10.33.out] Error 1
gmake[1]: Target 'secondary-outputs' not remade because of errors.
makefile:204: recipe for target 'all' failed
gmake: *** [all] Error 2
**** Build Finished ****
hi,我刚刚尝试了一下进入Debug页面的Disassemby窗口,但是CLA里面没法设置断点,也不能用Run to line定位,所以我没办法找到对应CLA代码的的汇编代码
hi, 我刚刚试了加入在CLA的代码加入__mdebugstop();语句,然后在Debug页面连接CLA, connect Target,但是代码一直无法运行,而且报无法连接,no debug information available, 这个是为什么?我少操作了哪一步了吗?
感谢你的回复,
我是按照文档的82去做,先用仿真器连接DSP,然后点击调试窗口的CLA处理器,然后RUN->Connect target,下面就会弹出这种信息:Break at address "0x0" with no debug information available, or outside of program code.
然后点击运行按钮也没办法运行。