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.

RM48L952: SafeTI: Forces to log errors in case function entry checks are enabled

Part Number: RM48L952

Hello (again),

In case I select in sl_config.h like this

#define FUNCTION_PARAM_CHECK_ENABLED            1u /**< When defined enables the parameter check at function entry */
#define FUNC_ENTRY_COND_CHECK_ENABLED           1u /**< When defined enables the entry codition check at function entry */
#define FUNC_RESULT_LOG_ENABLED                 0u /**< When enabled logs the function results to a pre-determined buffer */

Based on code comments (and manual) I have enabled just checking, not any kind of logging...

How ever I have to include sl_log.c file into project otherwise it won't compile. And when I add it (I don't want to add it since I do not want to log anything)  I got compiler warnings
sl_log.c  
Warning[Be006]: possible conflict for segment/section "LOG_DATA": C:\GIT\PESTO\swm_DIAG\swu_DIAG_SafeTI\sl_log.c 94
          variable "_SL_Log_Initialized @ "LOG_DATA"" (declared at line 94 of "C:\GIT\PESTO\swm_DIAG\swu_DIAG_SafeTI\sl_log.c") is an initialized variable
          variable "_SL_Log_Error_Buffer @ "LOG_DATA"" (declared at line 262 of "C:\GIT\PESTO\swm_DIAG\swu_DIAG_SafeTI\sl_log.c") is a zero-initialized variable (1 more variable like this)


These function calls should be behind separate flag(s):
SL_Log_Error(FUNC_ID_ST_STC, ERR_TYPE_ENTRY_CON, 2U);

like this one is
#if(FUNC_RESULT_LOG_ENABLED == 1)
    SL_Log_Result(FUNC_ID_ST_HET, testType, (SL_SelfTest_Result)retVal , 0u);
#endif

Flags could be like but that definetly should be the integrators decision will there be logging or not that is completely separate stuff from argument/condition checkings...
- FUNCTION_PARAM_LOG_ENABLED
- FUNC_ENTRY_LOG_ENABLED

  • Hello Jarkko,

    FUNC_RESULT_LOG_ENABLED is only used to enable/disable the logs the function results. There is not another flag for log errors. 

    Regards,

    QJ

  • It this answer some kind of joke???

    Did I ask something about function logging and did I have that enabled?

    Have you ever seen the code? In case not here is a snippet of it.

    What is enabled here? CHECKING is enabled... What does code comment specify for that:
    /**< When defined enables the entry codition check at function entry */

    it specifies CHECKING and checking ONLY

    #ifdef FUNC_ENTRY_COND_CHECK_ENABLED
    /* Error if not in privilege mode */
    if (ARM_MODE_USR == _SL_Get_ARM_Mode()) {
    SL_Log_Error(FUNC_ID_ST_SRAM, ERR_TYPE_ENTRY_CON, 2U);
    return(retVal);
    }
    #endif

    What does "great" TI code? It LOGs!!!!

    Do you get paid by useless answers or something since this goes beyond ridiculous... Ticket has been open nearly 1 week and that is only answer what you can provide....
  • Hi Jarkko,

    I agree with your argument about new Flag. Flag will be added to select this log error support. 

    Ticket SDOCM00122940 is raised to address this request in upcoming release.