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.

TDA4VM: LDC kernel code

Part Number: TDA4VM
Other Parts Discussed in Thread: SYSBIOS

Dear Sir/Madam,

I use TDA4VM, SDK 7.3 and IMX390 camera.
I trace "Camera based Object Detection Application" source code.
I want to add new function into LDC kernel code.

I tried following test.
<< add print message into tiovx\kernels_j7\hwa\vpac_ldc\vx_vpac_ldc_target.c>>
static vx_status VX_CALLBACK tivxVpacLdcProcess()
{
...
Fvid2_FrameList *outFrmList;
uint64_t cur_time;

VX_PRINT(VX_ZONE_INFO, "tivxVpacLdcProcess start ....")

...
}

<< rebuild code>>
"make sdk" under vision_apps directory.

<< run vx_app_tidl_od_cam.out on TDA4VM>>
But I can't see the "tivxVpacLdcProcess start ...." that print on console.

I think, tivxVpacLdcProcess() API will be repeat call when program running.
Did I modify error file and API?
Have I error step to rebuild code?

Could you give me suggestion?

Best regards

-Jason

  • Hi Jason,

    Not sure which example you are using? could you please share the exact path of the example? 

    Also please check if the graph includes LDC node in it. If it is not, then process API of LDC will not be invoked. 

    Regards,

    Brijesh

  • Dear Brijesh,

    Thank you about your reply.

    The path of example is vision_apps/apps/dl_demos/app_tidl_od_cam

    The graph include LDC node.

    It show LDC message after enable the APP_DEBUG of app_common.h.

    ...

    App Init Done!
    Graph create done!
    Capture graph done!
    VISS graph done!
    AEWB graph done!
    LDC graph done!
    Scaler graph done!
    Pre proc graph done!

    ...

    Best regards

    -Jason

  • Hi Jason,

    When you rebuild the code, can you do "make tiovx && make sdk"? The changes seem to be correct, but looks like updated LDC kernel is not included in the build. Can you explicitly rebuild tiovx and then check it? 

    Regards,

    Brijesh 

  • Hi Brijesh,

    I did "make tiovx && make sdk" command.
    Run vx_app_tidl_od_cam.out on TDA4VM
    But I can't see the "tivxVpacLdcProcess start ...." that print on console.
    Could you give me suggestion?

    Best regards

    -Jason

  • Hi Jason,

    Strange, can you add some errors in this function and check if you are getting build error? Just want to see if it is getting build from the same code base.

    Also can you please change info to ERROR, as shown below? Typically, applications dont enable info messages. only Error messages are enabled.

    VX_PRINT(VX_ZONE_ERROR, "tivxVpacLdcProcess start ....")

    Regards,

    Brijesh

  • Hi Brijesh,

    (1)
    If I change from
    VX_PRINT(VX_ZONE_INFO, "tivxVpacLdcProcess start ....")
    to
    aaa VX_PRINT(VX_ZONE_INFO, "tivxVpacLdcProcess start ....")

    It can get error when use "make tiovx && make sdk" command.

    >> Compilation failure
    concerto/finale.mak:310: recipe for target '/home/jason/ti_tda4x_7_03/ti-processor-sdk-rtos-j721e-evm-07_03_00_07/tiovx/out/J7/R5F/SYSBIOS/release/module/.home.jason.ti_tda4x_7_03.ti-processor-sdk-rtos-j721e-evm-07_03_00_07.tiovx.kernels_j7.hwa.vpac_ldc/vx_vpac_ldc_target.obj' failed

    (2)
    If I change from
    VX_PRINT(VX_ZONE_INFO, "tivxVpacLdcProcess start ....")
    to
    VX_PRINT(VX_ZONE_ERROR, "tivxVpacLdcProcess start ....")
    But I can't see "tivxVpacLdcProcess start ...." on the console when run vx_app_tidl_od_cam.out.

    Best regards

    -Jason

  • Hi Jason,

    Strange, could you please confirm that at the beginning, you are running vision_apps_init.script (cd /opt/vision_apps && source ./vision_apps_init.sh)?

    Regards,

    Brijesh

  • Hi Brijesh,

    I did "source ./vision_apps_init.sh" before run vx_app_tidl_od_cam.out.
    I can't see "tivxVpacLdcProcess start ...." on the console.

    I did following test.

    (1) backup current vx_app_tidl_od_cam.out
    cp vx_app_tidl_od_cam.out vx_app_tidl_od_cam_old.out

    (2) change print message (in tiovx\kernels_j7\hwa\vpac_ldc\vx_vpac_ldc_target.c tivxVpacLdcProcess() )
    from
    VX_PRINT(VX_ZONE_ERROR, "tivxVpacLdcProcess start ....")
    to
    VX_PRINT(VX_ZONE_ERROR, "tivxVpacLdcProcess start ....change......................")

    (3) rebuild by "make tiovx && make sdk" command
    It get new vx_app_tidl_od_cam.out

    (4) compare new and old vx_app_tidl_od_cam.out
    But both files have same md5sum result.
    New vx_app_tidl_od_cam.out doesn't get any update.
    It is strange.
    Why new vx_app_tidl_od_cam.out no update?

    Best regards

    -Jason

  • Hi Jason,

    The change is in the R5F firmware, not in the application. You could compare the mcu2_0 firmware, that should be changed. 

    I did small experiment, i also added this print in the LDC node and ran multi-camera example with this updated node, i could see these prints on the console.


    =========================
    Demo : Camera Demo
    =========================

    s: Save CSIx, VISS and LDC outputs

    p: Print performance statistics

    x: Exit

    Enter Choice: [MCU2_0] 50.664261 s: VX_ZONE_ERROR:[tivxVpacLdcProcess:227] tivxVpacLdcProcess start ....
    [MCU2_0] 50.697455 s: VX_ZONE_ERROR:[tivxVpacLdcProcess:227] tivxVpacLdcProcess start ....
    [MCU2_0] 50.731001 s: VX_ZONE_ERROR:[tivxVpacLdcProcess:227] tivxVpacLdcProcess start ....
    [MCU2_0] 50.764250 s: VX_ZONE_ERROR:[tivxVpacLdcProcess:227] tivxVpacLdcProcess start ....

    So it looks like you firmware is somehow not getting updated. Can you please check if you are running "make sdk && make linux_fs_install_sd"? and the last command is successful? Can you also check the md5check sump of firmware in /lib/firmware folder in SD card and the one in the vision_apps/out folder. 

    Regards,

    Brijesh

  • Hi Brijesh,

    It can print out "tivxVpacLdcProcess start ...." after run "make sdk && make linux_fs_install_sd".
    The "make linux_fs_install_sd" is the solution about my problem.

    But I have one problem about "make linux_fs_install_sd".
    For example,
    I installed the FFmpeg into SD card.
    Then, I use "make linux_fs_install_sd" to update SD card.
    Will the "make linux_fs_install_sd" overwrite the FFmpeg of SD card?
    Will the "make linux_fs_install_sd" overwrite the installed packages?

    Best regards

    -Jason

  • Hi Jason,

    oh ok, good to know it is working fine now. 

    No, linux_fs_install_sd will overwrite vision app components, like firmware, libraries, vision apps binaries. It will not overwrite ffmpeg.

    Regards,

    Brijesh