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.

dm6437 demo project conversion problem - link and build problem

Other Parts Discussed in Thread: CCSTUDIO

I am converting the app_block_video_decode.c from dm437_demo.prj . In the process I have converted data structures and invocation sequences originally for xDM 0.9  to match the one described in xDM 1.2 - so in essence I am converting dvsdk_1_11 to dvsdk_2_00 that is required to run h264dec rev.2.00 which is the true reason for this exercise.. For example,


/* setup the codec */
result = VIDDEC2_control(

self->hCodec,

XDM_SETPARAMS,

&self-viddecDynamicParams,

&self->viddecStatus);
APP_SYSTEM_ASSERT(

result == 0,

"IVIDDEC2_control('XDM_SETPARAMS') failed");

 

It all compiles well but during the link it complains that it can not find

-------------------------  dm6437_demo_av.pjt - Debug  -------------------------

[Linking...] "C:\Program Files\Texas Instruments\C6000 Code Generation Tools 6.0.24\bin\cl6x" -@"Debug.lkf"

<Linking>

>> warning: creating output section $build.attributes without SECTIONS

            specification

 

undefined                        first referenced

 symbol                              in file

---------                        ----------------

_IVIDDEC2_process                C:\\dvsdk_2_00_00_02\\dm6437_demo_1_30_04\\Debug\\app_block_video_decode.obj

_IVIDDEC2_control                C:\\dvsdk_2_00_00_02\\dm6437_demo_1_30_04\\Debug\\app_block_video_decode.obj

>>   error: relocation overflow occurred at address 0x00000680 in section

            '.text:_LOCAL_doFirstFrame' of input file

            'C:\\dvsdk_2_00_00_02\\dm6437_demo_1_30_04\\Debug\\app_block_video_decode.obj'.  The 29-bit PC-relative displacement 519430944 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 - './Debug/dm6437_demo.out' not built

 

>> Compilation failure

Build Complete,

  6 Errors, 1 Warnings, 0 Remarks.

It obviously can not find IVIDECC2_xxx which is perhaps the right thing to do because in the include file

 

#include <ti/sdo/ce/video2/viddec2.h>
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

We have declaration:

extern Int32 VIDDEC2_control(VIDDEC2_Handle handle, VIDDEC2_Cmd id, VIDDEC2_DynamicParams *params, VIDDEC2_Status *status);

So it seems that we are missing a library with VIDDEC2_control/ VIDDEC2_process/…. But perhaps it is not entirely true since the linker interestingly recognizes (or at least does not complain about) VIDDEC2_create which is declared in the same file. To add to the confusion all these functions are referred in TI literature as IVIDDEC2_XXX but in the viddec2.h they are declared as external VIDDEC2_xxx . So I promptly changed references to VIDDEC2_xxx but it does not help and the link fails ….

So in summary, it does not help whether I try to link to IVIDDEC2_xxxx or to VIDDEC2_xxx but it works for VIDDEC2_create …

Can you help to untangle this problem?

<!--[if !supportLists]-->1.       <!--[endif]-->Which library should be linked? – I am checking this because of our earlier problems with XDC and we are using as XDC option the following:

-@"xdcopt.txt" --xdcpathsfile="xdcpaths.dat" -tti.targets.C64P -pti.platforms.evmDM6437 -rdebug --tcf -Dconfig.importPath=".;../;../examples/common/evmDM6437"

Where xdcopt.txt:

-Dxdc.path=C:/dvsdk_2_00_00_02/xdais_6_24_01_06/packages;C:/dvsdk_2_00_00_02/codec_engine_2_10_02/packages;C:/dvsdk_2_00_00_02/codec_engine_2_10_02/examples;C:/dvsdk_2_00_00_02/framework_components_2_20_01/packages;C:/dvsdk_2_00_00_02/codecs_2_00/packages;C:/dvsdk_2_00_00_02/ndk_1_92_00_22_eval/packages;C:/dvsdk_2_00_00_02/pspdrivers_1_10_00/packages;C:/dvsdk_2_00_00_02/edma3_lld_01_10_00_01/packages;C:/dvsdk_2_00_00_02/examples/common/evmDM6437;C:/CCStudio_v3.3/bios_5_41_03_17/packages;.;..;C:/dvsdk_2_00_00_02/xdctools_3_10_05_61/packages;c:/dvsdk_2_00_00_02/biosutils_1_02_02/packages
-Dconfig.importPath=C:/dvsdk_2_00_00_02/xdais_6_24_01_06/packages;C:/dvsdk_2_00_00_02/codec_engine_2_10_02/packages;C:/dvsdk_2_00_00_02/codec_engine_2_10_02/examples;C:/dvsdk_2_00_00_02/framework_components_2_20_01/packages;C:/dvsdk_2_00_00_02/codecs_2_00/packages;C:/dvsdk_2_00_00_02/ndk_1_92_00_22_eval/packages;C:/dvsdk_2_00_00_02/pspdrivers_1_10_00/packages;C:/dvsdk_2_00_00_02/edma3_lld_01_10_00_01/packages;C:/dvsdk_2_00_00_02/examples/common/evmDM6437;C:/CCStudio_v3.3/bios_5_41_03_17/packages;.;..;C:/dvsdk_2_00_00_02/xdctools_3_10_05_61/packages;c:/dvsdk_2_00_00_02/biosutils_1_02_02/packages

<!--[if !supportLists]-->2.       <!--[endif]-->Why it correctly links VIDDEC2_create but fails to link VIDDEC2_create/process/delete ... ?

Thanks for suggestions,

 

ja