2019-07-08 12:40 AM
How can we store a text file into stm32f103 flash memory and read its contents??
2019-07-08 01:03 AM
Define "read its contents".
You can embed the text as constant string/data into the source code.
You can implement a file system (like FatFS) to access a portion of the internal flash.
2019-07-08 02:48 AM
sorry but I dint get what you said. How to embed the text as constant string/data into source code???
Also I don't want to implement FatFs . Is there any other way??
2019-07-08 03:37 AM
> How to embed the text as constant string/data into source code???
static const char *some_text = \
"Hello world\r\n" \
"Line 2\r\n" \
"Line 3\r\n";
2019-07-08 03:37 AM
Please see answers in this thread:
-- pa
2019-07-08 05:33 AM
One could also use a simple tool to convert a file into a .H file you could include into your project.
A more complex tools could perhaps that the file and create an object file the linker to pull in.