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.

TMS570LC4357: Problem with flag array declaration in SafeTI Diagnostic Library

Part Number: TMS570LC4357

Using SafeTI Diagnostic Library 2.4.0 on a TMS570LC4357 there is a problem with the declaration of:

boolean sl_priv_flag_set[TESTTYPE_MAX - TESTTYPE_MIN] = {0};

in sl_priv.c

with
#define TESTTYPE_MIN SRAM_ECC_ERROR_FORCING_1BIT = 0xA0A0
#define TESTTYPE_MAX VIM_SOFTWARE_TEST = 0xA0D9

the array is defined
boolean sl_priv_flag_set[0x39 = 57]
so valid index range is from [0..56]

if the flag for VIM_SOFTWARE_TEST is set, for example in function SL_SelfTest_VIM(VIM_SOFTWARE_TEST),
SL_FLAG_SET( VIM_SOFTWARE_TEST) writes at index 57 out of the bounderies of the flag array.

Declaration of the array should be corrected:
boolean sl_priv_flag_set[(TESTTYPE_MAX - TESTTYPE_MIN) + 1] = {0};