cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32H563ZIT Dev Board] Error when generating SDMMC files using CMake - STMCubeMX version 6.16.1

Sander_UP
Associate III

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.

1 REPLY 1
Souhaib MAZHOUD
ST Employee

Hello @Sander_UP 

Thanks for reporting this in STCommunity,

I'm currently investigating internally this behavior. I will get back to you asap.

KR, Souhaib

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.