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中加入../../lib/cls/lib/(搜索路径)还要加上库名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