Other Parts Discussed in Thread: SYSCONFIG, SYSBIOS
Project with RTOS7, simplelink_cc13xx_cc26xx_sdk_6_30_01_03, buid with Ti Clang v.2.1.3LTS, and SysConfig_v1.15.
I use Assert_isTrue() to check for an errors in a several functions, for instance, like this:
// Check if input data mailbox is defined with correct message size
Assert_isTrue(sizeof(TskFwDnld_InputMbxMsg_t) == Mailbox_getMsgSize(mbxFwDnldTskInput), NULL);
The problem is that the compiler doesn't generate code for this assert. Assert_isTrue() macro is defined in Assert.h
#if BIOS_assertsEnabled_D
#if Assert_useBkpt_D
#define Assert_isTrue(c, id) do { \
if (!(c)) __asm("bkpt #13"); } while (0);
#else
extern void Assert_failX(const char * id);
#if Assert_addFileLine_D
#define Assert_isTrue(c, id) do { \
Error_PLACE_STR_IN_SECTION(loc, # id " (" __FILE__ ":" Error_STR(__LINE__) ")"); \
if (!(c)) Assert_failX(loc); } while (0);
#else
#define Assert_isTrue(c, id) do { \
Error_PLACE_STR_IN_SECTION(loc, # id); \
if (!(c)) Assert_failX(loc); } while (0);
#endif
#endif
#else
#define Assert_isTrue(c, id)
#endif
The reason code for assert to not be generated is that for the module (.c file) with my assert the BIOS_assertsEnabled_D is not defined.
Assert are managed from SysConfig sections TI_RTOS->BIOS and TI_RTOS->RUNTIME->Assertion_Handling.
The strange is that BIOS_assertsEnabled_D is enabled by sections TI_RTOS->BIOS, but Asserts should works and only by TI_RTOS->RUNTIME->Assertion_Handling, which will not happened.
Cloud you give me an example how should custom assert be used according to you SysConfig designers. I mean what header should be included and where, taking in to account that it is posible to have assertion enabled by adding assertion module by TI_RTOS->RUNTIME->Assertion_Handling without they to be enabled in RTOS by TI_RTOS->BIOS.
Regards,
Dimitar