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/TDA2P-ACD: Linking Error while integrating Test Application in Vision_SDK

Part Number: TDA2P-ACD

Tool/software: TI-RTOS

Hello,

We have created a test Application in which sd_file_io example from path  "/ti_components/drivers/pdk_01_08_01_06/packages/ti/drv/stw_lld/examples/mmcsd" is build seperately in a folder placed with ti_components and vision_sdk. We use Processor_SDK_v_03_02.

The example have been ported onto other core and it has been build and tested successfully. We now want to check if the same example can be used from any usecase in vision_sdk.

For the same, we have done following steps:-

1] Copied the same "sd_card_file_io.c" file and kept in "/vision_sdk/apps/src/rtos/common/" path.

2] File name has been specified in the SRC_FILES.MK for building it.

3]  File "sd_card_file_io.h" has been kept at path "/vision_sdk/apps/src/include" so that it can be used in any usecase.

4] Required components have been added into variable "COMP_LIST_$(CORE) = bios xdc ipc pdk fc vision_sdk stw_lld stw_fatlib stw_fatlib_edma csl i2c_lld i2c_lld csl_utils_common stw_boards stw_devices stw_platform stw_examples_utility " of make file at path "vision_sdk/apps/"

We have been getting the following linking errors,

undefined symbol                                                   first referenced in

 StwUtils_appDefaultDeInit                         vision_sdk/binaries/apps/tda2px_evm_bios_all/lib/tda2px-evm/ipu1_0/release/app_libs.aem4<sd_card_file_io.oem4>
 StwUtils_appDefaultInit                              vision_sdk/binaries/apps/tda2px_evm_bios_all/lib/tda2px-evm/ipu1_0/release/app_libs.aem4<sd_card_file_io.oem4>
 StwUtils_appLogTestResult                      vision_sdk/binaries/apps/tda2px_evm_bios_all/lib/tda2px-evm/ipu1_0/release/app_libs.aem4<sd_card_file_io.oem4>
 UARTPuts                                                     vision_sdk/binaries/apps/tda2px_evm_bios_all/lib/tda2px-evm/ipu1_0/release/app_libs.aem4<sd_card_file_io.oem4>
 UARTprintf                                                    vision_sdk/binaries/apps/tda2px_evm_bios_all/lib/tda2px-evm/ipu1_0/release/app_libs.aem4<sd_card_file_io.oem4>     

Could you please let us know what are we missing.

Regards,

