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.

error when compile the examples using xdctools

Other Parts Discussed in Thread: SYSBIOS

Hello,

I am working with dm8168evm and ezsdk5.05.

I have modified saLoopBack example(using cmem as video buffer) and combined it with video_copy example app in codec engine. After that I modified package.bld file.

Changes list below:

    var lld = false;          //line 186

    var ezsdk="/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04";
    var kerneldir=ezsdk+"/board-support/linux-2.6.37-psp04.04.00.01";
    var incsopt = "-I"+kerneldir+"/include -I"+kerneldir+"/arch/arm/include/ -I"+kerneldir+"/arch/arm/plat-omap/include/";

    Pkg.addExecutable(name, targ, platform, {
        incs: incsopt,
        copts: compileOpts,
        profile: theProf,
        cfgScript: cfg + ".cfg",
        cfgArgs: cfgArgs + "lld : " + lld  + "}",
    }).addObjects(srcs);


    if ((cfg.match(/local/)) &&
            (targ.os == undefined) && // Only build lld examples for BIOS
            (!(targ.suffix.match(/^e/))) &&
            (!platform.match(/evm6472/)) && (!platform.match(/DM8148/)) &&
            (!platform.match(/TI816X/))) {
        /* No EDMA3 LLD build for elf or 6472 or DM8168 yet !! */
        lld = true;

        Pkg.addExecutable(name + "_lld", targ, platform, {
        incs: incsopt,
            copts: compileOpts,
            profile: theProf,
            cfgArgs: cfgArgs + "lld : " + lld  + "}",
            cfgScript: cfg + ".cfg"
        }).addObjects(srcs);

    }

Nothing changed else.

The title lines of app.c is

#include <xdc/std.h>
#include <xdc/runtime/Assert.h>
#include <xdc/runtime/Diags.h>
#include <xdc/runtime/Log.h>

#include <ti/sdo/ce/Engine.h>
#include <ti/sdo/ce/osal/Memory.h>
//#include <ti/sdo/ce/video/viddec.h>
#include <ti/sdo/ce/video/videnc.h>

#include <stdlib.h>

/*==============================*/
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <errno.h>
#include <string.h>
#include <linux/videodev2.h>
#include <linux/ti81xxhdmi.h>
#include <linux/ti81xxvin.h>

When I run the command gmake, it broke with info list below:

======== .executables [/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps/video_copy] ========
rm -f package/cfg/bin/ti_platforms_evmTI816X/app_local/app.oe674
#
# cle674 app.c ...
/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/dsp-devkit/cgt6x_7_3_1/bin/cl6x -c  -qq -pdsw225 -mv6740 --abi=eabi -eo.oe674 -ea.se674  -pdr -pden -pds=880 -pds=238 -pds452 -pds195 -mi10 -mo -g  -D_DEBUG_=1  -Dxdc_cfg__header__='ti/sdo/ce/examples/apps/video_copy/package/cfg/bin/ti_platforms_evmTI816X/app_local_pe674.h'  -Dxdc_target_name__=C674 -Dxdc_target_types__=ti/targets/elf/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_3_1 --symdebug:dwarf  -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01/include -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01/arch/arm/include/ -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01/arch/arm/plat-omap/include/ -I. -I/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps/video_copy/../../../../../.. -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/xdais_7_22_00_03/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/bios_6_33_05_46/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/linuxutils_3_22_00_02/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/syslink_2_20_00_14/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/osal_1_22_01_09/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/framework_components_3_22_01_07/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/edma3lld_02_11_05_02/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/ipc_1_24_03_32/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/codec_engine_3_22_01_06/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/xdctools_3_23_03_53/packages -I../../../../../.. -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/dsp-devkit/cgt6x_7_3_1/include -fs=./package/cfg/bin/ti_platforms_evmTI816X/app_local -fr=./package/cfg/bin/ti_platforms_evmTI816X/app_local -fc app.c
"app.c", line 15: fatal error #5: could not open source file "unistd.h"
1 fatal error detected in the compilation of "app.c".
Compilation terminated.

>> Compilation failure
gmake[1]: *** [package/cfg/bin/ti_platforms_evmTI816X/app_local/app.oe674] Error 1
gmake: *** [/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps/video_copy,.executables] Error 2
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps/video_copy'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps'
gmake: *** [apps] Error 2

I dont know the reason why it breaks,but main_native.c(it also have the line #include <unistd.h>) not.

Could anyone tell me how to modify those configure files?

Any help is appreciated.

Thanks,

echo yang.

  • I have made a little changes.

        var ezsdk="/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04";
        var kerneldir=ezsdk+"/board-support/linux-2.6.37-psp04.04.00.01";

        var sourcery = "/home/ccn/CodeSourcery/Sourcery_G++_Lite";
        var sourcery_arm =sourcery+"/arm-none-linux-gnueabi/libc/usr/include"

        var incsopt = "-I"+kerneldir+"/include/ -I"+kerneldir+"/arch/arm/include/ -I"+kerneldir+"/arch/arm/plat-omap/include/ -I"+sourcery_arm;

    others are the same.

    But when I run gmake, it breaks as list below,

    Heap: ti.sysbios.heaps.HeapMem
    rm -f package/cfg/bin/ti_platforms_evmTI816X/app_local_pe674.oe674
    #
    # cle674 package/cfg/bin/ti_platforms_evmTI816X/app_local_pe674.c ...
    /home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/dsp-devkit/cgt6x_7_3_1/bin/cl6x -c  -qq -pdsw225 -mo --no_compress -mv6740 --abi=eabi -eo.oe674 -ea.se674  -pdr -pden -pds=880 -pds=238 -pds452 -pds195 -mi10 -mo -g  --embed_inline_assembly -D_DEBUG_=1  -Dxdc_cfg__header__='ti/sdo/ce/examples/apps/video_copy/package/cfg/bin/ti_platforms_evmTI816X/app_local_pe674.h'  -Dxdc_target_name__=C674 -Dxdc_target_types__=ti/targets/elf/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_3_1 --symdebug:dwarf  -I/home/ccn/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01/include/ -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01/arch/arm/include/ -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/board-support/linux-2.6.37-psp04.04.00.01/arch/arm/plat-omap/include/ -I. -I/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps/video_copy/../../../../../.. -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/xdais_7_22_00_03/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/bios_6_33_05_46/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/linuxutils_3_22_00_02/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/syslink_2_20_00_14/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/osal_1_22_01_09/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/framework_components_3_22_01_07/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/edma3lld_02_11_05_02/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/ipc_1_24_03_32/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/codec_engine_3_22_01_06/packages -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/xdctools_3_23_03_53/packages -I../../../../../.. -I/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/dsp-devkit/cgt6x_7_3_1/include -fs=./package/cfg/bin/ti_platforms_evmTI816X -fr=./package/cfg/bin/ti_platforms_evmTI816X -fc package/cfg/bin/ti_platforms_evmTI816X/app_local_pe674.c
    "/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/xdctools_3_23_03_53/packages/ti/targets/std.h", line 122: error #20: identifier "int_least40_t" is undefined
    "/home/ccn/ti-ezsdk_dm816x-evm_5_05_01_04/component-sources/xdctools_3_23_03_53/packages/ti/targets/std.h", line 123: error #20: identifier "uint_least40_t" is undefined
    "/home/ccn/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/libio.h", line 489: error #20: identifier "__gnuc_va_list" is undefined
    "/home/ccn/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/libio.h", line 491: error #20: identifier "__gnuc_va_list" is undefined
    "/home/ccn/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h", line 347: error #20: identifier "__gnuc_va_list" is undefined
    "/home/ccn/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h", line 352: error #20: identifier "__gnuc_va_list" is undefined
    "/home/ccn/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h", line 355: error #20: identifier "__gnuc_va_list" is undefined
    "/home/ccn/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h", line 366: error #20: identifier "__gnuc_va_list" is undefined
    "/home/ccn/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/bits/pthreadtypes.h", line 71: warning #41-D: expected an identifier
    8 errors detected in the compilation of "package/cfg/bin/ti_platforms_evmTI816X/app_local_pe674.c".

    >> Compilation failure
    gmake[1]: *** [package/cfg/bin/ti_platforms_evmTI816X/app_local_pe674.oe674] Error 1
    gmake: *** [/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps/video_copy,.dlls] Error 2
    gmake[2]: *** [all] Error 2
    gmake[2]: Leaving directory `/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps/video_copy'
    gmake[1]: *** [all] Error 2
    gmake[1]: Leaving directory `/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps'
    gmake: *** [apps] Error 2

    Is there anyone can help?

    Thanks,

    yang.

  • Hello Yang,

    It looks like you are building a BIOS app for the 674 DSP, but you are including Linux header files.  In the first post, you have the error:

    "app.c", line 15: fatal error #5: could not open source file "unistd.h"

    unistd.h is a Linux header file.  Did you intend to include this file in app.c?  I think the error in your second post is caused by using this include path:

    var incsopt = "-I"+kerneldir+"/include/ -I"+kerneldir+"/arch/arm/include/ -I"+kerneldir+"/arch/arm/plat-omap/include/ -I"+sourcery_arm;

    when building the app for the 674 DSP.  I suspect you only want to build your app for Linux side, and not for the DSP.  Does your Linux app have a server running on the DSP?  If that is the case, you can modify this line in the <Codec_Engine_Install_Dir>/examples/xdcpaths.mak file to exclude local builds:

    PROGRAMS := APP_CLIENT DSP_SERVER APP_LOCAL

    by changing it to

    PROGRAMS := APP_CLIENT DSP_SERVER

    If you did want a local Linux app, leave the xdcpaths.mak as it was.  Then you can either modify your package.bld to exclude BIOS builds:




  • Hi Yang,

    Sorry my last reply was not finished, since my editing window just froze up.  So continuing where I left off, you can modify your package.bld to exclude BIOS builds by adding the code in green below:

            if ((programs == undefined) || (programs.match(/APP_LOCAL/))) {
                if (targ.os == undefined) {
                    continue;  // Don't build for BIOS
                }
                /* application with local codecs (using local.cfg) */
                print("    app with local codecs.");
                addExe(targ, platform, "local");
            }

    Another option, in case for some reason you wanted to build your app for both Linux and BIOS, is to add #ifdef's around your Linux code:

    #ifdef xdc_target__os_Linux

    #endif

    Best regards,

        Janet

  • Thank you,

    Janet.

    The problem has been solved with your first solution.

    Than you very much.

    Best regards,

    Yang

  • Hi,

    Janet

    I am sorry to disturb you again

    I have modified saLoopBack and video copy examples to do video capture and codecs.

    In order to do video processing, I have added several steps below to accomplish it in the codec.

    1. allocate new memory using "malloc" to store captured video frames;

    2. transfer captured video(in the cmem buffer) to malloced buffer;

    3. process;

    4. transfer the malloced buffer back to cmem buffers.

    But when I run the application, there is nothing display on the lcd.

    Then I add the code below to check if the memory is allocated indeed.

    if(tmpBuf==NULL) return (-1);

    It runs in error.

    [t=0x001cee64] [tid=0x400ae000] xdc.runtime.Main: [+1] App-> Processing frame 0.
    ..                                                                              
    [t=0x001cf4e4] [tid=0x400ae000] xdc.runtime.Main: [+2] App-> Encoder frame 0 pro
    cess returned - 0xffffffff                                                      
    [t=0x001cf51d] [tid=0x400ae000] xdc.runtime.Main: [+7] App-> Encoder frame 0 pro
    cessing FAILED, status = 0xffffffff, extendedError = 0x2d51d08a                 
    VPSS_DCTRL: failed to disable the venc.                                         
    VPSS_DCTRL: failed to disable hdmi venc                                         
    VPSS_DCTRL: stop venc before changing mode

    Memory related codes list below.

        XDAS_Int8 *tmpBuf;
        tmpBuf=(XDAS_Int8 *)malloc(1280*720*2);
        if(tmpBuf==NULL) return (-1);
        memset(tmpBuf,0x00,1280*720*2);

    And I am not sure why I can not get any message displayed on the console when

    Log_print1(Diags_USER2, "[+2] VIDENCCOPY_TI_process> "
                    "ACPY3 Processed %d bytes.", (IArg)minSamples);

    or some other "print" messages used.

    Hope for your reply.

    Thanks again.

    Regards,

    Yang

  • Hello Yang,

    I don't really have enough information to know what's going wrong.  Maybe you can run your app with CE_DEBUG=2 to get a trace log.  Then we might get a better idea of where the problem is.

    Best regards,

        Janet

  • Thank you,

    Janet.

    I have tried to run the app with CE_DEBUG=2,but no more messages showed on the console.

    Regards,

    Yang

  • Hi,

    Janet,

    I have pasted the problem I am facing here

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/268526.aspx

    And CE_DEBUG=2 works well.

    Hope for your help.

    Regard,

    Yang

     

  • Dear yang:

                I meet the same problem like you. when I run gmake, it breaks as list below

    f "common.h")
    "/root/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/libio.h", line 489: error #20: identifier "__gnuc_va_list" is undefined
    "/root/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/libio.h", line 491: error #20: identifier "__gnuc_va_list" is undefined
    "/root/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h", line 347: error #20: identifier "__gnuc_va_list" is undefined
    "/root/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h", line 352: error #20: identifier "__gnuc_va_list" is undefined
    "/root/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h", line 355: error #20: identifier "__gnuc_va_list" is undefined
    "/root/CodeSourcery/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include/stdio.h", line 366: error #20: identifier "__gnuc_va_list" is undefined

    >> Compilation failure
    gmake[1]: *** [package/cfg/bin/ti_platforms_evmTI816X/app_local_pe674.oe674] Error 1
    gmake: *** [/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps/video_copy,.dlls] Error 2
    gmake[2]: *** [all] Error 2
    gmake[2]: Leaving directory `/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps/video_copy'
    gmake[1]: *** [all] Error 2
    gmake[1]: Leaving directory `/home/ccn/codecexample/examples/ti/sdo/ce/examples/apps'
    gmake: *** [apps] Error 2

    Can you help me how you resolve it?

    Thanks