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.

TDA2x file write using null link.

Hello, everyone.

I`m Myungjin Lee.

I want to write data into SD card file system.

My environment : 

Vision SDK 2.10(windows 10, ccs6)

Please refer below.

1. My chain`s structure.

UseCase: chains_SvStoreVideo_test

Capture -> Dup -> Display_Video

Dup -> Encode -> Null (A15)

GrpxSrc -> Display_Grpx

I want to write file using NULL link.

2. setting Null link parameter

unsigned char filename[] = "test_video.avi";

pPrm->dumpDataType = NULL_LINK_COPY_TYPE_BITSTREAM_FILE;
memcpy(pPrm->nameDataFile, filename, sizeof(filename));

I set dumpdatatype, but I saw that "NULL_LINK_COPY_TYPE_BITSTREAM_FILE" mode isn`t implemented.

3. implementation "NULL_LINK_COPY_TYPE_BITSTREAM_FILE" mode

I included "#include <src/utils_common/include/file_api.h>" in "nullLink_priv.h"

And then, In "nullLink_tsk.c"

 I inserted sample code in function "Int32 NullLink_drvCreateDumpFramesObj(NullLink_Obj * pObj)"

else if(pObj->createArgs.dumpDataType == NULL_LINK_COPY_TYPE_BITSTREAM_MEMORY)
{

}
else if(pObj->createArgs.dumpDataType == NULL_LINK_COPY_TYPE_BITSTREAM_FILE)
{
#if ( defined(FATFS_PROC_TO_USE_A15_0) && defined(BUILD_A15) )
fd = File_open("test.txt", "wb");
#endif
}
else if(pObj->createArgs.dumpDataType == NULL_LINK_COPY_TYPE_NETWORK)
{
NullLink_networkTxCreate(pObj);
}

At function "Int32 NullLink_drvDumpFrames(NullLink_Obj * pObj, UInt32 inQue, const System_Buffer *pBuf)"

else if(pObj->createArgs.dumpDataType == NULL_LINK_COPY_TYPE_BITSTREAM_FILE)
{
#if ( defined(FATFS_PROC_TO_USE_A15_0) && defined(BUILD_A15) )
static UInt8 temp_buf[4] = {1, 2, 3, 4};

File_write(fd, temp_buf, 4);
#endif
}

At function "Int32 NullLink_drvDeleteDumpFramesObj(NullLink_Obj * pObj)"

else if(pObj->createArgs.dumpDataType == NULL_LINK_COPY_TYPE_BITSTREAM_FILE)
{
#if ( defined(FATFS_PROC_TO_USE_A15_0) && defined(BUILD_A15) )
File_close(fd);
#endif
}

4. In Rulse.make

I changed "FATFS_PROC_TO_USE"`s parameter to a15_0.

ifeq ($(FATFS_PROC_TO_USE), )
#FATFS_PROC_TO_USE=ipu1_0
FATFS_PROC_TO_USE=a15_0
endif

5. build

I built Vision SDK.

gmake clean -> gmake depend -> gmake

