Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 8 months ago.
STM32_DISCO-F746NG; Using SD card to create filesystem and have it available through USB to PC
Hello,
I am trying to combine these two libraries
http://os.mbed.com/users/DieterGraef/code/DISCO-F746NG_SDFileSystem/
http://os.mbed.com/users/DieterGraef/code/DISCO-F746NG_USB_Host/
to enable the SD card filesystem and make it available through USB to PC.
Both of them compile just fine stand-alone but when put together the compile produces this error:
Error: Return type is not identical to nor covariant with return type "std::uint32_t" of overridden virtual function "FATFileSystem::disk_sectors" in "DISCO-F746NG_USB_Host/USBHost_DISCO-F746NG/USBHostMSD/USBHostMSD.h", Line: 65, Col: 23
I have tracked this down to differences with the FATFileSystem.h virtual definitions
In DISCO-F746NG_USB_Host the function is defined as
virtual uint64_t disk_sectors() = 0;
and in DISCO-F746NG_SDFileSystem
virtual uint32_t disk_sectors() = 0;
How should I re-concile between the libraries to make them co-exist? In my app, I would write to SD card using DISCO-F746NG_SDFileSystem and make the files available for reading through USB using DISCO-F746NG_USB_Host.
Is this possible to achieve?
Thanks,
Tapiov
1 Answer
6 years, 8 months ago.
Have you succeeded in the meantime? I'm am very interested.
No, sorry no progress. I dropped this plan and moved to implement the file system on SDRAM. This works better for me.
However, I am not having much more luck there. I have also moved out of MBED (because lack of degrees of freedom) to STM32CubeMX.
posted by 11 Mar 2018Have a look at https://os.mbed.com/users/roykrikke/code/BD_SD_DISCO_F746NG maybe this will help with your project.
posted by 24 Mar 2018
If you patch the header files to both return uint64_t what happens? Or if the FATFileSystem library is loaded twice, remove one.
posted by Jan Jongboom 26 Feb 2018Thanks Jan. I tried to separate the functions by writing disk_sectors32 & 64 but couldn't make it work. I will try your suggestions asap an report back.
posted by Tapio Valli 27 Feb 2018