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.

PROCESSOR-SDK-DRA8X-TDA4X: How to link external libraries in pdk drv?

Part Number: PROCESSOR-SDK-DRA8X-TDA4X

Hi, experts

At present, i am working on CPSW0 debugging, you know CPSW0 is controlled by mcu2_0, so I want to output CPSW0 driver debug information to share memory, in this case Linux can see these information.

In CPSW0 implementation,  function CpswAppUtils_print() will output to UART port, here I want to reimplement this function and output info to share memory.

To achieve this goal, I want to use appLogPrintf() function which implemented in vision_apps/utils/console_io/..

So head file path( vision_apps/utils/console_io/include/app_log.h) , library path(vision_apps/lib/J7/R5F/SYSBIOS/release), and library app_utils_console_io.lib need add to pdk/drv/cpsw makefile.

please help me how to change the makefile, thanks a lot, waiting your reply!

yuanfan

  • Hi, experts

    I am working on SDK0700 with pdk version pdk_jacinto_07_00_00, the makefile rules for pdk looks complicated, I don't know the make variables for adding PATH of header file and library file.

    who can tell me, thanks a lot!

    yuanfan

  • Hi

    Can you take a look at gateway-demos example inside the SDK ? Specifically the makefile inside gateway-demos/can_eth_gateway ? It has variables for external library and header file.

    Regards

    Vineet

  • Hi, Vineet

    Thanks a lot for your reply.  I don't know the exact meaning of  variable INCLUDE_EXTERNAL_INTERFACES and how to set it correctly.

    From makefile spec, it means the list names of components. what's meaning of components and which components sdk supports? 

    yuanfan

  • No, use the variable EXT_LIB_LIST_COMMON and assign the library directly.

    Regards

    Vineet

  • Hi, Vineet

    Thanks a lot, I have added the vaiable of EXT_LIB_LIST_COMMON and assign the library accordingly. 

    The problem is that the head file can not be found when compiling, the error was as following.

    I have added INCLUDE PATH in makefile, but doesn't work.

    INCDIR += $(SDK_INSTALL_PATH)/ethfw/

    (app_log.h is at $(SDK_INSTALL_PATH)/ethfw/utils/console_io/include/app_log.h)

    >> Compilation failure
    /home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/build/makerules/rules_ti_cgt_arm.mk:213: recipe for target '/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/baremetal/obj/j721e_evm/mcu2_0/release/cpsw_apputils.oer5f' failed
    make[5]: *** [/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/baremetal/obj/j721e_evm/mcu2_0/release/cpsw_apputils.oer5f] Error 1
    /home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/build/makefile:358: recipe for target 'cpsw_apputils_baremetal' failed
    make[4]: *** [cpsw_apputils_baremetal] Error 2
    makefile:116: recipe for target 'cpsw_apputils_baremetal_has_dep' failed
    make[3]: *** [cpsw_apputils_baremetal_has_dep] Error 2
    make[3]: *** 正在等待未完成的任务....
    # Compiling j721e_evm:j721e:mcu2_0:release:cpsw_apputils_full: cpsw_networkutils.c
    "cpsw_apputils.c", line 73: fatal error: cannot open source file "utils/console_io/include/app_log.h"
    1 catastrophic error detected in the compilation of "cpsw_apputils.c".
    Compilation terminated.

    >> Compilation failure
    /home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/build/makerules/rules_ti_cgt_arm.mk:213: recipe for target '/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos_full/obj/j721e_evm/mcu2_0/release/cpsw_apputils.oer5f' failed
    make[5]: *** [/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos_full/obj/j721e_evm/mcu2_0/release/cpsw_apputils.oer5f] Error 1
    make[5]: *** 正在等待未完成的任务....
    ^C[/home/yuanfan/vbox_sdk/sdk/ti-cgt-arm_20.2.0.LTS/bin/armcl forced exit]
    [/home/yuanfan/vbox_sdk/sdk/ti-cgt-arm_20.2.0.LTS/bin/armcl forced exit]

    Compilation terminated.

    Compilation terminated.
    /home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/build/makerules/rules_ti_cgt_arm.mk:213: recipe for target '/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos_full/obj/j721e_evm/mcu2_0/release/cpsw_networkutils.oer5f' failed
    make[5]: *** [/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos_full/obj/j721e_evm/mcu2_0/release/cpsw_networkutils.oer5f] Error 2
    /home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/build/makerules/rules_ti_cgt_arm.mk:213: recipe for target '/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos/obj/j721e_evm/mcu2_0/release/cpsw_appmemutils.oer5f' failed
    make[5]: *** [/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos/obj/j721e_evm/mcu2_0/release/cpsw_appmemutils.oer5f] Error 2

  • Hi, Vineet

    I have added variable of EXT_LIB_LIST_COMMON and assign the library accordingly, but it reported error when compiling, head file can not be found.

    you can see the error log below.

    I already added INCLUDE PAHT in makefile,  

    INCDIR += $(SDK_INSTALL_PATH)/ethfw/ (app_log.h is at $(SDK_INSTALL_PATH)/ethfw/utils/console_io/include/app_log.h)
    but it does't work.

    >> Compilation failure
    /home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/build/makerules/rules_ti_cgt_arm.mk:213: recipe for target '/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/baremetal/obj/j721e_evm/mcu2_0/release/cpsw_apputils.oer5f' failed
    make[5]: *** [/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/baremetal/obj/j721e_evm/mcu2_0/release/cpsw_apputils.oer5f] Error 1
    /home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/build/makefile:358: recipe for target 'cpsw_apputils_baremetal' failed
    make[4]: *** [cpsw_apputils_baremetal] Error 2
    makefile:116: recipe for target 'cpsw_apputils_baremetal_has_dep' failed
    make[3]: *** [cpsw_apputils_baremetal_has_dep] Error 2
    make[3]: *** 正在等待未完成的任务....
    # Compiling j721e_evm:j721e:mcu2_0:release:cpsw_apputils_full: cpsw_networkutils.c
    "cpsw_apputils.c", line 73: fatal error: cannot open source file "utils/console_io/include/app_log.h"
    1 catastrophic error detected in the compilation of "cpsw_apputils.c".
    Compilation terminated.

    >> Compilation failure
    /home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/build/makerules/rules_ti_cgt_arm.mk:213: recipe for target '/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos_full/obj/j721e_evm/mcu2_0/release/cpsw_apputils.oer5f' failed
    make[5]: *** [/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos_full/obj/j721e_evm/mcu2_0/release/cpsw_apputils.oer5f] Error 1
    make[5]: *** 正在等待未完成的任务....
    ^C[/home/yuanfan/vbox_sdk/sdk/ti-cgt-arm_20.2.0.LTS/bin/armcl forced exit]
    [/home/yuanfan/vbox_sdk/sdk/ti-cgt-arm_20.2.0.LTS/bin/armcl forced exit]

    Compilation terminated.

    Compilation terminated.
    /home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/build/makerules/rules_ti_cgt_arm.mk:213: recipe for target '/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos_full/obj/j721e_evm/mcu2_0/release/cpsw_networkutils.oer5f' failed
    make[5]: *** [/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos_full/obj/j721e_evm/mcu2_0/release/cpsw_networkutils.oer5f] Error 2
    /home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/build/makerules/rules_ti_cgt_arm.mk:213: recipe for target '/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos/obj/j721e_evm/mcu2_0/release/cpsw_appmemutils.oer5f' failed
    make[5]: *** [/home/yuanfan/vbox_sdk/sdk/pdk_jacinto_07_00_00/packages/ti/binary/ti/drv/cpsw/examples/cpsw_apputils/tirtos/obj/j721e_evm/mcu2_0/release/cpsw_appmemutils.oer5f] Error 2

  • Hi,

    1. Try removing the additional last slash from INCDIR += $(SDK_INSTALL_PATH)/ethfw/

    INCDIR += $(SDK_INSTALL_PATH)/ethfw

    2. If above doesn't work then app_log.h looks like a simple file with no dependencies. You can duplicate it in your code.

    Regards

    Vineet

  • Hi, Vineet

    I had tried to remove last slash of the path INCDIR += $(SDK_INSTALL_PATH)/ethfw/, it still doesn't work. 

    Finally, I copied the app_log.h  to local, it works.

    Thank you very much for your support.

    yuanfan