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.

C6accel_create() exits

Other Parts Discussed in Thread: OMAP3530, DM3730

My program exits when calling C6accel_create().

This is how the testing goes,

first, the C6accel_app demo (comes with DVSDK 4.0) runs successfully;

then, instead of creating an executable, I make the C6accel_app demo a shared library (the main() is renamed as c6accellib());

a testing program is created then. It simply calls c6accellib(), which is the same as the main function in the C6accel_app demo program.

I expect the shared library version could run exactly the same as the original demo does. But it has issue calling the C6accel_create() function to create the C6accel handle.

Something weird I noticed is that occasionally it can create C6accel handle successfully. When I repeat running the program, once in a while it could go through the whole program without any problem. But most of the time, it just exits from C6accel_create.

Is there anything different when creating the handle in a library instead of in a standalone executable? Or the C6accel library could not be used this way?

  • Hi Hongwei,

    Can you provide trace log on error you are seeing? I suspect you might have to re-compile codec engine as shared library as well.

    You can enable trace log using steps described on wiki link below -

    http://processors.wiki.ti.com/index.php/C6Accel_FAQ#What_debugging_options_do_I_have_while_adding_functions_to_C6Accel

     

    Prateek

     

  • Hi Prateek,

    The trace log files are attached, for both cases when c6accel_create exits and passes. Only partial output information has been saved. I can not roll back to copy all the output in my Xterm, neither does it support logging.

    When you say re-compile codec engine, do you mean the .x64P DSP executable?

    Thanks,

    Hongwei

     

    1732.c6accel_exits.txt

    8132.c6accel_passes.txt

  • Hi Hongwei,

     

    The partial trace log is not enough for me to analyze and compare the difference between when the system exits and passes.  Can you save the console output to a file or increase your xterm window buffer/scroll size to maximum and try to get full log?

    Also, can you advise if you are still trying to integrate the codecs (encoder/decoder) package cs.x64P with c6accel.x64P file? Also, it would help to understand reasons fo you looking at shared library file c6accel_lib.so rather than static library.

    Prateek

     

     

  • Hi,

    The full trace logs for both cases when c6accel_create passes and exits are attached. (The original c6accel_app demo was rebuilt as a shared library and called by a test program.)

    Right now I am not trying to integrate the codecs with c6accel. I just want to make sure that c6accel works without any problem, before making things complicated. The .x64P, .cfg etc are all from the c6accel_app demo, which are good for sure. So the problem should be somewhere else.

    I am using shared library because I have trouble using static library. When I try to build the testing program by linking the static library, it keeps complaining that the references to memory_*, Engine_*, and UNIVERSAL_* functions used by c6accel functions in c6accelw_omap3530.a470MV (c6accelw.o) are undefined. I guess I need to link some other library files which contain implementations of those functions, but I don't know which ones and where they are.

     

    Hongwei

     

    3755.log_passes.txt

    2148.log_exits.txt

  • Hongwei,

    With C6Accel, using the c6accelw_omap3530.a470MV static library is recommended. The shared library setup you describe has not been tested. With the static library you need to link in the following libraries to be able to resolve all the symbols.

        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/codec-engine_2_26_01_09/packages/ti/sdo/ce/universal/lib/release/universal.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/codec-engine_2_26_01_09/packages/ti/sdo/ce/lib/release/ce.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/codec-engine_2_26_01_09/packages/ti/sdo/ce/alg/lib/release/Algorithm_noOS.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/codec-engine_2_26_01_09/packages/ti/sdo/ce/alg/lib/release/alg.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/codec-engine_2_26_01_09/packages/ti/sdo/ce/ipc/dsplink/lib/release/ipc_dsplink_3530.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/codec-engine_2_26_01_09/packages/ti/sdo/ce/osal/linux/lib/release/osal_linux_470.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/framework-components_2_25_03_07/packages/ti/sdo/fc/acpy3/lib/release/acpy3.a470MV
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/framework-components_2_25_03_07/packages/ti/sdo/fc/dman3/lib/release/dman3Cfg.a470MV
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/framework-components_2_25_03_07/packages/ti/sdo/fc/utils/lib/release/rmm.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/framework-components_2_25_03_07/packages/ti/sdo/fc/utils/lib/release/smgr.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/framework-components_2_25_03_07/packages/ti/sdo/fc/utils/lib/release/rmmp.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/framework-components_2_25_03_07/packages/ti/sdo/fc/utils/lib/release/smgrmp.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/framework-components_2_25_03_07/packages/ti/sdo/fc/utils/lib/release/shm.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/framework-components_2_25_03_07/packages/ti/sdo/fc/memutils/lib/release/memutils.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/codec-engine_2_26_01_09/packages/ti/sdo/ce/utils/xdm/lib/release/XdmUtils.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/framework-components_2_25_03_07/packages/ti/sdo/utils/trace/lib/release/gt.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/codec-engine_2_26_01_09/packages/ti/sdo/ce/node/lib/release/node.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/local-power-manager_1_24_02_09/packages/ti/bios/power/lib/release/lpm.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/dsplink_1_65_00_02/dsplink/gpp/export/BIN/Linux/OMAP3530/RELEASE/dsplink.lib
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/framework-components_2_25_03_07/packages/ti/sdo/fc/scpy/lib/release/scpy.av5T
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/cmem/lib/cmem.a470MV
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/sdma/lib/sdma.a470MV
        /home/user/ti-dvsdk_omap3530-evm_4_01_00_09/xdctools_3_16_03_36/packages/gnu/targets/arm/rtsv5T/lib/gnu.targets.arm.rtsv5T.av5T

    When you build the C6accel package, you can see this list in the linker.cmd file under $(C6ACCEL_INSTALL_DIR)/soc/app/c6accel_app_config. Also add the compiler options specified under compiler.opt in that directory to find all required input header files.

    Regards,

    Rahul

  • Thanks Rahul for your comments.

    Hongwei,

    I also looked at the log differences and found that one of thread creation (OP-daemon) was out of order. Further, some of libraries in shared library mode like IUNIVERSAL does not seem to get called implying they are not visible in shared library context. This would also require  all the components libraries like codec engine, framework components have to be re-compiled as .so file as well. As Rahul mentioned, this is use-case that has not been tested and recommendation would be to stick with static library usage.

    Prateek

  • Prateek and Rahul,

    Following your instruction, I built my codes, which make c6accel library calls, as a static library. And other codes that use this static library are compiled and linked with the headers and libraries you've mentioned. Then c6accel doesn't cause any problem anymore.

    Thank you for your help!

    Hongwei

  • Prateek/Rahul,

    I’m trying to use the c6accel API to accelerate an ARM application on the DM3730. The application has a Java front-end that loads several shared libraries (in C/C++) at runtime. I’ve linked the static c6accel library and its dependent static libraries from DVSDK4.02 into one of the shared C++ libraries that I’m wishing to accelerate. I run the loadmodules script that came with the c6accel demo app and then proceed to run the application. The CERuntime_init() call succeeds, but the c6accel_create() call crashes. I don’t see the UNIVERSAL_create() call occur in the trace log as compared to a trace log from running the c6accel demo application. When I do an “nm” on the shared library that linked in c6accel and associated libs, I see the UNIVERSAL_create symbol listed. So its not clear to me what is going wrong. Please help.

    Thanks,

    Chris

  • Is UNIVERSAL create symbol listed as "T" (text) or "U" (undefined). It is has to be listed as T for it to be called. If it is U, it is undefined and dont have the symbol defined.

     

    Prateek

     

  • Prateek,

    Yes, UNIVERSAL_create symbol is listed as "T".

    Thanks,

    Chris

  • Chris,

     

    did you resolve your error ? I got the same, all crach when c6accel_create() is call in c6accel_app...