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/PROCESSOR-SDK-DRA8X: Need help to boot application from SPL and SBL

Part Number: PROCESSOR-SDK-DRA8X

Tool/software: TI C/C++ Compiler

Hi Karan,

I have gone through query https://e2e.ti.com/support/processors/f/791/p/903161/3351424?tisearch=e2e-quicksearch&keymatch=ipc_echo_testb#pi320966filter=all&pi320966scroll=false

We are also facing the similar issue.

We have binary application.out from 3rd party vendor. We want to boot application.out from SD Card (Using SBL). To boot the binary using SBL, We have kept reset vector to BTCM (In the linker file), still it's not working as expected.

Working scenario : Keep binary [SBL(tiboot3.bin), sysfw.bin, app(provided by TI)] in SDCard then load application.out from CCS.

Not working scenario: Instead of app provided by TI, we are keeping 3rd party application.out (rename as app).

I don't have source code and linker file of app which is provided by TI. But I understood from mcusw demos like we have to keep reset vector to BTCM. I have tried those changes but not working.

Once it work with SBL then we want to boot application.out from SPL with Linux running on A72.

It will be good if you can help here.

Thanks,

-Makani

  • Hi Makani,

    -0-

    The first question I would want to as is, which SDK are you trying these things on?

    -1-

    The restriction to use BTCM is for SPL not SBL.

    With SBL you can load the application with reset vectors not necessarily in BTCM. The SBL has ATCM also enabled.

    -2-

    Now the reason why your application.out doesn't load with SBL could be that the SBL might not be setting up the correct environment for the modules being used in the application.out. That means that there might be some modules which are not powered ON by the SBL and those are being used in the application.out.

    A more probable reason could be that the memory map of the applicaiton.out is not correct. By not correct I mean that the memory of the application.out overwrites the SBL memory space and/or the R5F MPU is not setup correctly to run the application.out.

    Can you look at the SDK application's map/linker file which loads successfully from SBL. This can be an MCUSW app too. (example - can_profile_app)

    Regards,

    Karan

  • Hi Makani,

    Also, lets discuss loading using SPL/u-boot on another thread after you are able to successfully load this with SBL.

    Regards,

    Karan

  • Hi Karan,

    Thank you for your support.

    -0-

    The first question I would want to as is, which SDK are you trying these things on?

    [Makani]--> I'm using PSK7.0

    -1-

    The restriction to use BTCM is for SPL not SBL.

    With SBL you can load the application with reset vectors not necessarily in BTCM. The SBL has ATCM also enabled.

    [Makani]--> Okay, I misunderstood from macro define in SBL code, I thought -DDISABLE_ATCM is enable in SBL code but that macro is under condition of am64x. You are right.

    -2-

    A more probable reason could be that the memory map of the applicaiton.out is not correct. By not correct I mean that the memory of the application.out overwrites the SBL memory space and/or the R5F MPU is not setup correctly to run the application.out.

    [Makani]--> I have confirm that the memory map of the application.out not overwrites the SBL memory space. In fact our start address is from 0x41C3F000.

    ======== Memory Map of can_profile_demo ==========
    ==================================================
    /* 1 MB of MCU Domain MSRAM is split as shown below */
    /* Size used  F0000 Number of slices 4 */
    /*                                  Rounding Offset */
    /*SBL?      Start   41C00000    245760  0   */
    /*          End     41C3C000                */
    /*MCU 10    Start   41C3C100    245760  100 */
    /*          End     41C78100                */
    /*MCU 11    Start   41C78200    245760  100 */
    /*          End     41CB4200                */
    ==================================================

    ========= Memory Map of application.out ==========
    ==================================================
    MEMORY CONFIGURATION

             name            origin    length      used     unused   attr    fill
    ----------------------  --------  ---------  --------  --------  ----  --------
      BTCM_Memory           41010000   0000c000  000001e8  0000be18  RWIX
      OCMCRAM_Common        41c3f000   0000c000  00001f40  0000a0c0  RWIX
      OCMCRAM_Common_NonCac 41c4b000   00000400  00000020  000003e0  RWIX
      OCMCRAM_Core0         41c4b400   00000400  000001d8  00000228  RWIX
      OCMCRAM_Core1         41c4b800   00000400  00000000  00000400  RWIX
      OCMCRAM_Core2         41c4bc00   00000400  00000000  00000400  RWIX
      OCMCRAM_Core3         41c4c000   00000400  00000000  00000400  RWIX
      OCMCRAM_Core4         41c4c400   00000400  00000000  00000400  RWIX
      OCMCRAM_Core5         41c4c800   00000400  00000000  00000400  RWIX
      DDR0                  97000000   01000000  0006ba5a  00f945a6  RWIX
    ==================================================

    I missed out to mentioned that I could load symbol from CCS and see it get stuck at while(1) in the below function. Basically Sciclient_rmIrqSet() is failing.
    You have mentioned that there might be some modules which are not powered ON by the SBL and those are being used in the application.out. Will it can causing this ?


    Can you please give your input/suggestion ?

    void I2C_InterruptConfig(void)
    {
      struct tisci_msg_rm_irq_set_req rmIrqReq;
      struct tisci_msg_rm_irq_set_resp rmIrqResp;
      uint32 retVal;

      /*
      * The interrupt path is established using the DMSC firmware
      * for I2C instance 1 on MAIN domin
      */
      rmIrqReq.valid_params           = TISCI_MSG_VALUE_RM_DST_ID_VALID;
      rmIrqReq.valid_params          |= TISCI_MSG_VALUE_RM_DST_HOST_IRQ_VALID;
      rmIrqReq.src_id                 = TISCI_DEV_I2C1;
      rmIrqReq.global_event           = 0U;
      rmIrqReq.src_index              = 0U;
      rmIrqReq.dst_id                 = TISCI_DEV_MCU_R5FSS0_CORE0;
      rmIrqReq.dst_host_irq           = CSLR_MCU_R5FSS0_CORE0_INTR_MAIN2MCU_LVL_INTRTR0_OUTL_0 + 4;
      rmIrqReq.ia_id                  = 0U;
      rmIrqReq.vint                   = 0U;
      rmIrqReq.vint_status_bit_index  = 0U;
      rmIrqReq.secondary_host         = TISCI_MSG_VALUE_RM_UNUSED_SECONDARY_HOST;
      retVal = Sciclient_rmIrqSet(&rmIrqReq, &rmIrqResp, SCICLIENT_SERVICE_WAIT_FOREVER);
      if((uint32)0 != retVal)
      {
        while(1);
      }
    }

    It will be good, If you can help in I2C issue. Anyway I'm to boot using SBL and stuck somewhere in application (i2c issue).

    Yes, I will create another thread to load using  SPL/u-boot.

    Thank you again.

    Regards,

    -Makani

  • Hi Makani,

    In the thread https://e2e.ti.com/support/tools/ccs/f/81/t/976495 I see you mentioning - "I'm able to boot using SBL, now same application.out is not booting with SPL. (Using PSDK7.0)", can you please confirm if you are able to resolve this issue?

    Regards,

    Karan