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/TDA2PXEVM: Adding new directory in PSDK driver code

Part Number: TDA2PXEVM

Tool/software: TI-RTOS

Hello All,

I have added new files in a  new directory created in ..\ti_components\drivers\pdk_01_08_01_06\packages\ti\drv 

The new files are use to support the EEPROM read write function from vsdk use case. The files are working as expected. (when these files are placed in boards folder and added in the make file )

Now I want have a new directory with these files in the path .\ti_components\drivers\pdk_01_08_01_06\packages\ti\drv  , so that when vision sdk is built (gmake -s -j depend), the newly added files are also build.

I have taken reference of boards folder inside vps folder and made changes in build system, but still it does not build the files and shows the message as "Nothing to be done for <new component>.

I have attached the <component.mk> file here in. Please let me know if any document i can refer to integrate the new directory in the build system.

I am using  Processor_SDK_3.02

regards

Hrishikesh

# File: vps_component.mk
#       This file is component include make file of VPS library.
# List of variables set in this file and their purpose:
# <mod>_RELPATH        - This is the relative path of the module, typically from
#                        top-level directory of the package
# <mod>_PATH           - This is the absolute path of the module. It derives from
#                        absolute path of the top-level directory (set in env.mk)
#                        and relative path set above
# <mod>_INCLUDE        - This is the path that has interface header files of the
#                        module. This can be multiple directories (space separated)
# <mod>_PKG_LIST       - Names of the modules (and sub-modules) that are a part
#                        part of this module, including itself.
# <mod>_BOARD_DEPENDENCY - "yes": means the code for this module depends on
#                             platform and the compiled obj/lib has to be kept
#                             under <platform> directory
#                             "no" or "" or if this variable is not defined: means
#                             this module has no platform dependent code and hence
#                             the obj/libs are not kept under <platform> dir.
# <mod>_CORE_DEPENDENCY     - "yes": means the code for this module depends on
#                             core and the compiled obj/lib has to be kept
#                             under <core> directory
#                             "no" or "" or if this variable is not defined: means
#                             this module has no core dependent code and hence
#                             the obj/libs are not kept under <core> dir.
# <mod>_APP_STAGE_FILES     - List of source files that belongs to the module
#                             <mod>, but that needs to be compiled at application
#                             build stage (in the context of the app). This is
#                             primarily for link time configurations or if the
#                             source file is dependent on options/defines that are
#                             application dependent. This can be left blank or
#                             not defined at all, in which case, it means there
#                             no source files in the module <mod> that are required
#                             to be compiled in the application build stage.
#

ifeq ($(ffcsensor_component_make_include), )

ffcsensor_default_SOCLIST = tda2px  
ffcsensor_default_tda2xx_CORELIST = a15_0 ipu1_0 c66x arp32_1
ffcsensor_default_tda2px_CORELIST =  ipu1_0  
ffcsensor_default_tda2ex_CORELIST = a15_0 c66x ipu1_0
ffcsensor_default_tda3xx_CORELIST = ipu1_0 c66x arp32_1
ffcsensor_app_default_tda2xx_CORELIST = a15_0 ipu1_0
ffcsensor_app_default_tda2px_CORELIST =  ipu1_0
ffcsensor_app_default_tda2ex_CORELIST = a15_0 ipu1_0
ffcsensor_app_default_tda3xx_CORELIST = ipu1_0

############################
# firewall_l3l4 package
# List of components included under firewall_l3l4
# The components included here are built and will be part of firewall_l3l4 lib
############################
ffcsensor_LIB_LIST = ffc_boards


ffcsensor_EXAMPLE_LIST =

#

#

# ffcsensor Firewall LIB
ffcsensor_COMP_LIST = ffc_boards
ffcsensor_RELPATH = ti/drv/ffc_sensor
ffcsensor_PATH = $(PDK_FFCSENSOR_COMP_PATH)
ffcsensor_LIBNAME = ffc_boards
ffcsensor_LIBPATH = $(PDK_FFCSENSOR_COMP_PATH)/lib
ffcsensor_MAKEFILE = -fsrc/makefile
export ffcsensor_MAKEFILE
export ffcsensor_LIBNAME
export ffcsensor_LIBPATH
ffcsensor_BOARD_DEPENDENCY = no
ffcsensor_CORE_DEPENDENCY = no
export ffcsensor_COMP_LIST
export ffcsensor_BOARD_DEPENDENCY
export ffcsensor_CORE_DEPENDENCY
ffcsensor_PKG_LIST = ffc_boards
ffcsensor_INCLUDE = $(ffcsensor_PATH)
ffcsensor_SOCLIST = $(ffcsensor_default_SOCLIST)
export ffcsensor_SOCLIST
ffcsensor_$(SOC)_CORELIST = $(ffcsensor_default_$(SOC)_CORELIST)
export ffcsensor_$(SOC)_CORELIST

