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.

RTOS/TMS570LS0432: TMS570LS Start up problem

Part Number: TMS570LS0432
Other Parts Discussed in Thread: HALCOGEN

Tool/software: TI-RTOS

Hello

 in start up  void _c_int00(void) 

I see  someone  use the two function coreInitRegisters_();coreInitStackPointer_();and  someone use the two function SL_Init_R4Registers();SL_Init_StackPointers();

I want to know which one is correct.

  • Hello,

     SL_Init_R4Registers() and SL_Init_StackPointers() are part of SafeTI Diagnostic Library. You can use them instead of _coreInitRegisters_() and _coreInitStackPointer_() or leave HALCoGen generated functions for initialization.

    The description of SafeTI Diagnostic Library functions is in Docs folder under SafeTI Diagnostic Library installation.

    Best regards,
    Miro

  • Thank you 

      Now  I use library 2.4.0,  

      When I compile the program,ccs error unresolved symbol SL_Init_StackPointers, 

    Why?

    I found SL_Init_StackPointers in sl_api.h

    #ifndef EXTERNAL_SP_INIT
    /**
    * @brief Initializes CPU's stack pointer for SVC, FIQ, IRQ, ABT, UND & SYS modes.
    *
    * @description This function initializes the stack pointers for the privilege modes of the CPU. Following\n
    * variables are used as stack pointers and hence must be defined by the application. StackModeSVC,\n
    * StackModeFIQ, StackModeIRQ, StackModeABT, StackModeUND, StackModeSYS. Function uses the\n
    * macros @ref grp_armmodes from sl_config.h file.
    *
    * \if imageenabled
    * @image html SL_Init_StackPointers.jpg
    * @image rtf SL_Init_StackPointers.jpg
    * @image latex SL_Init_StackPointers.eps
    * \endif
    *
    * @param [in] None
    * @param [out] None
    *
    * @return None
    *
    * Example Usage:
    * @code
    * SL_Init_StackPointers();
    * @endcode
    *
    * @entrymode Any Privilege Mode
    * @exitmode SVC Mode
    *
    * @seealso @ref SL_Init_R4Registers
    *
    * **Note: Application can define the macro EXTERNAL_SP_INIT to disable
    * the use of this API and use its own implementation to initialize the stack
    * pointers. This provision is provided because the diagnostic library expects
    * the application to define global variables pointing to the Stack pointer
    * locations, and if not using this API, need to be removed.
    *
    * \if destagenabled
    * @destag DES_02
    * @reqtag SL_SR213
    * \endif
    */
    void SL_Init_StackPointers (void);
    #endif

  • Hello

     I want to know What is the difference between these two pairs?

    SL_Init_R4Registers();
    SL_Init_StackPointers();
  • The functions coreInitRegisters and coreInitStackPointer are generated by HALCoGen. When using the Safety Diagnostic Library for your development, you can choose to use the SL_* functions defined in the sl_asm_api.asm file under the C:\ti\Hercules\SafeTI Diagnostic Library\2.4.0\safety_library\source folder (assuming install under C:\ti\).

    There is no difference between the actual implementation of these functions.