2019-10-28 10:05 AM
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
Solved! Go to Solution.
2020-01-08 04:22 AM
The issue can not be reproduced after updating to cubemx 5.4 and STM32H7 package V1.6.0
2019-11-19 07:26 AM
Hello @RMart.0 ,
The functions defined in stm32h7xx_ll_delayblock.c are only used with SD module.
I assume that there is no need for the check "defined(HAL_QSPI_MODULE_ENABLED)".
Anyway, it will not generate a compilation error. But I will check with our development team to remove the non-needed check, unless it has a particular use-case that they will explain.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2019-11-19 07:55 AM
Reading again the summary of your question: you said that generated code is not compiling.
Could you please share the .ioc file leading to this issue?
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2020-01-08 04:22 AM
The issue can not be reproduced after updating to cubemx 5.4 and STM32H7 package V1.6.0