I have a problem with an embedded system and one library.
I am currently working with a device called Ambiq [3] which use a Cortex M-4 and I want to use the FANN (Fast artificial neural network) library [2] on it. I am able to compile and link everything, but the problem is that the FANN library requires 2 files to read when starting.
Now, I have an embedded system, so I don't have any file system and neither a operating system. I'm quite sure that I can, in some way, write the content of that file inside the flash memory but I don't really know how can I link the first file address to the C file functions such as the "fopen" which require a file name as input. I only need some connection between the file name and the physical address of the file and I am done if it exits (or a C function that accept something different from a file name).
One thing that I already tried is to hard-code the content of the file into a C-array using xxd -i [filename] [1] but I don't know how should I link the fopen that the FANN library use. I've also started some cleaver parser but it seems to be really time consuming.
Please let me know if you can suggest me something. Thank you in advance. Best regards. Jaskirat
Additional information: - Software used for compiling: Eclipse with makefile. - Compiler: eabi-none-gcc toolbox - I am compiling directly the FANN library source code with the Ambiq microcontroller application that should run on the Cortex M4.
References: [1] Read a file into a string at compile-time [2] FANN LIBRARY UFFICIAL SITE http://leenissen.dk/fann/wp/ [3] AMBIQ MICRO: http://ambiqmicro.com/