CubeMx generated code for STM32h7 when QuadSPi enabled but sd card disabled not compiling (perhaps bug in generated code)
When I generate code for the STM32h750 via cubeMX, I see in stm32h7xx_ll_delayblock.h:
#if defined(HAL_SD_MODULE_ENABLED) || defined(HAL_QSPI_MODULE_ENABLED)
I have QSPI enabled, but SD disabled, and the code following the #if is accounted for in the compilation, as expected. This code makes use of a const called DLYB_MAX_UNIT.
The issue is that stm32h7xx_ll_delayblock.h, which contains the definition for DLYB_MAX_UNIT is never included when SD is disabled.
This seems to be a bug either in the #if mentioned above (which should not contain the || defined(HAL_QSPI_MODULE_ENABLED)) or in the stm32h7xx_hal_qspi.h file, which does not include "stm32h7xx_ll_delayblock.h".
Notice that if SD card is enabled, the code should compile because of the following lines in stm32h7xx_hal_sd.h:
#if defined (DLYB_SDMMC1) || defined (DLYB_SDMMC2) || defined (DLYB_SDMMC3)
#include "stm32h7xx_ll_delayblock.h"
#endif /* (DLYB_SDMMC1) || (DLYB_SDMMC2) */
My STM32H7 package is V1.5.0