Amol       

  • Hi Amol,

    This app cannot be added to Vision SDK like this.
    Vision SDK is a frame work and this is only a standalone app.
    I had advised same to your colleague previously: e2e.ti.com/.../2479150
    What is the use case that you are trying?

    Regards,
    Rishabh
  • Hi Amol,

    One additional information.
    For file IO APIs you can see the file: links_fw/src/rtos/utils_common/include/file_api.h.

    Regards,
    Rishabh
  • Hello Rishabh,

    Currently we are not targeting any specific usecase, but our main goal is that in our final usecase, sd_card file operations should be accessible from all cores (if not all then atleast M4 and A15).
    Also currently we are working with "iss_capture_isp_simcop_display" usecase to get the knowhow of how things work.

    Regards,
    Amol
  • Hi Amol,

    You can check the file APIs present in links_fw/src/rtos/utils_common/include/file_api.h as I have mentioned in my previous reply.

    Regards,
    Rishabh
  • Hi Rishabh,
    As you said we can not integrate stand alone app to vision sdk framework.
    But if we want to run the eeprom read/write from any usecase what can be done to achieve it?
    Are there any APIs related to eeprom read/write in vision sdk framework?

    Regards,
    Rishabh
  • Hi,

    Unfortunately Vision SDK does not have any ready made APIs to read/write EEPROM.

    Regards,
    Rishabh
  • Hi Rishabh,

    If we want to use EEPROM from our application to store configuration details (in a vision sdk link and chain) how can we do this.

    As in the I2C EEPROM test application, EEPROM access is done by underlying I2C driver. So can we do something similar in our application as well.

    Regards,

    Rishabh

  • Hi,

    You can use I2C APIs and create a wrapper API in the Vision SDK application itself and use it.
    Otherwise you can add the wrapper APIs in a new file in utils_common and use in application.

    Regards,
    Rishabh
  • Hello Rishabh,

    Sorry for late reply.

    I have created a wrapper API for eeprom access named "eeprom_api.c" at the path "vision_sdk/links_fw/src/rtos/utils_common/src" and the included its header file at path "vision_sdk/links_fw/src/rtos/utils_common/include"

    The file contains three function APIs as follows:

    1. i2c_eeprom_init()

    2. i2c_Write()

    3. i2c_Read()

    init function API is called in the file "system_common.c" at path "vision_sdk/links_fw/src/rtos/links_common/system" under function "System_initCommon()". "eeprom_api.h" is also included in the "system_common.c" file.

    Write and read function APIs are called in the "iss_capture_isp_simcop_display" usecase file "chains_issIspSimcop_Display.c".

    Now when we compile the vision SDK through command "make -s -j depend" followed by "make -s -j" we get error in linking the API.

    screeshots of error encounterd are attached.

    I am not able to identify where I am going wrong. Could you help me with this issue?

    Regards,

    Rishabh

  • Hi,

    This API is defined in pdk.
    As I mentioned in one of the threads previously you can't call these APIs directly in Vision SDK.
    If you face any build issues, you should grep the same in PDK and then write an API in Vision SDK app that does the same for you.

    Regards,
    Rishabh
  • Hello Rishabh,

    Thanks for the reply.

    We have separately written an API for "PlatformEDMAWkupDepEnable" and that error has been resolved.

    Now as mentioned in the previous asked query, 'i2c_eeprom_init' API is called in the file "system_common.c" at path "vision_sdk/links_fw/src/rtos/links_common/system" under function "System_initCommon()".

    My eeprom wrapper header file "eeprom_api.h" is also included in the "system_common.c" file.

    "i2c_Write" and "i2c_Read" function APIs are called in the "iss_capture_isp_simcop_display" usecase file "chains_issIspSimcop_Display.c".

    But when we try to run this usecase, it stucks and and did not enter the usecase.

    We debugged it through CCS v6, we get the "Hard fault' at "lld_i2c_probe".

    The screenshot of the error is attached with the issue.

    Could you guide us how to resolve this issue?

    Regards,

    Rishabh

  • Hi,

    You should do a step into and see where exactly you get a hard fault. As I have told multiple times this is not the efficient way of doing this.
    You will face a lot of issues if you just compile PDK files in Vision SDK especially the one that use shared resources like i2c, EDMA, interrupt, etc.
    Making it work for a single case is quite hard and in the long run you will end up spending lot of time.
    Ideally you should add eeprom functionality to BSP boards and then use it.

    Regards,
    Rishabh
  • Hi Rishabh,
    Thanks for the reply.
    Sorry I got confused with the code. So while using boards module, do I need to add an entry for EEPROM in
    "static Bsp_BoardI2cInstData gBoardTda2xxI2cInstData[] " at file "\pdk_01_08_01_06\packages\ti\drv\vps\src\boards\src\bsp_boardTda2xx.c" with the following details,
    {
    BSP_DEVICE_I2C_INST_ID_0, /* instId (Since EEPROM is connected to I2C1 on TDA2Px-EVM)*/
    SOC_I2C1_BASE, /* baseAddr */
    CSL_INTC_EVENTID_I2CINT1, /* intNum */
    400U /* busClkKHz */
    }

    Is our assumption correct. If not then please suggest how I can add functionality to BSP boards.

    Regards,
    Rishabh
  • Hi,

    BSP boards reads EEPROM to identify the board revision. Can you check Bsp_boardGetBaseBoardRevTda2xx API in <pdk>\packages\ti\drv\vps_tda\src\boards\src\bsp_boardTda2xx.c.

    Regards,
    Rishabh
  • Hi,

    Thanks for reply , after updating our code by taking reference from Bsp_boardGetBaseBoardRevTda2xx API in <pdk>\packages\ti\drv\vps_tda\src\boards\src\bsp_boardTda2xx.c , now we could test eeprom read/write from vsdk framework i.e. our wrapper file is placed at ..\vision_sdk\links_fw\src\rtos\utils_common

    We have some queries
    a. The Bsp_boardGetBaseBoardRevTda2xx API run on IPU1_0 , how to make eeprom read/write work from all cores as we intent to use it to store configurations from algorithm which will be running on other cores.
    b. What is the page size for read /write eeprom memory? in Bsp_boardGetBaseBoardRevTda2xx API it seems to be at 48 bytes and in csl test code it is 64 bytes. Basically we want to allocate different sectors for storing different data configs, will you please give your comments on it.
    Also I guess page 0 is stored for EVM data so should not be used for user data , please confirm.
    Are there any sections restricted to use?

    regards,
    Rishabh
  • Hi,

    For storing algorithm configuration data you should QSPI Flash as reads/writes to flash are much faster than EEPROM.
    Any particular reason you want to use EEPROM?

    Regards,
    Rishabh

  • Hi,

    Thanks for the quick reply.
    As customer wants to store boot image on QSPI Flash, so algorithm configuration are to be stored on EEPROM.
    And as asked in the previous reply is there any page size or sector size for eeprom memory?
    If so what is it as we have seen two different page sizes at different APIs:
    Bsp_boardGetBaseBoardRevTda2xx API seems to have a 48 bytes page size and in csl test code it is 64 bytes.

    Regards,
    Rishabh
  • Hi,

    When we are calling "eeprom_write()" and "eeprom_read()" functions from usecase "iss_capture_isp_simcop_display" from file "chains_issIspSimcop_Display()' in function "Chains_issIspSimcop_Display()"  we are getting data mismatch.

    We are not getting what we are writing to eeprom though both the functionality does not fail.

    We are calling "eeprom_write()" function followed by "eeprom_read()".

    Following is the attached screen shot of the snippet of the function call.

     

    These APIs then calls read/write functions from out eeprom API which is at path ../vision_sdk/links_fw/src/rtos/utils_common/src.

    We give page address as 1, data length as 48 and EEPROM slave address.

    Can you help me with this.

    Regards,

    Rishabh

  • Hii,

    Is there any update on this issue?

     we are giving '10' as page address and device address is '0x50'.

    We are writing a character string, with some random charaters, to the eeprom memory to test. String is like:

    uint8_t dataWriteBuffer[48] = "abcdefghijklm012345678909876543210nopqrstuvwxyz"

    When we read the eeprom we are getting data mismatch though we are giving page address as '10' and device address as '0x50'.

    When we try to read the data from page address '0' we are getting the same data what we get from the function "Bsp_boardGetBaseBoardRevTda2xx()"

    We are debugging through JTAG over CCSv6 and at the memory address which we are reading, we are not getting the data what we are writing.

    So is there any thing we are missing here.

    Please help me with this.

    Regards,

    Rishabh

  • Hi,

    You need to see the logic from EEPROM app and provide the same in your EEPROM APIs.
    EEPROM has block size of 64 bytes.
    In order to write you first need to calculate the block address and then you can send 2 address bytes + 64 data bytes in single I2C write API.
    For read you should first write the 2 byte address.
    Then you can read 64 bytes of data in single I2C read API.

    Regards,
    Rishabh
  • Hi Rishabh,

    Thank you for the reply.

    Regards,
    Rishabh
  • Hi,

    Is there an update on this issue?

    Regards,
    Rishabh
  • Hi,

    We haven't heard back from you, I'm assuming you were able to resolve your issue.
    If not, just post a reply below (or create a new thread if the thread has locked due to time-out).

    Regards,
    Rishabh