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.

TDA3: Flashing SD Card sample code in network_ctrl

Part Number: TDA3

Hi,

I tried to upload (flash) the SD card with new TDA3 AppImage suing the network_ctrl tools from a Linux machine. I used ./network_ctrl.out --ipaddr 192.168.4.200 --cmd mmc_wr_appimage AppImage. Although it said it's successfully flashed the image onto the SD Card, but i didn't work. The AppImage I provided to have a different file size than the one on the card. I dug further into the issue and found that the handler fileIOCmdHandler() in the network_ctrl_handle_mmc_wr.c file wasn't called. I then tried to debug it by putting a break point in this c file of the fileIOCmdHandler() in the debugger. Then I got the image below even though I loaded the symbol files for IPU1_0 and IPU1_1. I ised IPU1_1 to handle network traffic while I supposed IPU1_0 will handle the SDcard write.

Thank you,

  • Hi Khai,

    You can try putting the breakpoint in the disassembly window of CCS after searching for the function fileIOCmdHandler(). Meanwhile I will try to reproduce the setup on my side and see what might be the issue.

    Regards,
    Anand
  • Hi Khai,

    Also, are you using a TI EVM? If yes, there is a limitation in the EVM that FATFS cannot be used while NDK is enabled due to MMCSD conflict with RGMII0. To use MMCSD and NDK together, RGMII1 daughter board needs to be used. This applies only for the EVM, not for TDA3xx-RVP or the Starter Kit. Let me know if this is the issue.

    Regards,
    Anand
  • Hi Anand,

    I am only using TDA3xx-RVP.

    Thanks for the support.

    --Khai

  • Hi Khai,

    Can you please run "make showconfig" in /vision_sdk/build folder and attach the log here?

    Regards,
    Anand
  • C:\TI\PROCESSOR_SDK_VISION_03_04_00_00\vision_sdk\build>gmake showconfig
    gmake -C C:/TI/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/apps/configs -f build_makeconfig.mk showconfig
    gmake[1]: Entering directory `C:/TI/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/apps/configs'
    #
    # Build Config is [ tda3xx_rvp_bios_radar ]
    # Build Config file is @ C:/TI/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/configs/tda3xx_rvp_bios_radar/cfg.mk
    # Build Config .h file is @ C:/TI/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/links_fw/include/config/apps/tda3xx_rvp_bios_radar/system_cfg.h
    # Build CPUs is @ ipu1_0 ipu1_1 dsp1 eve1
    #
    # CPUs included in application,
    # PROC_IPU1_0_INCLUDE=yes
    # PROC_IPU1_1_INCLUDE=yes
    # PROC_IPU2_INCLUDE=no
    # PROC_DSP1_INCLUDE=yes
    # PROC_DSP2_INCLUDE=no
    # PROC_EVE1_INCLUDE=yes
    # PROC_EVE2_INCLUDE=no
    # PROC_EVE3_INCLUDE=no
    # PROC_EVE4_INCLUDE=no
    # PROC_A15_0_INCLUDE=no
    #
    # Platform config,
    # VSDK_BOARD_TYPE=TDA3XX_RVP [options: TDA2XX_EVM TDA2EX_EVM TDA3XX_EVM TDA3XX_RVP TDA2XX_RVP]
    # PLATFORM=tda3xx-rvp
    # DUAL_A15_SMP_BIOS=no
    # IPU1_SMP_BIOS=no
    # DDR_MEM=DDR_MEM_512M [options: DDR_MEM_128M DDR_MEM_512M DDR_MEM_1024M]
    # EMIFMODE=SINGLE_EMIF_512MB [options: SINGLE_EMIF_512MB SINGLE_EMIF_1GB ref build_pdk.mk]
    # NDK_PROC_TO_USE=ipu1_1 [options: a15_0 ipu1_0 ipu1_1 ipu2 none]
    # NSP_TFDTP_INCLUDE=yes [options: yes no]
    # AWR1243_METAWAVE_LRR_CONFIG=yes [options: yes no]
    # TDA2EX_ETHSRV_BOARD=no [options: yes no]
    # FATFS_PROC_TO_USE=none [options: ipu1_0 none]
    # RADAR_BOARD=TDA3XX_RADAR_RVP [options: TDA3XX_AR12_ALPS TDA3XX_AR12_VIB_DAB_BOOSTER TDA3XX_RADAR_RVP none]
    #
    # Build config,
    # BUILD_OS=Windows_NT [options: Windows_NT Linux]
    # BUILD_DEPENDENCY_ALWAYS=no
    # BUILD_ALGORITHMS=no
    # BUILD_INFOADAS=no
    # PROFILE=debug [options: debug release]
    # KW_BUILD=no
    # CPLUSPLUS_BUILD=no
    # IPU_PRIMARY_CORE=ipu1_0 [options: ipu1_0 ipu2]
    # IPU_SECONDARY_CORE=ipu2 [options: ipu1_0 ipu2]
    # A15_TARGET_OS=Bios [options: Bios Linux Qnx]
    # BSP_STW_PACKAGE_SELECT=all [options: all vps-iss-dss-only vps-vip-vpe]
    #
    # Safety Module config,
    # RTI_INCLUDE=no
    # ECC_FFI_INCLUDE=no
    # DCC_ESM_INCLUDE=no
    #
    # Video Module config,
    # IVAHD_INCLUDE=no
    # VPE_INCLUDE=no
    # CAL_INCLUDE=yes
    # ISS_INCLUDE=yes
    # ISS_ENABLE_DEBUG_TAPS=no
    # WDR_LDC_INCLUDE=yes
    # DSS_INCLUDE=yes
    #
    # Open Compute config,
    # OPENCL_INCLUDE=no
    # TARGET_ROOTDIR=C:/TI/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/apps/src/rtos/opencl
    # ENABLE_OPENCV=no
    # ENABLE_OPENCV_TESTS=no
    # OPENVX_INCLUDE=no
    #
    # Log config,
    # ENABLE_UART_LOG=yes
    # ENABLE_NETWORK_LOG=no
    # ENABLE_CCS_LOG=no
    # CIO_REDIRECT=no
    #
    # IPC config,
    # WORKQ_INCLUDE=yes
    # IPC_LIB_INCLUDE=yes
    #
    # Surround View config,
    # SRV_FAST_BOOT_INCLUDE=no
    #
    # Other Module config,
    # AVB_INCLUDE=no
    # DCAN_INCLUDE=no
    # RADAR_ONLY=no
    # CPU_IDLE_ENABLED=no
    # FAST_BOOT_INCLUDE=no
    # DATA_VIS_INCLUDE=no
    # HS_DEVICE=no
    # ULTRASONIC_INCLUDE=no
    # PGA450=
    # PGA460=
    # ENABLE_ALL_DEPTH=
    #
    # Linux config,
    # DEFAULT_UBOOT_CONFIG=dra7xx_evm_vision_config
    # DEFAULT_KERNEL_CONFIG=ti_sdk_dra7x_release_defconfig
    # DEFAULT_DTB=dra7-evm-infoadas.dtb
    # CMEM_INCLUDE=no
    # IPUMM_INCLUDE=no
    # IPU1_EVELOADER_INCLUDE=no
    # ROBUST_RVC_INCLUDE=no
    # BUILD_ADAM_CAR=no
    #
    # Alg plugins included in build,
    # ALG_dmaSwMs ALG_radarprocess
    #
    # Use-cases included in build,
    # UC_multi_radar_capture_fft_display UC_radar_MetawaveRdmAngleDetect_display UC_radar_MetawaveRdmPeakDetect
    #
    gmake -s -fbuild_makeconfig.mk check_cpu_include
    gmake[2]: Entering directory `C:/TI/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/apps/configs'
    #
    # CPUs that are NOT required but included in config [ tda3xx_rvp_bios_radar ],
    #
    #
    # CPUs that are required but not included in config [ tda3xx_rvp_bios_radar ],
    #
    #
    # Edit C:/TI/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/build/configs/tda3xx_rvp_bios_radar/cfg.mk to include or exclude CPUs in an application
    #
    gmake[2]: Leaving directory `C:/TI/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/apps/configs'
    gmake[1]: Leaving directory `C:/TI/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/apps/configs'

  • Hi Khai,

    As I can see from your make config, for FATFS_PROC_TO_USE, the option selected is none. The correct option should be ipu1_0. Please go to /vision_sdk/apps/configs/tda3xx_rvp_bios_radar/cfg.mk and change the value of FATFS_PROC_TO_USE to ipu1_0. After this you should rebuild vision_sdk and load it again. Please let me know if this solved the issue, so that I can close the thread. :)

    Regards,
    Anand
  • HI Anand,

    Enable FATFS_PROC_TO_USE=ipu1_0 went further but crashed at line below.

    [IPU1-1] 6.655462 s: NDK: Link Status: 1000Mb/s Full Duplex on PHY 12
    [IPU1-1] 46.364454 s: NETWORK_CTRL: Received command [mmc_wr_appimage], with 7467472 bytes of parameters
    [IPU1-1] 46.364606 s: NETWORK_CTRL: Max file size that can be Written to SD is 33554432 B
    [IPU1-1] 46.792594 s: NETWORK_CTRL: Received file size is 7467472 B
    [IPU1-1] 46.792716 s: NETWORK_CTRL: Waiting for file params
    [IPU1-0] 48.564753 s: FILEIO: Received file open command B
    [IPU1-0] 48.564905 s: Assertion @ Line: 136 in C:/TI/PROCESSOR_SDK_VISION_03_04_00_00/vision_sdk/apps/src/rtos/modules/network_ctrl/network_ctrl_handle_mmc_wr.c: -1 != fileIOPrms->filePtr : failed !!!
    [IPU1-1] 48.564051 s: NETWORK_CTRL: Flashing 7467472 B of file AppImage to MMCSD ...

    I debugged further and found out the fileIOPrms->fileName, fileIOPrms->fileMode are corrupted and thus File_open() failed and crashed. I also found out that calling 

    gDataBuf = Utils_memAlloc(
    UTILS_HEAPID_DDR_CACHED_SR,
    NETWORKCTRL_APP_IMAGE_FILE_SIZE,
    8);

    in NetworkCtrl_cmdHandlerMmcsdWrite_proxy() function triggered a call into fileIOCmdHandler() which is an unknown and unexpected behavior.

    Thanks,

    --Khai

  • Hi Khai,

    Thank you for going further in debug. This is indeed quite strange, as file_open should happen only after all filePrms are initialized. You can see that in the network_ctrl_handle_mmc_wr_proxy.c file. I don't know if you have tried this, but can you put a breakpoint around line 123, function System_linkControl(). And see if the params getting passed are correct or not. Also, please try doing the basic file I/O tests under miscellaneous in the UART menu and confirm that file read/write works properly. I was not able to see this issue in my setup. Anyways, I'll try once again from my side.

    Regards,
    Anand
  • Hi Khai,

    It's been a while since I have heard from you :) Where you able to run the file I/O example? Also, did you have any luck in stepping through System_linkControl() function?

    Regards,
    Anand
  • Hi Anand,

    Thanks for checking in. Accessing SD card is not required feature for us at the moment. But I haven't had a chance to retest it. It might still be an option for us going forward. I'll get back to you when the requirement surfaces.

    Thanks,

    --Khai

  • Hi Khai,

    Okay :). So I believe this thread can be closed for now then?

    Regards,
    Anand
  • Hi Khai,

    Sure :) So I guess this thread can be closed then?

    Regards,
    Anand