2015-12-30 01:23 AM
Hi:
Is there any way to put a binary file (for example, a bitmap file) into a specific address so the project can read it from flash? Is there any example show how to do it?2015-12-30 05:51 AM
There are lots of ways to do such things. Do you have any experience with C and File IO (fopen/fclose/fread/fwrite/fseek etc)?
Using existing tools, probably you'd want to use things like BMPCVT, etc to convert binary data into a C data array which you can then include in your compile. For specific address placement you likely have #pragma or attribute directives either to specify addresses, or sections, to place the data. The secondary route would be via a linker script or scatter file to direct the output of specific sections or object files to memory. Just taking straight binary you can specify addresses with ST-LINK or DFU Manager and manage placement that way. If you have custom requirements you might want to consider processing the data components yourself with a script and packaging application. For file system type constructs, looks at MAKEFSDATA, part of LwIP as I recall. For hex data output SRECORDS