#
# Firewall Examples
#
# L4 Firewall Example
#drv_firewall_l4_test_app_COMP_LIST = drv_firewall_l4_test_app
#drv_firewall_l4_test_app_RELPATH = ti/drv/fw_l3l4/examples/l4_firewall
#drv_firewall_l4_test_app_PATH = $(PDK_FIREWALL_L3L4_COMP_PATH)/examples/l4_firewall
#drv_firewall_l4_test_app_BOARD_DEPENDENCY = no
#drv_firewall_l4_test_app_CORE_DEPENDENCY = yes
#export drv_firewall_l4_test_app_COMP_LIST
#export drv_firewall_l4_test_app_BOARD_DEPENDENCY
#export drv_firewall_l4_test_app_CORE_DEPENDENCY
#drv_firewall_l4_test_app_PKG_LIST = drv_firewall_l4_test_app
#drv_firewall_l4_test_app_INCLUDE = $(drv_firewall_l4_test_app_PATH)
#drv_firewall_l4_test_app_SOCLIST = $(firewall_l3l4_default_SOCLIST)
#export drv_firewall_l4_test_app_SOCLIST
#drv_firewall_l4_test_app_$(SOC)_CORELIST = $(firewall_l3l4_app_default_$(SOC)_CORELIST)
#export drv_firewall_l4_test_app_$(SOC)_CORELIST
#firewall_l3l4_EXAMPLE_LIST += drv_firewall_l4_test_app

#
# Firewall Examples
#
# L3 Firewall Example
#drv_firewall_l3_test_app_COMP_LIST = drv_firewall_l3_test_app
#drv_firewall_l3_test_app_RELPATH = ti/drv/fw_l3l4/examples/l3_firewall
#drv_firewall_l3_test_app_PATH = $(PDK_FIREWALL_L3L4_COMP_PATH)/examples/l3_firewall
#drv_firewall_l3_test_app_BOARD_DEPENDENCY = no
#drv_firewall_l3_test_app_CORE_DEPENDENCY = yes
#export drv_firewall_l3_test_app_COMP_LIST
#export drv_firewall_l3_test_app_BOARD_DEPENDENCY
#export drv_firewall_l3_test_app_CORE_DEPENDENCY
#drv_firewall_l3_test_app_PKG_LIST = drv_firewall_l3_test_app
#drv_firewall_l3_test_app_INCLUDE = $(drv_firewall_l3_test_app_PATH)
#drv_firewall_l3_test_app_SOCLIST = $(firewall_l3l4_default_SOCLIST)
#export drv_firewall_l3_test_app_SOCLIST
#drv_firewall_l3_test_app_$(SOC)_CORELIST = $(firewall_l3l4_app_default_$(SOC)_CORELIST)
#export drv_firewall_l3_test_app_$(SOC)_CORELIST
#firewall_l3l4_EXAMPLE_LIST += drv_firewall_l3_test_app

export ffcsensor_LIB_LIST
#export ffcsensor_EXAMPLE_LIST

