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.

RTOS: Adding library to Algorithm plugin link

Tool/software: TI-RTOS

Hello,

I have created library for dsp which does edge detection.

Now i want to call function from library in algorithm plugin link .

I am taking reference from /vision_sdk/apps/src/rtos/alg_plugins/edgedetection plugin, as

1. created "lib" folder under /vision_sdk/apps/src/rtos/alg_plugins/samplePlugin.

2. library is placed at the same path.

3, created "include" folder  and placed ./h file of library.

But at build time getting below error,

# Linking into /vision_sdk/binaries/apps/tda2xx_evm_bios_all/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe66...

 undefined          first referenced                                                                                                                                  
  symbol                in file                                                                                                                                       
 ---------          ----------------                                                                                                                                  
 egdeDetection /home/kajalk/TDA/sdk_installed/vision_sdk/binaries/apps/tda2xx_evm_bios_all/lib/tda2xx-evm/66/release/app_alg_plugins.ae66<samplePLuginLink_algPlugin.oe66>

error: unresolved symbols remain
error: errors encountered during linking;
   "/vision_sdk/binaries/apps/tda2xx_evm_bios_all
   /vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe66" not built
make[7]: *** /vision_sdk/binaries/apps/tda2xx_evm_bios_all/vision_sdk/bin/tda2xx-evm/vision_sdk_c66xdsp_1_release.xe66] Error 1
make[6]: *** [c66xdsp_1] Error 2
make[5]: *** [apps_dsp1] Error 2
make[4]: *** [apps] Error 2
make[3]: *** [apps] Error 2
make[2]: *** [apps_exe] Error 2
make[1]: *** [apps] Error 2
gmake: *** [vision_sdk] Error 2

Anything else need to do to get it work ?

vision sdk configuration,

SYS BIOS

PROCESSOR_SDK_VISION_03_00_00_00

Regards,