G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hsmmcsd_API.oa15fg): In function `HSMMCSDStatusGet':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:332: undefined reference to `HSMMCSDIntrStatusGet'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hsmmcsd_API.oa15fg): In function `HSMMCSDXferStatusGet':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:236: undefined reference to `HSMMCSDIntrStatusClear'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:264: undefined reference to `HSMMCSDIntrStatusClear'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:282: undefined reference to `HSMMCSDIntrStatusClear'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:291: undefined reference to `HSMMCSDIntrStatusClear'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hsmmcsd_API.oa15fg): In function `HSMMCSDXferSetup':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:307: undefined reference to `HSMMCSDIntrStatusClear'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hsmmcsd_API.oa15fg):G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:317: more undefined references to `HSMMCSDIntrStatusClear' follow
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hsmmcsd_API.oa15fg): In function `HSMMCSDXferSetup':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:318: undefined reference to `HSMMCSDIntrStatusEnable'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:319: undefined reference to `HSMMCSDIntrStatusDisable'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:322: undefined reference to `HSMMCSDBlkLenSet'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:311: undefined reference to `HSMMCSDIntrStatusClear'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:312: undefined reference to `HSMMCSDIntrStatusEnable'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:313: undefined reference to `HSMMCSDIntrStatusDisable'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hsmmcsd_API.oa15fg): In function `HSMMCSDCmdStatusGet':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:214: undefined reference to `HSMMCSDIntrStatusClear'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hsmmcsd_API.c:206: undefined reference to `HSMMCSDIntrStatusClear'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(fat_mmcsd.oa15fg): In function `disk_initialize':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/fat_mmcsd.c:73: undefined reference to `HSMMCSDUartPuts'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/fat_mmcsd.c:80: undefined reference to `HSMMCSDUartPuts'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/fat_mmcsd.c:81: undefined reference to `HSMMCSDUartPuts'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/fat_mmcsd.c:82: undefined reference to `HSMMCSDUARTPutNum'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/fat_mmcsd.c:97: undefined reference to `HSMMCSDUartPuts'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/fat_mmcsd.c:86: undefined reference to `HSMMCSDUartPuts'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/fat_mmcsd.c:91: undefined reference to `HSMMCSDUartPuts'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hs_mmcsdlib.oa15fg): In function `HSMMCSDCardPresent':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:42: undefined reference to `HSMMCSDIsCardInserted'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hs_mmcsdlib.oa15fg): In function `HSMMCSDIntEnable':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:55: undefined reference to `HSMMCSDIntrEnable'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hs_mmcsdlib.oa15fg): In function `HSMMCSDControllerInit':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:72: undefined reference to `HSMMCSDSoftReset'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:79: undefined reference to `HSMMCSDLinesReset'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:81: undefined reference to `HSMMCSDSupportedVoltSet'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:83: undefined reference to `HSMMCSDSystemConfig'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:85: undefined reference to `HSMMCSDBusWidthSet'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:91: undefined reference to `HSMMCSDBusVoltSet'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:94: undefined reference to `HSMMCSDBusPower'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:101: undefined reference to `HSMMCSDBusFreqSet'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:104: undefined reference to `HSMMCSDUartPuts'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:107: undefined reference to `HSMMCSDInitStreamSend'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:97: undefined reference to `HSMMCSDUartPuts'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:75: undefined reference to `HSMMCSDUartPuts'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hs_mmcsdlib.oa15fg): In function `HSMMCSDCmdSend':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:179: undefined reference to `HSMMCSDCommandSend'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:174: undefined reference to `HSMMCSDIntrStatusClear'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:176: undefined reference to `HSMMCSDDataTimeoutSet'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:189: undefined reference to `HSMMCSDResponseGet'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hs_mmcsdlib.oa15fg): In function `HSMMCSDBusWidthConfig':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:217: undefined reference to `HSMMCSDBusWidthSet'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(hs_mmcsdlib.oa15fg): In function `HSMMCSDBusFreqConfig':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/hs_mmcsdlib.c:232: undefined reference to `HSMMCSDBusFreqSet'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(mmcsd_proto.oa15fg): In function `MMCSDWriteCmdSend':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/mmcsd_proto.c:626: undefined reference to `HSMMCSDEdmaTransfer'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/mmcsd_proto.c:663: undefined reference to `HSMMCSDEdmaClose'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/mmcsd_proto.c:641: undefined reference to `HSMMCSDEdmaWaitTransfer'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(mmcsd_proto.oa15fg): In function `MMCSDReadCmdSend':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/mmcsd_proto.c:754: undefined reference to `HSMMCSDEdmaTransfer'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/mmcsd_proto.c:798: undefined reference to `HSMMCSDEdmaClose'
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/mmcsd_proto.c:769: undefined reference to `HSMMCSDEdmaWaitTransfer'
G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/lib/tda2xx-evm/a15/release/fat_lib.aa15fg(mmcsd_proto.oa15fg): In function `MMCSDMemCopy':
G:\work\TI\project\TI_VisionSDK\ti_components\drivers\starterware_01_06_00_16\fatlib/mmcsd_proto.c:851: undefined reference to `HSMMCSDEdmaCopy'
gmake[6]: *** [G:/work/TI/project/TI_VisionSDK/vision_sdk/binaries/vision_sdk/bin/tda2xx-evm/vision_sdk_a15_0_release.xa15fg] Error 1
gmake[6]: Leaving directory `G:/work/TI/project/TI_VisionSDK/vision_sdk/src/main_app/tda2xx/a15_0'
gmake[5]: *** [a15_0] Error 2
gmake[5]: Leaving directory `G:/work/TI/project/TI_VisionSDK/vision_sdk/src/main_app/tda2xx/a15_0'
gmake[4]: *** [apps_a15] Error 2
gmake[4]: Leaving directory `G:/work/TI/project/TI_VisionSDK/vision_sdk/src'
gmake[3]: *** [apps] Error 2
gmake[3]: Leaving directory `G:/work/TI/project/TI_VisionSDK/vision_sdk/src'
gmake[2]: *** [apps] Error 2
gmake[2]: Leaving directory `G:/work/TI/project/TI_VisionSDK/vision_sdk/examples'
gmake[1]: *** [vision_sdk_apps] Error 2
gmake[1]: Leaving directory `G:/work/TI/project/TI_VisionSDK/vision_sdk'
gmake: *** [vision_sdk] Error 2

