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.

SK-AM62: am62x bootloader entry point

Part Number: SK-AM62

Hi,

I'm looking at boot_arm7r_asm.S file inside mcu+sdk and it has this function called _c_int00_sbl and the comment says that this is the entry point of the program. is this right? based on what I read on the TI Clang compiler the entry point is _c_int00 by default and nowhere in the SDK is overwritten. So I was wondering what the purpose of _c_int00_sbl is. how is it used?

Best,

Amir

  • Hello ,

    We are looking into your issue please expect reply either today or on Monday.

    Regards,

    S.Anil

  • Hi Amir,

    _c_int00_sbl is the entry point for the bootloader whereas _c_int00 is the entry point for the user application programs. When the board is powered up, ROM boots the bootloader. Since, bootloader is also a program though a special one, there will be a entry point and that entry point is _c_int00_sbl.

    Steps to confirm:

    • Launch a debug session in CCS.
    • Right click the MAIN_Cortex_R5_0_0 → Open GEL Files View → Auto Run and Launch Options → Uncheck On a program load or restart
    • Connect to MAIN_Cortex_R5_0_0 core.
    • Load the sbl_ospi.debug.out program

    After following the above steps, we will see debugger halted at _c_int00_sbl.

    Please let us know if it answers your query.

    Regards,

    Prashant

  • Thanks. I'm not using CCS (using makefiles), and nowhere in the SDK, is the entry point overwritten from _c_int00 to _c_int00_sbl. I don't think that the ti clang compiler has any way to know that our program is a bootloader and it should change the entry point unless we tell it. if it has been overwritten, can you tell me in which file?

  • Hi Amir,

    Sorry, I was not precise before. Actually, neither _c_int00_sbl nor _c_int00 are the entry points in case of R5 cores. The actual entry points are _vectors_sbl and _vectors for bootloader and application programs respectively. However, the first instruction on the entry point actually jumps to _c_int00 and _c_int00_sbl respectively so they can be treated more or less as entry points.

    I don't think that the ti clang compiler has any way to know that our program is a bootloader and it should change the entry point unless we tell it.

    You are right. For TI ARM CLANG compiler, the bootloader is just any other program to build and link. Unless we tell it, it will look for _c_int00 only as the entry point.

    In the SDK, we actually do tell the compiler to have a different entry point. The file we are looking for is linker.cmd file.

    Attached snaps below are the linker.cmd files for sbl_ospi bootloader and hello_world example respectively. 

    Here, we can see -e_vectors_sbl and -e_vectors which tells the linker to set _vectors_sbl and _vectors as the entry points.

    Regards,

    Prashant

  • Hi Amir,

    Can you please tell us if the above response resolve your query?

    Regards,

    Prashant

  • yes. I get it now. the -e was very subtle in the linker I couldn't tell it was the command to set the entry point.

  • Hi Amir,

    Thank you for the confirmation. Glad to know you got it. Please click on "This Resolved My Issue" button on the appropriate response. We can then close the thread.

    Regards,

    Prashant

  • Hi Amir,

    We are closing the thread. Please mark the appropriate response that resolved the query.

    Regards,

    Prashant