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.

How to create a bootable binary files?



Hi All,

I am creating a bootloader.

The boots are in order, three times a failure.

Load binary data in the address 0x80000000, if you would like to jump to 0x80000000.

How do I create a bootable binary file, not the ELF file?

2) strip6x -p -o bootloader.bin bootloader.out ==> BOOT PASS

3) tiobj2bin app.out app.bin ofd6x hex6x mkhex4bin ==> BOOT FAIL

Thanks,

  • Hi Gyosun,

    What is the boot sequence and mode? Is it something similar below? 

    If as above, you are able to run IBL and not able to load the application from SPI NOR flash. Is my understanding right?

    Thank you.

  • Hi,

    For my understanding, you are able to boot ELF format binary file from IBL and not able to boot BBLOB format binary file from IBL boot. Is it correct?

    I have answered your previous thread, how to change the boot format ibl_BOOT_FORMAT_BBLOB to ibl_BOOT_FORMAT_ELF on IBL source.

    https://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/429512

    Thanks,

  • Hi Raja,

    I think the concept is.

    It works well to create CBOOT.

    After downloading the app from the flash through the uart CBOOT, the concept is to boot after a ddr3 copy area.

    Simply convert your file to the BIN file OUT(ELF format).

    How do I convert? In another type of the CPU it has been converted to objcopy.

    Thank you for your help.

  • Now I understand the flow.
    What is the purpose of CBOOT?
    What is the file format supported by CBOOT?
    Are you downloading the application image from flash or through UART?
    From my understanding, the CBOOT fails to load and run the application image from flash or UART.

    Suggestion:
    We would suggest you to customize IBL for your purpose for faster booting. Building IBL and generating .bin are documented as readme.txt files in MCSDK installation directory.

    Thank you.
  • Above it solves its own problems to be operating in the same concept.

    I convert from elf to bin.
    1. hex6x.exe app.rmd
    app.out
    -a
    -boot
    -e _c_int00

    ROMS
    {
    ROM1: org = 0x80000000, length = 0x200000, memwidth = 32, romwidth = 32
    files = { app.btbl }
    }
    2. b2ccs app.btbl app.btbl.ccs
    3. ccs2bin -swap app.btbl.ccs app.bin
    4. Download the 0x80000000 through uart in CBOOT.
    5. run entry (0x80000000)
    6. application boot completed!!!

    The reason is because with cboot do not use JTAG.

    Thanks Raja,
  • Glad to hear from you. Thank you for the update.
  • Sorry Raja ... The problem was not resolved.

    Binary file, which is produced does not boot after the download.
    After loading the JTAG and disconnect was well when loading a binary file. T.T
    It looks like there is a problem with the script file to create a binary file.

    ----------Linker command file----------
    -c
    -heap 0x40000
    -stack 0x8000

    /* Memory Map 1 - the default */
    MEMORY
    {
    L1PSRAM (RWX) : org = 0x0E00000, len = 0x7FFF
    L1DSRAM (RWX) : org = 0x0F00000, len = 0x7FFF
    L2SRAM (RWX) : org = 0x00800000, len = 0x00010000
    MSMCSRAM (RWX) : org = 0xc000000, len = 0x200000
    DDR3 (RWX) : org = 0x80000000,len = 0x00200000
    }

    SECTIONS
    {
    platform_lib > DDR3
    .text > DDR3
    GROUP (NEAR_DP)
    {
    .neardata
    .rodata
    .bss
    } load > DDR3
    .stack > DDR3
    .cinit > DDR3
    .cio > DDR3
    .const > DDR3
    .switch > DDR3
    .sysmem > DDR3
    .far > DDR3
    .fardata > DDR3
    }
    -------------------------------------------------

    What happens if I want to accept the binary file is loaded into memory to boot?

    Thanks,
  • Also it solved.
    1. strip6x.exe -p -o app_elf.bin app.out
    2. objcopy -I elf32-little -O binary app_elf.bin app.bin
    3. add entry point
    4. Download the 0x80000000 through uart in CBOOT.
    5. run entry
    6. application boot completed!!!

    The problem is solved happy. :)

    thanks,
  • Hi Gyosun,
    Thank you for the update.

    I have a doubt in step 3(add entry point). How are doing this step? Is it part of CBOOT?
  • Hi Raja,

    Entry Point has created a program to extract the bin file from the map file to add.
    Note that the bin file was assigned to another heap and stack memory area not loaded.

    Thanks,
    Regards,