ffcsensor_component_make_include := 1
endif









  • Hi Hrishikesh,

    There are multiple issues:
    1. component.mk is defined in top level makerules so the name of the file should be drv_component.mk.
    2. You should define corelist only for those SoCs for which the particular driver is defined. In this case you should define corelist only for tda2px.
    3. I don't see any example defined in this file. Hence defining ffcsensor_app_default_<soc>_CORELIST doesn't serve any purpose.
    4. You need to make changes in <pdk>\packages\ti\build\comp_paths.mk, <pdk>\packages\ti\build\makerules\component.mk and <pdk>\packages\ti\build\makerules\env.mk
    BOARD_DEPENDENCY and CORE_DEPENDENCY should be defined as per the driver. I hope you have understood the implications of making them as no as given at the top of vps_component.mk.

    Regards,
    Rishabh
  • Hi Rishabh,

    Thanks for the reply. I have done following 

    1.updated the ffceeprom_component for new directory ffc_eeprom with applicable  soc and core. I have attached the ffceeprom_component file herein.

    2. Updated rules.make path at  ..\pdk_01_08_01_06\packages\ti\build

    PDK_FFCEEPOM_ROOT_PATH ?= $(pdk_PATH)
    PDK_FFCEEPOM_COMP_PATH = $(PDK_FFCEEPOM_ROOT_PATH)/ti/drv/ffc_eeprom
    export PDK_FFCEEPOM_COMP_PATH

    3.Updated  ..\ti\build\makerules\component.mk  with following

    # - used to ignore include if component not present
    -include $(PDK_FFCEEPOM_COMP_PATH)/ffceeprom_component.mk
    ifneq ($(ffceeprom_LIB_LIST),)
    pdk_LIB_LIST += $(ffceeprom_LIB_LIST)
    endif

    4. updated rules.mk file at ...\vision_sdk\build\rtos\makerules with following

    PDKLIB_PATH +=$(pdk_PATH)/packages/ti/drv/ffc_eeprom/lib/$(SOC)/$(ISA)/$(PROFILE_$(CORE))/ffc_eeprom.aem4

    5. Updated env.mk at pdk_01_08_01_06\packages\ti\build\makerules

    with 

    ifneq ($(PDK_FFCEEPROM_ROOT_PATH), $(pdk_PATH))
    pdk_INCLUDE += $(PDK_FFCEEPROM_ROOT_PATH)
    endif

    But still it shows the same error as nothing to be done for ffc_eeprom.

    This error is coming from the line number 148 of makefile at ..\ti_components\drivers\pdk_01_08_01_06\packages\ti\build

    Please let me know if i am missing some settings

    regards

    Hrishikesh

    # File: vps_component.mk
    #       This file is component include make file of VPS library.
    # List of variables set in this file and their purpose:
    # <mod>_RELPATH        - This is the relative path of the module, typically from
    #                        top-level directory of the package
    # <mod>_PATH           - This is the absolute path of the module. It derives from
    #                        absolute path of the top-level directory (set in env.mk)
    #                        and relative path set above
    # <mod>_INCLUDE        - This is the path that has interface header files of the
    #                        module. This can be multiple directories (space separated)
    # <mod>_PKG_LIST       - Names of the modules (and sub-modules) that are a part
    #                        part of this module, including itself.
    # <mod>_BOARD_DEPENDENCY - "yes": means the code for this module depends on
    #                             platform and the compiled obj/lib has to be kept
    #                             under <platform> directory
    #                             "no" or "" or if this variable is not defined: means
    #                             this module has no platform dependent code and hence
    #                             the obj/libs are not kept under <platform> dir.
    # <mod>_CORE_DEPENDENCY     - "yes": means the code for this module depends on
    #                             core and the compiled obj/lib has to be kept
    #                             under <core> directory
    #                             "no" or "" or if this variable is not defined: means
    #                             this module has no core dependent code and hence
    #                             the obj/libs are not kept under <core> dir.
    # <mod>_APP_STAGE_FILES     - List of source files that belongs to the module
    #                             <mod>, but that needs to be compiled at application
    #                             build stage (in the context of the app). This is
    #                             primarily for link time configurations or if the
    #                             source file is dependent on options/defines that are
    #                             application dependent. This can be left blank or
    #                             not defined at all, in which case, it means there
    #                             no source files in the module <mod> that are required
    #                             to be compiled in the application build stage.
    #
    
    ifeq ($(ffceeprom_component_make_include), )
    
    ffceeprom_default_SOCLIST = tda2px  
    
    ffceeprom_default_tda2px_CORELIST =  ipu1_0  
    
    
    
    ffceeprom_LIB_LIST = ffc_eeprom
    
    
    ffceeprom_EXAMPLE_LIST =
    
    
    
    # L3/L4 Firewall LIB
    ffceeprom_COMP_LIST = ffc_eeprom
    ffceeprom_RELPATH = ti/drv/ffc_eeprom
    ffceeprom_PATH = $(PDK_FFCEEPOM_COMP_PATH)
    ffceeprom_LIBNAME = ffc_eeprom
    ffceeprom_LIBPATH = $(PDK_FFCEEPOM_COMP_PATH)/lib
    ffceeprom_MAKEFILE = -f src/makefile
    export ffceeprom_MAKEFILE
    export ffceeprom_LIBNAME
    export ffceeprom_LIBPATH
    ffceeprom_BOARD_DEPENDENCY = yes
    ffceeprom_CORE_DEPENDENCY = yes
    export ffceeprom_COMP_LIST
    export ffceeprom_BOARD_DEPENDENCY
    export ffceeprom_CORE_DEPENDENCY
    ffceeprom_PKG_LIST = ffc_eeprom
    ffceeprom_INCLUDE = $(ffceeprom_PATH)
    ffceeprom_SOCLIST = $(ffceeprom_default_SOCLIST)
    export ffceeprom_SOCLIST
    ffceeprom_$(SOC)_CORELIST = $(ffceeprom_default_$(SOC)_CORELIST)
    export ffceeprom_$(SOC)_CORELIST
    
    
    
    export ffceeprom_LIB_LIST
    
    
    ffceeprom_component_make_include := 1
    endif
    
    
    
    
    
    
    
    
    
    
    #
    # This file is the makefile for building VPS boards library.
    #
    include $(PDK_INSTALL_PATH)/ti/build/Rules.make
    
    MODULE_NAME = ffc_eeprom
    
    SRCDIR = src
    INCDIR = . src
    
    # List all the external components/interfaces, whose interface header files
    # need to be included for this component
    INCLUDE_EXTERNAL_INTERFACES = pdk
    INCLUDE_INTERNAL_INTERFACES = csl    
    
    CFLAGS_LOCAL_COMMON = $(PDK_CFLAGS) $(VPSLIB_CFLAGS) $(VPSDRV_CFLAGS)
    PACKAGE_SRCS_COMMON = ../include/ffc_boards
    
    # Common source files and CFLAGS across all platforms and cores
    SRCS_COMMON = 
    ifeq ($(SOC),$(filter $(SOC),tda2px ))
    SRCS_COMMON += ffc_board_i2c_eeprom.c ffc_board.c
    endif
    
    
    # Core/SoC/platform specific source files and CFLAGS
    # Example:
    #   SRCS_<core/SoC/platform-name> =
    #   CFLAGS_LOCAL_<core/SoC/platform-name> =
    
    # Include common make files
    ifeq ($(MAKERULEDIR), )
    #Makerule path not defined, define this and assume relative path from ROOTDIR
      MAKERULEDIR := $(ROOTDIR)/ti/build/makerules
      export MAKERULEDIR
    endif
    include $(MAKERULEDIR)/common.mk
    
    # OBJs and libraries are built by using rule defined in rules_<target>.mk
    #     and need not be explicitly specified here
    
    # Nothing beyond this point
    

  • Hi Hrishikesh,

    How are you trying to build? What is the build command?

    Regards,
    Rishabh
  • Hi Rishabh
    I am trying to build vsdk, by first giving command gmake -s -depend where I am expecting to build ffc_eeprom module, whose call i had given from my use case in vsdk . But as described in earlier mail, it is not building.
    Also when i had put these sources in vps/boards/ and called from vsdk use case, it was building and working as expected.
    regards
    Hrishikesh
  • Hi Hrishikesh,

    Ok I missed this point.
    I would suggest you to first build it from PDK build folder and make sure that build is fine.
    In order to build from VSDK you need to do a clean build so that this is included in pdk_libs dependency.

    Regards,
    Rishabh
  • Hi Rishabh,
    Yes, I tried to build pdk also but it is returning same error, are my makefile and component.mk are ok along with other changes in mk files ?
    regards
    Hrishikesh
  • Hi,

    Can you run the command "make -s ffc_eeprom BOARD=tda2px-evm CORE=ipu1_0" and share the results. Please make sure you are doing clean build.

    Regards,
    Rishabh
  • Hi,
    After cleaning up both pdk/binary and vsdk binary and running the command from both build i got followings
    1. pdk/build
    C:\psdk_3_2\ti_components\drivers\pdk_01_08_01_06\packages\ti\build>gmake -s ffc
    _eeprom BOARD=tda2px-evm CORE=ipu1_0
    Nothing to be done cond7 for tda2px ffc_eeprom
    (cond7 added at line number 148 of makefile at ..\ti_components\drivers\pdk_01_08_01_06\packages\ti\build for debug purpose)
    2.vsdk_build

    C:\psdk_3_2\vision_sdk\build>gmake -s ffc_eeprom BOARD=tda2px-evm CORE=ipu1_0
    gmake: *** No rule to make target `ffc_eeprom'. Stop.

    regards
    Hrishikesh
  • Hi,

    Have you added to comp_paths.mk as suggested in previous reply.
    Also at some places you have mentioned PDK_FFCEEPOM_ROOT_PATH instead of PDK_FFCEEPROM_ROOT_PATH.

    Regards,
    Rishabh
  • Hi,
    I am not finding this comp_paths.mk file in psdk folder, will you please let me know where it is ?
    regards
    Hrishikesh
  • Hi,

    It is there in pdk\packages\ti\build folder.

    Regards,
    Rishabh
  • Hi Rishabh,
    It is working for PSDK 3.03 under linux but not working for psdk3.02 in windows and I could not find the file comp_paths.mk in window installation.
    regards
    Hrishikesh
  • Hi Hrishikesh,

    We had made few changes to the build folder from Processor SDK Vision 3.02 to 3.03 release.
    Thanks for confirming that it is working with 3.03 release.
    Do you need changes for 3.02 release?

    Regards,
    Rishabh
  • Hi Rishabh,
    Thanks for the reply, we intend to use 3.03 only but i am observing one issue rasied in ticket, e2e.ti.com/.../685677 ,even if i revert all my changes i am seeing, if this is resolved then we dont need 3.02.
    regards
    Hrishikesh
  • Hi Hrishikesh,

    This particular thread is about adding new driver in PDK and as everything is working on 3.03 release kindly mark this thread as resolved. ISS experts will help you on the other issue.

    Regards,
    Rishabh