Question
[STM32H563ZIT Dev Board] Error when generating SDMMC files using CMake - STMCubeMX version 6.16.1
- January 16, 2026
- 2 replies
- 238 views
Hello!
I tried to generate the code for SDMMC using CMake, but was facing an error that did not let me finish building the project. The error was:
".../FileX/Target/fx_stm32_sd_driver_glue.c:40:(.text.fx_stm32_sd_init+0xc): undefined reference to `MX_SDMMC1_SD_Init'".
Also, using ThreadX and FileX. In FileX I enabled the setting "FX Driver Initializes the SD IP" (set to true).
I saw that the MX_SDMMC1_SD_Init function is inside the main.c file, but it is declared with the "static". So, right now, to be able to build the project with CMake, I need to manually remove the "static" from the MX_SDMMC1_SD_Init function definition in main.c file.