Kajal

  • Hi Kajal,

    You need to add your library in the vision_sdk/apps/MAKEFILE.MK makefile in order to get it linked in the final binary.

    Rgds,
    Brijesh
  • Thank you for the information Brijesh.

    Regards,
    Kajal
  • Hello Brijesh,

    In case of EVE, is the same procedure for adding library to the algorithm plugin??

    Regards,

    Kajal

  • Kajal,

    Yes, it is true even for EVE libraries. You can see in this file that there are multiple libraries added for the EVE as well.

    Rgds,
    Brijesh
  • Hello Brijesh,

    We have created library for EVE by taking these files with CCS,

    egdeDetection.k

    egdeDetection.h

    And called from algorithm plugin function, but we are not getting any output on screen .

    So, is it the right way to create library for EVE? (because for DSP there is no problem)

    We also tracked flow by adding printfs before calling and after calling, below are the logs on console

    [IPU1-0]     13.141401 s:  
    [IPU1-0]     13.145580 s:  CAPTURE: Create in progress !!!
    [IPU1-0]     13.145824 s:  CAPTURE: VIP1 Slice0 PortA capture mode is [16-bit] !!!
    [IPU1-0]     13.331879 s:  CAPTURE: Create Done !!!
    [IPU1-0]     13.332275 s:  IPC_OUT_0   : Create in progress !!!
    [IPU1-0]     13.332611 s:  IPC_OUT_0   : Create Done !!!
    [EVE1  ]     13.332977 s:  IPC_IN_0   : Create in progress !!!
    [EVE1  ]     13.334075 s:  IPC_IN_0   : Create Done !!!
    [EVE1  ]     13.334655 s:  ALGORITHM: Create in progress (algId = 22) !!!
    [IPU1-0]     13.465290 s:  IPC_IN_0   : Create in progress !!!
    [IPU1-0]     13.466662 s:  IPC_IN_0   : Create Done !!!
    [IPU1-0]     13.466998 s:  DISPLAY: Create in progress !!!
    [IPU1-0]     13.467577 s:  DISPLAY: Create Done !!!
    [IPU1-0]     13.467730 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [IPU1-0]     13.467821 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 262144 B (256 KB), Free size = 250800 B (244 KB)
    [IPU1-0]     13.467974 s:  SYSTEM: Heap = SR_OCMC              @ 0x00000000, Total size = 0 B (0 KB), Free size = 0 B (0 KB)
    [IPU1-0]     13.468126 s:  SYSTEM: Heap = SR_DDR_CACHED        @ 0x89d03000, Total size = 368037888 B (350 MB), Free size = 314124288 B (299 MB)
    [IPU1-0]     13.468370 s:  SYSTEM: Heap = SR_DDR_NON_CACHED    @ 0xbfc00000, Total size = 129152 B (0 MB), Free size = 117632 B (0 MB)
    [IPU1-0]     13.471603 s:  CHAINS: Sensor create in progress !!!
    [IPU1-1]     13.468706 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [IPU1-1]     13.468858 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 655360 B (640 KB), Free size = 624024 B (609 KB)
    [HOST  ]     13.469163 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [HOST  ]     13.469194 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 6291456 B (6144 KB), Free size = 6279992 B (6132 KB)
    [DSP1  ]     13.469346 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [DSP1  ]     13.469377 s:  SYSTEM: Heap = LOCAL_L2             @ 0x00800000, Total size = 227264 B (221 KB), Free size = 227264 B (221 KB)
    [DSP1  ]     13.469438 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 524288 B (512 KB), Free size = 518328 B (506 KB)
    [DSP2  ]     13.469621 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [DSP2  ]     13.469651 s:  SYSTEM: Heap = LOCAL_L2             @ 0x00800000, Total size = 227264 B (221 KB), Free size = 227264 B (221 KB)
    [DSP2  ]     13.469712 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 524288 B (512 KB), Free size = 518328 B (506 KB)
    [EVE1  ]     13.463643 s:  ALGORITHM: Create Done (algId = 22) !!!
    [EVE1  ]     13.464436 s:  IPC_OUT_0   : Create in progress !!!
    [EVE1  ]     13.464893 s:  IPC_OUT_0   : Create Done !!!
    [EVE1  ]     13.470017 s:  SYSTEM: SW Message Box Msg Pool, Free Msg Count = 1023
    [EVE1  ]     13.470322 s:  SYSTEM: Heap = LOCAL_L2             @ 0x40020000, Total size = 22528 B (22 KB), Free size = 22528 B (22 KB)
    [EVE1  ]     13.470871 s:  SYSTEM: Heap = LOCAL_DDR            @ 0x00000000, Total size = 262144 B (256 KB), Free size = 242160 B (236 KB)
    [EVE1  ]     13.580400 s: calling vcop_vec_gradients
    [EVE1  ]     13.580949 s: calling vcop_vec_gradients done
    [EVE1  ]     13.594156 s: calling vcop_vec_gradients
    [IPU1-0]     13.561611 s:  CHAINS: Sensor create ... DONE !!!
    [IPU1-0]     13.561733 s:  DISPLAY: Start in progress !!!
    [IPU1-0]     13.561794 s:  DISPLAY: Start Done !!!
    [IPU1-0]     13.563167 s:  CAPTURE: Start in progress !!!
    [IPU1-0]     13.565576 s:  CAPTURE: Start Done !!!
    [IPU1-0]     13.567162 s:
    [IPU1-0]  
    [IPU1-0]  ====================
    [IPU1-0]  Chains Run-time Menu
    [IPU1-0]  ====================
    [IPU1-0]  
    [IPU1-0]  0: Stop Chain
    [IPU1-0]  
    [IPU1-0]  2: Pause Capture
    [IPU1-0]  3: Resume Capture
    [IPU1-0]  
    [IPU1-0]  p: Print Performance Statistics
    [IPU1-0]  
    [IPU1-0]  Enter Choice:
    [IPU1-0]  
    [IPU1-0]     13.567498 s:
    [IPU1-0] Unsupported option '
    [IPU1-0] '. Please try again
    [IPU1-0]     13.567559 s:
    [IPU1-0]  
    [IPU1-0]  ====================
    [IPU1-0]  Chains Run-time Menu
    [IPU1-0]  ====================
    [IPU1-0]  
    [IPU1-0]  0: Stop Chain
    [IPU1-0]  
    [IPU1-0]  2: Pause Capture
    [IPU1-0]  3: Resume Capture
    [IPU1-0]  
    [IPU1-0]  p: Print Performance Statistics
    [IPU1-0]  
    [IPU1-0]  Enter Choice:

    Regards,

    Kajal Karande.

  • Hi Kajal,

    so it means it does call your algorithm function. Now what happens inside it i am not sure? Please check if the output from the algorithm is as expected.. Check it first in standalone environment..

    Rgds,
    Brijesh
  • Hello Brijesh,

    In standalone environment we have tested this library, it works fine.

    I guess there could be problem with memory.
    For your information my current kernel/library is using 88x72 size image and i cant process huge image size as of now due to my kernel limitation. so do you think size limitation is a problem? or how i can check if my link not handling the out from the library

    Regards,
    Kajal
  • Hi Kajal,

    Which algorithm link that you are using? Have you newly added this algorithm link or updated existing link?

    Regards,
    Brijesh
  • Hello Brijesh,

    Algorithm link is newly added and reference is taken from framecopy link.

    Regards,

    Kajal

  • Hi Kajal,

    ok, so in this case, the buffers should be allocated by the link itself, can you check in your link that you are allocating buffer with the correct frame size? At the create time, you would receive the previous link information, and depending on that, you would need to allocate the buffers for the output side. Now how much to allocate output buffers depends on the your algorithm. 

    Can you connect CCS to EVE and check if call goes inside the algorithm's process function and execute it successfully? Check if it outputs correctly in the output buffer provided to your algorithm..

    Rgds,

    Brijesh

  • Hello Brijesh,

    "ok, so in this case, the buffers should be allocated by the link itself, can you check in your link that you are allocating buffer with the correct frame size? At the create time, you would receive the previous link information, and depending on that, you would need to allocate the buffers for the output side. Now how much to allocate output buffers depends on the your algorithm. "

    >> At create time , output buffers are allocated. Size of buffers are okay, meaning from prev channel i.e capture link height and width are 1080p as expected.

    "Can you connect CCS to EVE and check if call goes inside the algorithm's process function and execute it successfully? Check if it outputs correctly in the output buffer provided to your algorithm.. "

    >>This will need some time , will let you know.

    Regards,
    Kajal
  • Hi Kajal,

    Any update on this issue? Are able to get it working now?

    Rgds,
    Brijesh
  • Hello Brijesh,

    Not yet, we are facing issue in debugging, when we connect hardware with JTAG and try to load binaries on different-different cores then most of the time H/W gets disconnected.
    We couldn't get any chance where we had all core connected to execute/debug program.
    We have already raised a ticket for same.

    e2e.ti.com/.../2469601

    Regards,
    Kajal
  • Kajal,

    There is already a reply from Prasad on this thread. Were you able to check if there is any change in memory configuration?

    Regards,
    Brijesh
  • Hi Kajal,

    Let us know if we can close this thread.

    Rgds,
    Brijesh