DSP应用开发过程中经常遇到的错误总结

2019-07-21 17:22发布


DSP应用开发过程中经常遇到的错误总结:


1.warning: entry point symbol _c_int00 undefined

     使用C写DSP程序时,在rts.lib库中定义了入口地址:_c_int00 而使用汇编语言编程,就不用包括rts.lib库,所以入口地址及其标号可以由人工指定。而使用C时,就不同了,必须从rts.lib定义的这个入口_c_int00入口,是约定的。
     The –c and cr options cause the linker to use linking conventions that are required by the C compiler.”


     其实在汇编语句中也可以不用_c_int00来定义程序入口,只要把编译器选项 -c去掉,用-e 选项来定义你想要的程序入口地址。这个可在CMD文件里加-c。这个错误是没有加库文件,你可以project view 右键加入,也可以在
           project->build options->Linker->libraries中加入....libclslib(搜索路径)
            还要加上库名cslDM642.lib;rts6400.lib分号隔开。

2.Error: Illegal opcode at pc = 0x00000190

     我第一次遇到这种错误,因为B跳转(分支)指令要有五个周期的延时,所以加上NOP 5就好了。
b   .s2 b3
  ;NOP  5
复制代码
3. error: can't allocate .text, size 00006e40 (page 0) in LP (avail: 00001000)
     
>>   error: errors in input - ./Debug/mytest2.out not built

     这种情况是你的CMD文件中分配的存储空间太小了,LP: origin = 0x0,len = 0x1000改成LP: origin = 0x0,len = 0x10000就可以可。

4. error: memory types LP and LD on page 0 overlap

>> warning: can't find a memory area named 'LD' on page 0 for allocation of
            '.stack'
>>   error: can't find any memory areas for allocation of '.stack'
>>   error: can't allocate '.stack' into 'LD' (page 0)
>> warning: can't find a memory area named 'LD' on page 0 for allocation of
            '.sysmem'
>>   error: can't find any memory areas for allocation of '.sysmem'
>>   error: can't allocate '.sysmem' into 'LD' (page 0)


     这种情况呢,又是你的CMD问题,分配的空间太大了。LP : origin = 0x0,     len = 0x100000改成LP : origin = 0x0,     len = 0x10000就好了。

5.
undefined                        first referenced
symbol                              in file
---------                        ----------------
_asmfunc                         C:\CCStudio_v3.3\MyProjects\MyAsmTest\Debug\MyAsmTest.obj
>>   error: symbol referencing errors - './Debug/MyAsmTest.out' not built


解决方法:1.是库的问题  2.把你的汇编程序和C程序起不同的名字。

6.creating output section .const without SECTIONS specification
>> warning: creating output section .switch without SECTIONS specification
>> warning: creating output section .sysmem without SECTIONS specification、


     Printf()需要上面的段.sysmem 段??
     前十个参数将被从左到右依次放入寄存器A4、B4、A6、B6、A8、B8、A10、B10、A12和B12。
返回值是整型或32位的浮点型,则放在寄存器A4中返回;假如返回值是双精度或是长双精度型,则放在A5:A4中返回;假如返回值是一个结构类型,则将其结构的地址放在A3中返回。
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
6条回答
Soraka
1楼-- · 2019-07-21 22:36
有些错误是很奇怪的,不好修改
FCCdsp
2楼-- · 2019-07-22 03:36
这些错误还是比较常见的
gygp
3楼-- · 2019-07-22 06:48
DSP很多都是配置的问题。
gygp
4楼-- · 2019-07-22 12:20
 精彩回答 2  元偷偷看……
isseed
5楼-- · 2019-07-22 16:05
这个应该好好学习总结一下。
isseed
6楼-- · 2019-07-22 19:39
DSP的开发环境有没有相关的总结?

一周热门 更多>