2026-04-02 3:11 AM - last edited on 2026-04-02 3:27 AM by Andrew Neil
Hi Everyone,
I need your help.
I use STM32H573VIT but I can't FATFS in CUBEMX.
I checked FILEX, SD interface. But CUBEIDE say fatfs.h : No such file or directory.
Please help me out..
Thanks,
kadekade
Solved! Go to Solution.
2026-04-06 2:35 AM
Hello @kadekade
Further to your comment, I tested again with the Ioc.File provided through the attachment and the build was finished without any errors.
I will be waiting for your feedback.
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.
2026-04-02 3:15 AM - edited 2026-04-02 7:07 AM
Hello @kadekade
Let me thank you for your posting.
I created a project with STM32CubeMX 6.17 [STM32H573VIT6], and the issue was not reproduced by my side.
The compilation completed without any errors.
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.
2026-04-02 1:07 PM
Hi,
>but I can't FATFS
Right, here no fatfs , you have to use filex , as you selected in Cube.
mount drive ->
/* Open the SD disk driver */
sd_status = fx_media_open(&sdio_disk, FX_SD_VOLUME_NAME, fx_stm32_sd_driver, (VOID *)FX_NULL, (VOID *) fx_sd_media_memory, sizeof(fx_sd_media_memory));
2026-04-05 5:20 PM - edited 2026-04-05 5:55 PM
2026-04-05 5:22 PM
Thank, I'm trying it again.
kade
2026-04-06 2:35 AM
Hello @kadekade
Further to your comment, I tested again with the Ioc.File provided through the attachment and the build was finished without any errors.
I will be waiting for your feedback.
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.
2026-04-06 10:00 AM
Thank you so much.
Yes...Right
I figured out what my mistake was.
To do microSD, I tried to merge OLD FATFS source codes. so I want to see FATFS in CUBEMX.
But FATFS is replaced by FILEX.
Finally, I made new codes with FILEX below, ( I need your help once more..)
(example codes from somewhere on web.)
MX_GPIO_Init();
MX_SDMMC1_SD_Init();
MX_FileX_Init();
Unfortunately, I could't write [test.txt] in microSD and went to HARD FAULTS.
I would appreciate your help once more...
Thanks,
BR
kade
2026-04-07 3:58 PM
I found out why it doesn't work.
I should setting memory bigger than sector sizes(ex:4096).
So. Not unsigned char media_memory[256]
is "unsigned char media_memory[4096 or more]"
Thanks,
BR
kade
2026-04-07 10:25 PM