No means to detect ASSERT trigger without a debugger for configASSERT(0)
Hello @ALABB , @Khouloud ZEMMELI
I am requesting an enhancement in file FreeRTOSConfig.h. I observe STM32CubeMX adds the file to any STM32H7 project that uses FreeRTOS version 10.2.1 (with CMSIS version 2).
And in the template file:
During code execution, if
configASSERT(0)gets executed, the code execution will stop, and without a debugger it is impossible to know why code got stuck.
I therefore request to please update the ST provided Header file, and add a weak function to the statement, which can later be coded by the user.
Is it possible to change the below line of code:
#defineconfigASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }to:
#define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); rvUserAssertInformFunction(__FILE__, __LINE__); for( ;; );}and add:
__weak void rvUserAssertInformFunction(char * pF, unsigned long ln)
{
pF = pF;
ln = ln;
}Please share your views.
I have already reported my concern to the STM32CubeH7 community, bit it seems they are not the ones who need to make change to the code.
https://github.com/STMicroelectronics/STM32CubeH7/issues/96
Please help.
Thanks,
Rajeev