How can I use the define "__STM32H7xx_HAL_VERSION" in my main.c?
Hello,
I will supervise the version of the used HAL during the compilation process. I know, I can use the function from STM32h7xx_hal.c
HAL_VERSION = HAL_GetHalVersion(); to get the HAL-Version. But to use this information, I have to start the application. My aim is to avoid the usage from newer HAL-versions during the compilation to grant the traceability from of of our parts for our firmware.
The following code snipped can check it but the second line is copied in by hand. The number is the output from the HAL-definition.
#define __HAL_CURRENT_VERSION (0x010B0000UL)
#define __STM32H7xx_HAL_VERSION (0x010B0100UL)
#if __HAL_CURRENT_VERSION < __STM32H7xx_HAL_VERSION
#error "Attention! STM32H7xx_HAL_VERSION newer than the current version!"
#endifI want to get the information directly from STM32h7xx_hal.c., which is located in
%USERPROFILE%\STM32Cube\Repository\STM32Cube_FW_H7_V1.11.0
If somebody has an idea to solve this, let me know. Thanks,
Jan