Store text file in stm32 flash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-08 12:40 AM
How can we store a text file into stm32f103 flash memory and read its contents??
- Labels:
-
Flash
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-08 1: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-08 2: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??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-08 3: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";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-08 3:37 AM
Please see answers in this thread:
-- pa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-08 5: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.​
Up vote any posts that you find helpful, it shows what's working..
