Open amcgee opened 9 years ago
The text could alternatively be stored in Flash, which would allow mappings and log entries to persist across firmware versions, but this requires runtime initialization and de-duplication of the values when MoMo starts up.
Here are some possible extensions to the awesome typed log message feature @timburke wrote:
#define kLogMessage <hexval>
the build process could generatestatic const char* log_LogMessage = "The actual log message"
(possibly in a primitive structure which allows it to be looked up by hexval). This would remove the requirement on having the relevant map file when parsing the log, since the device itself could provide the messages.LOG_DEBUG( "This is a test" )
could be replaced withLOG_DEBUG( kLog1234 )
before compilation, and then kLog1234 could be associated with the message and relevant hash and the log map file could be auto-generated. This would probably also need to be extended to declare the typed parameters as well.