2025-11-08 6:38 PM
Colleagues, I’ve got a nitpick question.
Where’s the best place to define USE_FULL_ASSERT ? It can be defined as a preprocessor symbol. Or, it can be #defined in the stm32xxx_hal_conf.h file. Or, is there a setting in the .ioc file?
The stm32g4xx_hal_conf.h which STM32cubeIDE had generated for me has this block:
/**
* @brief Uncomment the line below to expanse the "assert_param" macro in the
* HAL drivers code
*/
/* #define USE_FULL_ASSERT 1U */But it’s not in the the USER CODE block. I’m concerned that the automatic code generator would restore the #define USE_FULL_ASSERT back to the commented out line next time it re-generates stm32g4xx_hal_conf.h .
Best regards,
- Nick
Solved! Go to Solution.
2025-11-08 6:58 PM
If you want to use the CubeMX way, enable it within the IOC file here in Project Manager.
After regenerating code, it will get defined (uncommented) in the stm32g4xx_hal_conf.h file.
2025-11-08 6:58 PM
If you want to use the CubeMX way, enable it within the IOC file here in Project Manager.
After regenerating code, it will get defined (uncommented) in the stm32g4xx_hal_conf.h file.