I have an embedded C project I am compiling using eclipse. I need to read a binary file into the application code as an array of constants.
This binary file is ~200kB and needs to be part of the application code so that the application code can read the binary image at anytime and load it into another device on the board that needs this initialization image.
I would normally load the image into a non-volatile memory on the board, then read it and move it, but that is not feasible here, it has to be part of the executable image.
I can do this in the makefile by linking the .bin file to a certain address, or in the C code something like
const char binFileImage [] = { file.bin };
This obviously does not work, but I have not come up with syntax that would work.
FYI, the file.bin really is a binary file.
Any thoughts on how to do this?