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.

Compiler/TDA2HV: Flashing SBL and Appimage into the QSPI Flash memory in TDA2HV

Part Number: TDA2HV

Tool/software: TI C/C++ Compiler

Hi,

We are using TDA2HV SOC along with Vision SDK 3.1

We want to flash the SBL and Appimage into the QSPI Flash memory. 

Kindly let me know the detailed steps for the same.

Please note that we are using custom board and not the EVM. We do not have JTAG interface support on our board and we can use the UART 3.

Regards,
Khilav Soni

  • Hi,

    You can use SBL Mflash Utility to write to QSPI memory over UART: www.ti.com/.../spracc3.pdf.
    But this tool is tested only for TDA3xx. You need to modify/validate it for TDA2xx.

    Regards,
    Rishabh
  • Hi Rishabh,

    In pdk/packages/ti/build, we made the following change in "Rules.make" file :

    1) Changed the variable CORE to "a15_0" for tda2xx board (without doing this change, "Nothing to be done for tda2xx-evm tda2xx ipu1_0 sbl" appeared on the terminal)

    After this , we tried to build "sbl_mflash" using the following command (Note: we changed the argument BOARD to tda2xx-evm instead of tda3xx-evm):

    $ make -s -j sbl BOARD=tda2xx-evm BOOTMODE=uart SBL_TYPE=mflash

    However, we encountered the following error :

    sbl_tda2xx_priv.c: In function 'SBLLoadAppImage':
    sbl_tda2xx_priv.c:142:6: error: #error Unsupported Boot Mode!!
    #error Unsupported Boot Mode!!


    Kindly help me with this.

    Also let me know all steps/changes to be done to flash the SBL and appimage to QSPI Flash memory on TDA2HV SOC via the mFlash utility.

    Regards,
    Khilav Soni
  • Hi Khilav,

    We don't have mflash support on TDA2xx. So you need to figure out how exactly mflash is built for TDA3xx, changes that are needed and do the same for TDA2xx.
    Right now you are building the TDA2xx SBL with an unsupported boot mode. See sbl_tda3xx_priv.c and make similar changes in TDA2xx file.
    I provided a link in my previous reply which has all the documentation on steps to run mflash.

    Regards,
    Rishabh
  • Hi Khilav,

    What you should do is look into the folder sbl_auto\sbl_app\src\mflash which contains the source code for sbl_mflash for TDA3xx. Try to modify the TDA2xx sbl source to get the same functionality. Most of the code should be same. Built the sbl_mflash for TDA2xx, PC side mflash might not require changes. Also, adjust the baud rate in accordance with the max. that is supported on your hardware.


    Regards
    Prawal
  • Hi Prawal and Rishabh,

    Thank you for your replies.

    I looked into the directories you both specified but could not figure out what changes I exactly need to do in order to build the "sbl_mflash" for tda2xx.

    Kindly give me DETAILED changes to be made in all the required files since I am still unable to build the "sbl_mflash".

    Further, is there any other way to flash the QSPI Flash Memory with SBL and Appimage for TDA2xx board ? Please note that I do not have any JTAG interface on my custom board nor do I have any networking (no ethernet and no wifi) port.

    Regards,
    Khilav
  • Hi Khilav

    I'll let you know the process we followed to create the mflash:
    1. Check for the ASIC id from the UART3 when the SoC is in UART boot mode using Tera Term or Minicom.
    2. Change the current sbl for TDA2xx to sbl_mflash such that it initializes the UART with the max. speed and setup the QSPI Flash writing.
    3. You need to add support for building sbl_mflash in the relevant makefile.
    4. Write the sbl_mflash to request the new sbl and AppImage via UART from the host PC. You can follow the specified protocol or use your own.
    5. Configure the PC side mflash utility code accordingly.

    Follow the document:
    www.ti.com/.../spracc3.pdf

    Regards
    Prawal
  • Hi Prawal,

    Thank you for those steps. We will work on them and let you know once we are done.

    Meanwhile we had another query. Initially, we booted the board from SD Card and ran our use-case. The use-case was written such that we wrote the SBL and Appimage files to QSPI Flash memory using "System_qspiWriteSector" API.

    The SBL binary file (sbl_qspi_opp_nom_a15_0_release.tiimage) was written to location 0x00 on the QSPI Flash and the Appimage binary file (Appimage_BE) was written to location 0x80000 on the QSPI Flash. 

    We will now set the bootmode to boot the custom board from QSPI Flash, by making the required hardware changes.

    Will it be possible to now boot the custom board from QSPI Flash?


    Regards,
    Khilav

  • Hi Khilav,

    Yes it should be possible to boot the board this way given that SBL is modified properly for custom board and use case flashes QSPI properly.

    Regards,
    Rishabh
  • Hi Rishabh,

    Thank You for the confirmation.

    We flashed the QSPI flash memory using the "System_qspiWriteSector" API.

    Having flashed the SBL and Appimage, we could successfully boot the board from QSPI Flash.

    Regards,
    Khilav
  • Hi Khilav,

    Glad to hear that. Feel free to ask any follow-up questions by creating a new thread.

    Regards,
    Rishabh