2021-08-23 05:00 AM
Hi STM Community,
I want to write media files [Images- .png ,.jpg,.bmp), (Video files-.avi,.mp4,.emf) ,(Audio files- .wav,.mp3,.bin)] to External QSPI Memory. I found that, we can write media files to external memory from USB Key and SD Card. But, I don't prefer to use these 2 methods to write the media files to external flash. So, How can I dump the media files to External QSPI Memory?
2021-08-23 05:38 AM
As a FAT File System type image?
How is the target accessing them?
You could perhaps make a PC side virtual disk using WINImage, or use FatFS tool of your own.
2021-08-25 05:11 AM
Hi @Community member,
Yes.
I want to access/read the media files from workspace and write them to QSPI (EXTERNAL QSPI MEMORY (MX25L51245G)).
2021-08-25 07:59 AM
I doubt you're going to be able to integrate this into the IDE directly.
What you can probably do is pre-link build steps that run a script, with a file describing the files/directories you wish to render into an image.
This might be a tool you need to create yourself, or something that creates an uncompressed .ZIP, or FAT Virtual Image.
For large collections, you could perhaps generate the image as an ELF Object File, which the linker can then directly combine into the final bound image.
For smaller ones, perhaps generates .C or .H files with arrays of uint8_t data, and related indexes the compiler can render into an object for the linker.
Perhaps look at LwIP MKFSDATA