Is there a ready solution for embedded c to use external string resource on serial flash? -


i'm working on soc 128k ram, , uart printing have reduce code size drawing memory.

we've got working 128mb spi serial flash on board, , i'd store strings on it. please notice there no file system on flash or in our fw.

instead writing myself, i'd know there useful code or standard or other material can make use of?

including: (anything below helpful)

  1. library generating
  2. resource fetching method implementation.
  3. spi flash read/write.(in fact have wrote it.)

i'm expecting this:

uart_print(c315); 

and there “c315”, item on flash, corresponding "hello world".

we read out print through uart while run time. , final result "hello world" on terminal.

of course, blow mind welcome.:)

create array of pointers strings, , use index array similar resource. array strings can stored in flash memory. may easier use assembler array of pointers , strings, possibly separate build embedded code. you'll need coordinate index names used in .h include file array of pointers strings, similar resource file used windows apps. done bunch of defines or enum:

enum stringindexes{c000, c001, ...}; 

update - i'm wondering if possible use windows resource editor create pointers , strings. make require reverse engineering create utility convert produced resource file binary image array of pointers , strings, automatically generate include file giving names pointers. if anything, resource editor used guide creating custom program generate include file defines or enums index array of pointers strings.