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.

how to use gettimeofday in viodeo_copy of omap 3530 for measure my code time.

my board is 3530.

I want to measure code time in dsp,so include <sys/time.h> in app.c.

/usr/local/dvsdk/codec-engine_2_26_01_09/examples/ti/sdo/ce/examples/apps/video_copy/app.c

but compile is error.

"app.c", line 49: fatal error #5: could not open source file "sys/time.h"

two question:

1,what fuction is to measure time?

2,how to use gcc standard library in video_copy?

  • Hi Liangxiao,

    1. It is correct to use the gettimeofday function for time measuring but an other function is more popular - time from <time.h> header file. 

    2. You can try to edit the include paths for your project.  Basically the compiler needs to know where to look for this file.

    If you are using CCS you can edit your include paths by right clicking on your project. Select Properties. Under CCS Build you should see your compiler.  Expand that and look for the Include Options group.  Click on it and then on the right hand side you will be able to setup the include paths.

    If all with the path is right you can find an example for usage of the gettimeofday function in the ./c6run_0_98_03_03/test/common/malloc_test/main.c file.

    An other example for gettimeofday usage could be found in the ./linuxutils_2_26_02_05/packages/ti/sdo/linuxutils/cmem/apps/apitest/apitest.c file.

    BR

    Tsvetolin Shulev

  • 1,Today I use time and clock in time.h,but get the time always is 0.0000.why?

    2,I compile video_copy in linux,it is not in CCS.So how to add the path?i.e. sys/time.h?

  • I cann't understand:

    when compile app.c, 

    #
    # cl64P app.c ...
    /usr/local/dvsdk/cgt6x_6_1_14/bin/cl6x -c -qq -pdsw225 -pden -pds=195 -mv64p -eo.o64P -ea.s64P -Dxdc_cfg__header__='ti/sdo/ce/examples/apps/video_copy/package/cfg/bin/ti_platforms_evm3530/app_local_x64P.h' -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_6_1_14 -O2 -DBUFALIGN=128 -DCACHE_ENABLED -I. -I/usr/local/dvsdk/codec-engine_2_26_01_09/examples/ti/sdo/ce/examples/apps/video_copy/../../../../../.. -I/usr/local/dvsdk/codec-engine_2_26_01_09/packages -I/usr/local/dvsdk/xdais_6_26_00_02/packages -I/usr/local/dvsdk/linuxutils_2_25_05_11/packages -I/usr/local/dvsdk/framework-components_2_25_03_07/packages -I/usr/local/dvsdk/biosutils_1_02_02/packages -I/usr/local/dvsdk/local-power-manager_1_24_02_09/packages -I/usr/local/dvsdk/edma3lld_01_11_00_03/packages -I/usr/local/dvsdk/dspbios_5_41_03_17/packages -I/usr/local/dvsdk/dsplink_1_65_00_02 -I/usr/local/dvsdk/xdctools_3_16_03_36/packages -I../../../../../.. -I/usr/local/dvsdk/dspbios_5_41_03_17/packages/ti/bios/include -I/usr/local/dvsdk/cgt6x_6_1_14/include -fs=./package/cfg/bin/ti_platforms_evm3530/app_local -fr=./package/cfg/bin/ti_platforms_evm3530/app_local -fc app.c

    why /usr/local/dvsdk/cgt6x_6_1_14/bin/cl6x must compile app.c?

    compile app.c to generate file in linux,it must be gcc to compile.

    because cl64P app.c, and it isn't gettimeofday in dvsdk/codec-engine_2_26_01_09/packages/ti/sdo/ce/.

    So when I make, it error.

    can you tell me why ?

  • I solve it.

    because I config xdcpaths.mak

    PROGRAMS := APP_CLIENT DSP_SERVER APP_LOCAL

    change:

    PROGRAMS := APP_CLIENT DSP_SERVER #APP_LOCAL

    success.