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.

Problems on C6657 BIOS-MCSDK Post and IBL

Hi,

Currently I’m trying to d some tests on POST and IBL on C6657 and have some questions on MCSDK.

 

1. I found a problem in C:\ti\mcsdk_2_01_02_06\tools\post\evmc6657l project. The code is

Int32 EMAC_Recv(Uint8 *buff)

{

       EMAC_Desc *pDesc;

       int recv_bytes = 0;

 

       /* check for new packet */

       if(emac_mcb.lastrxhdp == (Uint32)EMAC_REGS->RX0HDP)

              return 0;

       //Here returns 0. And program did return here. The result looks correct but it's not. I think it should return -1.  

 

       pDesc = (EMAC_Desc *)EMAC_REGS->RX0CP;

       if (pDesc->PktFlgLen & EMAC_DSC_FLAG_SOP) {

              /* Acknowledge recevied packet */

              EMAC_REGS->RX0CP = (Uint32)pDesc;

              /* store bytes recevied */

              recv_bytes = pDesc->PktFlgLen & 0xFFFF;

              /* copy data to output buffer */

              memcpy(buff, pDesc->pBuffer, recv_bytes);

              /* re-initalize descriptor to recevie more data */

              pDesc->BufOffLen = RX_BUFF_SIZE;

              pDesc->PktFlgLen = EMAC_DSC_FLAG_OWNER;

              /* assign descriptor to HDP */

              EMAC_REGS->RX0HDP = (Uint32)pDesc;

       }

       /* return number of bytes received */

       return recv_bytes;

}

 

2. I also tried to use IBL in C:\ti\mcsdk_2_01_02_06\tools\boot_loader\ibl to do nand boot on C6657. But I found I can only succeed in ELF format. If I choose BBLOB format, it failed. I want to know if you can help to provide me a succeed example on BBLOB format for IBL nand boot.

Thank you very much.

Allen

 

  • 1. Yes, it make sense to return -1 instead of 0.

    2. I looked at C:\ti\mcsdk_2_01_02_06\tools\boot_loader\ibl\src\util\iblConfig\src\device.c, function c6657_ibl_config()

       ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;

    I think BBLOB format should work, but ELF should fail.

    Regards, Eric

     

  • Eric,

     

    Thanks for your reply. I think I didn't make it clear.

    1. I run the POST on C6657 EVM board. The EMAC loopback test is passed. But, when I checked the whole process, I found it jumped out here. That means no packet was received by EMAC test code. The result was passed just because it returned 0 in this line. So, EMAC loopback case in POST actually is failed.

    /* check for new packet */

    if(emac_mcb.lastrxhdp == (Uint32)EMAC_REGS->RX0HDP)

    return 0;

    2. I used C:\ti\mcsdk_2_01_02_06\tools\boot_loader\ibl\src\util\i2cConfig.gel to modify the boot format. First, I tried

     ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_ELF;

    And I did succeed to boot from nand with ELF format.

    But when I changed to

    ibl.bootModes[1].u.nandBoot.bootFormat        = ibl_BOOT_FORMAT_BBLOB;

    The DSP could not boot from NAND with my Binary file.

    So I suppose my BBLOB file is not correct.  If you did this test before, could you please give me an example for BBLOB file.

     

    Thank you.

    Allen