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.

TMS320F28388D: Boot28.asm code flow in compiler v18.1.3.LTS is different when compared the custom library from the TI library rts2800_fpu32_eabi.lib

Part Number: TMS320F28388D


Hi TI,

We have created our own RTL library that has some boot support functions. while I was testing the boot routine of our library, I could some issues when boot28 asm calling auto initialisation function.

The issue is when I am using TI library rts2800_fpu32_eabi.lib  , while auto initiaizing it willcall __TI_auto_init_nobinit_nopinit function, so that there will be no boot intiialisation will be performed as well as no .PINIT initialisation.

But when tested with our rtl with the same compiler lnker flags, using -rom model, it always tends to call auto_init() function.

For you understanding I have attach the a sheet below:

Library compression  Autoinit.c routine Linker flags
rts2800_fpu32_eabi.lib NO __TI_auto_init_nobinit_nopinit  (0,0,NULL)   copy_compression=off rom_model cinit_compression=off
RTL Yes AUTO_INIT copy_compression=lzss rom_model cinit_compression=off
rts2800_fpu32_eabi.lib Yes __TI_auto_init_nobinit_nopinit copy_compression=lzss rom_model cinit_compression=off
rts2800_fpu32_eabi.lib Yes __TI_auto_init_nobinit_nopinit copy_compression=lzss --*ram_model --cinit_compression=off
RTL NO __TI_auto_init_nobinit_nopinit ram_model
RTL NO AUTO_INIT  rom_model cinit_compression=off
rts2800_fpu32_eabi.lib NO __TI_auto_init_nobinit_nopinit  (0,0,NULL)    rom_model cinit_compression=off

I wanted to understand how we can change the settings to halt the boot time initialisation, even with the -rom model.

Also I have attached one screenshot while I was debugging.

I believe I have not missed any support file while integrating the boot support routine.

RTL NO AUTO_INIT  rom_model cinit_compression=off
rts2800_fpu32_eabi.lib NO __TI_auto_init_nobinit_nopinit  (0,0,NULL)    rom_model cinit_compression=off
  • Gurusha,

    First thing to note is that 18.1.x.LTS does not officially support EABI. You need 18.12.x.LTS or later for C28 EABI support.

    Perhaps you are not setting below in your RTL library?

    from autoinit.c

    #ifdef __TI_RTS_BUILD
    # ifdef __clang__
    /*---------------------------------------------------------------------------*/
    /* __TI_default_auto_init indicates that the default TI auto initialization */
    /* routine is being used. The linker makes assumptions about how */
    /* initialization is being performed when this symbols is seen. This symbol */
    /* should NOT be defined if a customized auto initialization routine is used.*/
    /*---------------------------------------------------------------------------*/
    __asm(".set __TI_default_auto_init, 1");
    # else
    __asm("__TI_default_auto_init .set 1");
    # endif
    #endif

    Not setting __TI_default_auto_init would definitely change the linker behavior when linking against
    the compiler RTS vs your RTL.

    Regards,
    Greg

  • Hi Greg,

    GregM said:
    #ifdef __TI_RTS_BUILD

    so this is the only way we can configure the settings? There's no other way without changing the code we can do that?

    Also, since we have some limitations & as per the aerospace certification process,  we are sticking with compiler V18.1.3.LTS and eabi.

    But still I tried by including #define __TI_RTS_BUILD and it seems like it is working for me.

    I am able to call __TI_auto_init_nobinit_nopinit() function.

    This function will be called when we set any boot time initialization to zero right? Correct me if I am wrong But how with just using -rom_model, this function has been called? Could you explain me in detail? Because I could know the flow of bootstrapping method from manual, but don't understand how it has been called from auto-initialization function.

    Thanks

    Regards

    Gurusha

  • Gurusha,

    I will contact you offline regarding the compiler version (V18.1.3.LTS) that you are using for your application.  That version is suggested to match the flash API binary only, but not for your application.  

    You can continue discussing the other issue with Greg.

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    But this will become a big issue if it requires us to deviate to other compiler versions for boot routine and other support functions. I am not sure, how it will be implemented then with respect to current flash API version. Kindly please suggest a way to do it.

    Thanks & Regards

    Gurusha

  • Gurusha,

    I will contact you today on this to propose a solution.

    Thanks and regards,
    Vamsi

  • Gurusha,

    The macro __TI_RTS_BUILD is how our linker knows to work with our RTS boot routines.  You need to set that if you want the same linker boot specialization logic.  For your other questions, please see spru514v Linker user guide section 4.3.5 for --rom_model vs --ram_model

    I must caution again that 18.1.3.LTS does not support EABI according to it's user guide. You are using hidden capability that was not fully productized until 18.12.0.LTS

    Regards,
    Greg

  • Hi Vamsi,

    Shall we discuss now?

  • Gurusha,

    I sent you (included your colleagues as well) an email.  Please check and respond.  We can discuss that over the email.

    Thanks and regards,
    Vamsi