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.

Cannot execute .bin generated on c6xxx

Hi,

I am using CCSv5.4 on C6678 .

I want to load .bin on C6678 DDR and execute it. CCS generate .out and i converted .out to bin by using post command

"${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd6x.exe" "${CG_TOOL_ROOT}/bin/hex6x.exe" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"

I am able to generate .bin successfully .But the binary image is not executing.

But i am able to execute .out which i got from CCS before performing post build.

Can anyone tell me where i am going wrong.

  • Hi,

    Which boot mode you using for load .bin?

    TI validated all the boot modes on C6678 EVM. Refer below MCSDK document to cross check your boot mode
    MCSDK Path: \ti\mcsdk_2_01_02_06\tools\program_evm\program_evm_userguide.pdf

    Better to use TI provide pre-build binary for validate the specific boot mode on your setup.

    Thanks,
  • Hi,


    Thanks for your reply,

    I am able to boot the pre-build binary provided by ti and i have no issues on it.

    I tried in NAND boot modes to boot my bin image but it dint boot.

    But i am able to boot the .out of same image (before converting to .bin ) in nor and tftp mode.

    Am i missing something in post command,

    "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd6x.exe" "${CG_TOOL_ROOT}/bin/hex6x.exe" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"
     

    Please guide me,

  • Hi,

    Can ti member help me out .
  • Hi Vidhya,

    Would like to know how did you flash the binary into NAND memory?? Did you use the NAND writer to write the binary?

    If yes, just check that the steps you followed to flash the binary are aligned with the steps given at "\nand\docs\README.txt" in the MCSDK package.

    And also, check which version of Bios MCSDK you use... If it is 2.0.2 or earlier, an update to IBL ( Intermediate bootloader) is required for flashing the binaries into NAND/NOR flash.

    If booting from NOR Flash on a 6670 EVM is failing the DDR3 test with Bios MCSDK 2.0.2 or earlier, an update to the Intermediate Bootloader is available which will fix it. If you have a more recent version of the BIOS MCSDK, this fix is included in your installation. See the instructions for applying the update here. Once you have updated the files, come back to this page and follow the instructions for updating the IBL EEPROM image

    Please refer to this TI WIKI page for more info:

     

    Regards,

    Shankari

    ----------------------------------------------------------------------------------------------------------------------------

    Please click verify answer button if it answers your question.

    ----------------------------------------------------------------------------------------------------------------------------

  • Hi Shankari,

    Thanks for your inputs.

    I am using a latest MCSDK Version mcsdk_2_01_02_06 and using nand writer that comes with MCSDk to flash into nand memory.I am able to generate .out through CCSV5.3 and execute in NOR.But could not boot the binary in nand after converting this .out to .bin using command below,

    "${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin.bat" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd6x.exe" "${CG_TOOL_ROOT}/bin/hex6x.exe" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin.exe"


    Please guide me,
  • Hi,

    Can Ti help me out. This is long pending issue i am facing and i need support to sort it out.
  • Please refer below post,

    e2e.ti.com/.../1253899

    Thank you.
  • Hi Raja,

    The post which you have referred use strip6x.exe to convert .out to .bin. It just converts the format type but not from elf file to binary image. when you read the binary image content, it contains ELF header. I tried with mad-utility and able to generate the .bin image from an elf image.

    I using an command prompt in IBL to fetch this converted binary image through tftp and execute it. once the binary execution is complete,i should get back to ibl prompt. which is not happening. But binary file is executed successfully and PC points to exit.

    Can you help me on this.
  • Apologize for the delayed response.

    1. What is boot sequence you are trying to implement?

    Is it RBL I2C boot ---> IBL TFTP boot  -> IBL boot?

    2. Why do you want to re-enter IBL ?

    3. Is the image loaded over TFTP over writing any memory sections used by the IBL ?  

    4. What is the procedure used to re-enter back to IBL prompt?

    5. When you mention that things are working in CCS, do you mean that you were able to go back into IBL prompt when you run this with a GEL file?

    Thank you.

  • Hi Vidya,

    I copied the Ganapathi's answer to this post since he is not able to reply.

    IBL Ethernet configuration boot mode(ibl_BOOT_MODE_TFTP) supported boot format binary is BBLOB(ibl_BOOT_FORMAT_BBLOB). If you load the ELF format binary means it will not boot, that only the binary is working on no-boot mode and not work on TFTP boot mode on your setup.

    Please take a look at below thread to change boot format on IBL configuration table:
    e2e.ti.com/.../1547959

    Modified the same on IBL source and use the re-build IBL binary.
    mcsdk_2_01_02_06\tools\boot_loader\ibl\src\util\iblConfig\src\device.c, edit this file by changing ibl_t c6678_ibl_config(void) ====> if you are using 6678.
    ibl.bootModes[0].u.ethBoot.bootFormat = ibl_BOOT_FORMAT_ELF;

    Thanks,
    Ganapathi.
  • Thanks for your reply,

    1.What is boot sequence you are trying to implement?

    is it RBL I2C boot ---> IBL TFTP boot  -> IBL boot?

    Yes

    2. Why do you want to re-enter IBL ?

    4. What is the procedure used to re-enter back to IBL prompt?

    Its our customer requirement. We need to execute multiple .out images to test different applications. So we decide to create a command prompt in IBL source which is nothing but a continuous loop in which we call tftp boot sequence. We get the name of the image (eg., app.out) and serverip through serial  and pass it as arguments to ethboot call and execute it.

    I will explain the sequence,

    In ethboot.c,

    Execution start once entry address is fetched through dload function and start below process,

           iblStatus.exitAddress = entry;

           exit = (void (*)())entry;

         rc= (*exit)(); ---> execution started. After successfull execution, i expect to get the below print statement. But dint.

       print_f("\n Execution completed."); -> our customized print_f call.

    3. Is the image loaded over TFTP over writing any memory sections used by the IBL ?  

    No.

    5. When you mention that things are working in CCS, do you mean that you were able to go back into IBL prompt when you run this with a GEL file?

    I guess its not possible to go back to IBL prompt once working in CCS environment. What i mentioned in earlier query is , i am able to execute the image through load and run option in CCS. After successful execution, program halts and i can use the load/run option again  to run another image. I want the similar thing to happen when i execute the image from IBL prompt.

    Additional Information.,


    I noticed there is continuous loop in abort function which is called in exit.c in compiler c6000_7.4.1,


    source exit.c exist in path tools\compiler\lib\rtssrc.zip


    In exit.c ,line no.127

      for (;;);   /* CURRENTLY, THIS SPINS FOREVER */

    Can you tell why this contionous loop is used to spin forever and is this would be the reason my application is not getting back to the IBL Prompt.

    Please let me know, if any info is not clear.

    Its long pending issue and i need support to sort it out.

  • Hi Titus,

    Thanks for your response,

    I sorted out that issue. I used mad utility to create .bin image of my .out and executed successfully.
  • Hi Vidya,
    Sounds good.
    We were glad that you able to solve your problem.
    Thanks for your update.

    Could you please tell us what you have done to fix this problem, it could help other community members in future.
  • Titus ,

    I generated .out of my project to .bin using MAD Utility.

    Ported xxx.out to mad-utils\mad-loader\examples\app_1\build folder
    Edited deployment_template_C6678_bypass_prelink.json script
    changed "fileName" : "../mad-loader/examples/app_1/build/xxx.out",
    generated c6678-le.bin for xxx.out
    Then configured boot format as BLOB format to boot the binary image.
    strip6x, hex6x utility dint help in converting .out to .bin .
    It look simple, but it took days to find the solution.

    Thanks,
  • Hi,

    Any suggestions ??
  • I am working on it, will get back to you if i got any.
  • Hi Raja,

    Any Inputs.

    We are facing critical delay due to this issue.

    can you help out.
  • Hi,

    Any inputs.

    I have been waiting for reply since long.

    Any inputs from ti employees.