Nordic Semiconductor ASA
String logging in an embedded system
Last updated:
Abstract:
Methods for logging strings during execution of a program running on an embedded system without storing the strings in the memory of the embedded system include, during the build process, receiving source code for a program that comprises one or more log statements that identifies a string to be logged; generating object code based on the source code that comprises a special log section that includes the identified strings, and, for each log statement one or more instructions that cause a reference to the corresponding string to be stored in memory of the embedded system; generating execution code based on the object code wherein the special log section is marked as non-loadable and each reference is a location of the corresponding string in the special log section; and, loading the generated executable code into the memory of the embedded system such that the identified strings are not loaded into the memory of the embedded system.
Utility
15 Aug 2017
5 Apr 2022