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.

关于CCS下在dsp端编译的.lib文件在Codec里的引用



最近我要在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版本是一致的

 

  • 你好,

    能否用工具做一个codec package,让后做一个codec server?

    http://processors.wiki.ti.com/index.php/Codec_Engine_GenCodecPkg_Wizard_FAQ

  • 根据这个链接介绍的,http://processors.wiki.ti.com/index.php/How_do_I_Integrate_new_codecs_into_DVSDK#How_to_Download_MP3_Decoder,我创建了h264的server,在最后链接的时候,出现如下错误:

    ........................(在这之前都没有出现任何错误)

    rm -f encodeCombo.x64P
    #
    # lnk64P encodeCombo.x64P ...
    rm -f package/cfg//encodeCombo.x64P.map
    /opt/dvevm_1_20/cg6x_6_0_14/bin/lnk6x -w -q -u _c_int00 -l link.cmd -q -o encodeCombo.x64P package/cfg/encodeCombo_x64Pcfg_c.o64P package/cfg/encodeCombo/main.o64P package/cfg/encodeCombo_x64P.o64P package/cfg/encodeCombo_x64Pcfg.o64P  package/cfg/encodeCombo_x64P.xdl  -c -m package/cfg//encodeCombo.x64P.map -l /opt/dvevm_1_20/cg6x_6_0_14/lib/rts64plus.lib
    >> warning: creating output section $build.attributes without SECTIONS
                specification
    >> warning: Half-word displacement of 789aa5bd required at
                /opt/dvevm_1_20/codec_servers_1_23/packages/ti/sdo/codecs/h264enc/lib/h264venc_ti.l64P, section .text:H264VENC_TI_cSect1, SPC offset 0001e70c, but instruction doesn't support

    >>   error: relocation overflow occurred at address 0x0002825c in section
                '.text:H264VENC_TI_cSect1' of input file 'h264venc_ti_plink.o64P
                (/opt/dvevm_1_20/codec_servers_1_23/packages/ti/sdo/codecs/h264enc/lib/h264venc_ti.l64P)'.  The 29-bit PC-relative displacement 505831400 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.

    gmake[1]: *** [encodeCombo.x64P] Aborted
    gmake: *** [/opt/dvevm_1_20/codec_servers_1_23/packages/ti/sdo/servers/encode,.executables] Error 2
    make: *** [all] Error 2

    根据上面的warning,这个是没有为程序分配内存段吗? 如果是的话我应该在哪里添加呢;如果不是这个原因,那么到底是因为什么引起的呢?

    请TI的专家么予以回复,谢谢

     

  • 你好。我按照这个做了。

    结果是能制作codec package并能编译通过,但是在制作codec server时,发现Platform只有三个,如图

    如何添加我想要的,如如6467等。另外我用evm3530制作的server编译时出现,如下错误