2022-08-25 06:26 PM
2022-08-26 12:40 AM
Hi Crane,
when you generate a project with STM32CubeMX that uses FreeRTOS the definition of the configASSERT() macro is placed in between "USER_CODE" comments in the generated Inc/FreeRTOSConfig.h file:
/* USER CODE BEGIN 1 */
#define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); for( ;; );}
/* USER CODE END 1 */
That is a strong hint that this definition is not managed by STM32CubeMX but may and can be changed by the user.
So simply change the definition later in the generated file. It will not be overwritten on later re-generations since it is protected by the "USER_CODE_..." comments.
Regards
Thomas
2022-08-26 12:40 AM
Hi Crane,
when you generate a project with STM32CubeMX that uses FreeRTOS the definition of the configASSERT() macro is placed in between "USER_CODE" comments in the generated Inc/FreeRTOSConfig.h file:
/* USER CODE BEGIN 1 */
#define configASSERT( x ) if ((x) == 0) {taskDISABLE_INTERRUPTS(); for( ;; );}
/* USER CODE END 1 */
That is a strong hint that this definition is not managed by STM32CubeMX but may and can be changed by the user.
So simply change the definition later in the generated file. It will not be overwritten on later re-generations since it is protected by the "USER_CODE_..." comments.
Regards
Thomas
2022-08-26 09:09 PM
Got it. Thanks a lot Tthan!