Skip to main content
Associate II
Feb 14, 2025 6:41 AM UTC
Solved

Code generation problem for FileX

Hello,

I am using STM32H730ZBT6 with STM32 CubeMX V6.12.1 (I am not using the newest version because of the problem related in topic Downgrade STM32CubeProgrammer in STM32CubeIDE. I dont' know exactly if CubeMX would reproduce the problem, but for the case...) and I have detected 2 problems in code generation:

1. Eventhough I am using peripheral SDMMC2 the code generated in file "fx_stm32_sd_driver_glue.c" is prepared for SDMMC1. Here a code portion as example:

 

extern SD_HandleTypeDef hsd1;
#if (FX_STM32_SD_INIT == 1)
extern void MX_SDMMC1_SD_Init(void);
#endif

 

2. If the option "Generate peripheral initialization as a pair of '.c/.h' files per peripheral", some erros ocur because "fx_stm32_sd_driver_glue.c" file doen't know where to find functions and instances, and is necesary to include "sdmmc.h" file.

 

A part of those twoo problems, in functions "void HAL_SD_TxCpltCallback(SD_HandleTypeDef *hsd)" and "void HAL_SD_RxCpltCallback(SD_HandleTypeDef *hsd)" hsd is not used, so the compiler gives warnings. In other cases, "UNUSED(...)" is used to avoid these warnings, could it be applied to those two functions too?

 

Thank you and best regards.

Egoitz.

This topic has been closed for replies.
ST Technical Moderator
Feb 18, 2025 10:48 AM UTC

Hello @ego ,

Further to your comment, I suggest that you change SD Instance to SDMMC2 under FileX.

MahmoudBenRomdhane_0-1739875330350.png

MahmoudBenRomdhane_1-1739875613809.png

Thanks.

Mahmoud

 

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.

4 replies

ST Technical Moderator
Feb 14, 2025 10:09 AM UTC

Hello @ego ,

 

First let me thank you for posting and welcome to the ST Community.

For more investigation, I suggest please that you provide your Ioc.File.

 

Thanks.

Mahmoud

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.
egoAuthor
Associate II
Feb 14, 2025 10:22 AM UTC

Sure, there you have it.

ST Technical Moderator
Feb 18, 2025 10:48 AM UTC

Hello @ego ,

Further to your comment, I suggest that you change SD Instance to SDMMC2 under FileX.

MahmoudBenRomdhane_0-1739875330350.png

MahmoudBenRomdhane_1-1739875613809.png

Thanks.

Mahmoud

 

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.
egoAuthor
Associate II
Feb 19, 2025 6:33 AM UTC

Hello Mahmoud,

It worked, thank you.

Egoitz.