c - Hash-based logger for embedded application -


currently sending uart strings want log , reading on host terminal.

in order reduce logging time , image size (my flash tiny), figured out strings unused in embedded system, why storing them on flash?

i want implement server, whom can send hashed-key of string (for example - it's rom address) , string output file or screen.

my questions are:

  1. how create key2string converter out of image file (the os cmx, can answered generally)
  2. is there recomended way generate image, know strings addresses exclude them rom?
  3. is there known generic (open-source or other) implemented similar logger?

thanks

rather holding hard-coded strings, trying hash answers , sent via uart, somehow remove strings resulting image, suggest following.

just send index error code. pc side can index , determine string condition. if want device code more clear, index can enumeration.

for example:

enum errorstrings {    es_valueoutoflimits = 1,    es_wowitsgettingwarm = 2,    es_randomerror = 3,    es_passwordfailure = 4 }; 

so, if sending data uart via printf, following:

printf("%d\n",(int)es_wowitsgettingwarm); 

then pc software needs decode "2" comes across uart useful string of "wow it's getting warm."

this keeps firmware small, need manually keep file containing enum , file strings in sync.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -