Hi, is it possible to get some static data from an .out-file?
I want to read out the data from a struct, containing some strings and numbers. I know the name of the variable, and if necessary, I can also define the location (but by name is ideal).
I want to use this to store and retrieve version information.
Example:
#include "version_info-auto.h"
#include <stdint.h>
struct version_info_t {
const char magic_header[8];
const uint32_t compile_date;
const uint16_t compile_time;
const uint32_t compiler_version;
const uint16_t program_id;
const char version_tag[9];
const char magic_trailer[7];
};
#pragma DATA_SECTION(version_info, "version_info")
const struct version_info_t version_info = {
.magic_header = "header1",
.compile_date = COMPILE_DATE,
.compile_time = COMPILE_TIME,
.compiler_version = __TI_COMPILER_VERSION__,
.program_id = PROGRAM_ID,
.version_tag = VERSION_TAG,
.magic_trailer = "trail1"
};