最近我要在DM6446上面集成一个.lib文件,这个.lib是在CCS下的dsp端编译的(其功能很简单,就是实现拷贝数据,从输入拷贝到输出),这个.lib在CCS下编写是没有遵照XDM标准的。
现在我要集成到DM6446上来,将刚才那个.lib文件,以及涉及的.h头文件放在了目录/opt/dvevm_1_20/codec_engine_1_10_01/examples/codecs/viddec_copy下,将viddec_copy.c 文明中拷贝数据的语句换成了函数(函数名为Copy),其声明在.h文件中,实现在.lib库中。我通过修改这个codec,对这个*.lib做了一个简单的封装,使其遵循xDM的标准,然后在ARM端调用xDM的接口,调用这个.lib的功能。
因此我在这个viddec_copy的package.bld文件里添加了这一句话(假设这个.lib文件放在viddec_copy目录下,名为copy_test.lib):
Pkg.attrs.lopts = "-l ./copy_testt.lib"
在编译.a64文件(见下文)时没有提示错误;
但在编译整个.x64P文件(即Server)的最后出现了链接错误,内容如下(我要生成的.a64P文件为viddec_copy.a64P',.x64P文件为video_copy.x64P' ):
undefined first referenced
symbol in file
--------- ----------------
_Copy /opt/develop/examples/codecs/viddec_copy/lib/viddec_copy.a64P
>> error: relocation overflow occurred at address 0x000000ec in section
'.text' of input file 'viddec_copy.o64P
(/opt/develop/examples/codecs/viddec_copy/lib/viddec_copy.a64P)'.
The 29-bit PC-relative displacement 505859352 at this location is
too large to fit into the 21-bit PC-Relative field; the destination
address is too far away from the instruction. You may need to add a
mask to the assembly instruction or use other target specific
assembly features if you really only need the lowest 21 bits of
this symbol. Please see the section on Relocation in the Assembly
User's Guide.
>> error: symbol referencing errors - 'video_copy.x64P' not built
gmake[1]: *** [video_copy.x64P] Error 1
gmake: *** [/opt/develop/examples/servers/video_copy,.executables] Error 2
make: *** [all] Error 2
我现在想知道是在DVSDK的编译环境下面如果在Codec里面调用*.lib文件,在创建算法server的时候应该如何配置自己的编译脚本?
这个问题困扰了我好久了,希望TI的专家们能予以回复。非常感谢
另外:那个.lib文件,在ccs下的dsp端编译的时候,cgttool的版本和DVSDK下的cgt版本是一致的