I fiind out these error function`s implementation in "ti_components\drivers\starterware_01_06_00_16\drivers\hs_mmcsd.c"

And I also find out object file in "vision_sdk\binaries\obj\starterware_hal\tda2xx-evm\a15\release" that named "hs_mmcsd.oa15fg"

I think that there is some problem at link operation.

How could I this problem?

And writing file in SD card is possible?

Thank you.

  • Hi, Lee,

    YOur query has been forwarded to VSDK expert.

    Regards,
    Mariya
  • Thank you, Mariya.

    I have one more question.
    My final goal is surround view caputre and store into SD card about 4 channel camera.
    I`m proceeding file writing using NullLink with m4 instead of a15.
    So, I succeed file writing when I used 1 channel camera with frontal OV10635, not using surround view kit.
    And I tried to write file using surround view kit.
    But I failed at this point. This is my chain structure.



    Capture -> Dup -> VPE -> Sync(A15) -> Alg_DmaSwMs(A15) -> Display_Video

    Dup -> Encode -> Select

    Select -> Gate_0 -> Null_0
    Select -> Gate_1 -> Null_1
    Select -> Gate_2 -> Null_2
    Select -> Gate_3 -> Null_3

    GrpxSrc -> Display_Grpx


    I got a error msg at encode link.

    [IPU1-0] 17.125144 s: ENCODE: ERROR in Enclink_JPEGEncodeFrame.Status[-1]
    [IPU1-0] 17.257274 s: ENCODE: ERROR: ALGPROCESS FAILED (status=0xffffffff) !!!
    [IPU1-0] 17.257396 s: ENCODE: ERROR in Enclink_JPEGEncodeFrame.Status[-1]
    [IPU1-0] 17.390319 s: ENCODE: ERROR: ALGPROCESS FAILED (status=0xffffffff) !!!
    [IPU1-0] 17.390441 s: ENCODE: ERROR in Enclink_JPEGEncodeFrame.Status[-1]
    [IPU1-0] 17.523394 s: ENCODE: ERROR: ALGPROCESS FAILED (status=0xffffffff) !!!
    [IPU1-0] 17.523516 s: ENCODE: ERROR in Enclink_JPEGEncodeFrame.Status[-1]
    [IPU1-0] 17.656438 s: ENCODE: ERROR: ALGPROCESS FAILED (status=0xffffffff) !!!
    [IPU1-0] 17.656621 s: ENCODE: ERROR in Enclink_JPEGEncodeFrame.Status[-1]



    I also tried to write file using surround view kit about 1 channel.
    It also failed. I used same chain.


    Is it possible to write file about multi channel?
    If it is possible, please help me.
    If you need more information, ask me please.
  • Lee
    you are right SD card write for NULL_LINK_COPY_TYPE_BITSTREAM_FILE is not implemented for Bios version of Null link.
    But the same is available for Linux version of Null link (\vision_sdk\linux\src\links\null).
    Again, your requirement is multi-channel capture + encode + store, right?
    please note that the Filesystem on Bios (fatFs) do not validated for multiple file operations.
    instead use VSDK Linux, where all these are supported.
    Refer latest VSDK 2.11

    Regards, Shiju
  • Hello, Shiju.

    I will try it.

    Thank you.

    Best Regards,

    Myungjin.