diff --git a/CHANGES.md b/CHANGES.md index 10eebee10..23f5bef60 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +### Changes between Memfault SDK 0.32.2 and SDK 0.32.1 - Aug 16, 2022 + +#### :chart_with_upwards_trend: Improvements + +- Zephyr port: added a fix for upcoming Zephyr 3.2 compatibility, thanks + @nordicjm for the fix! + ### Changes between Memfault SDK 0.32.1 and SDK 0.32.0 - Aug 8, 2022 #### :house: Internal diff --git a/VERSION b/VERSION index 9af2c8409..d236a5b72 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -BUILD ID: 490385 -GIT COMMIT: aeb8e3734 +BUILD ID: 494632 +GIT COMMIT: b2b683510 diff --git a/components/include/memfault/version.h b/components/include/memfault/version.h index 198519427..95b32cd15 100644 --- a/components/include/memfault/version.h +++ b/components/include/memfault/version.h @@ -19,7 +19,7 @@ typedef struct { uint8_t patch; } sMfltSdkVersion; -#define MEMFAULT_SDK_VERSION { .major = 0, .minor = 32, .patch = 1 } +#define MEMFAULT_SDK_VERSION { .major = 0, .minor = 32, .patch = 2 } #ifdef __cplusplus } diff --git a/ports/zephyr/common/memfault_logging.c b/ports/zephyr/common/memfault_logging.c index 596a92ceb..2f685afa9 100644 --- a/ports/zephyr/common/memfault_logging.c +++ b/ports/zephyr/common/memfault_logging.c @@ -55,9 +55,16 @@ static void prv_log_panic(struct log_backend const *const backend); // -Wincompatible-pointer-types between versions static void prv_log_init(); + // LOG2 was added in Zephyr 2.6: // https://github.com/zephyrproject-rtos/zephyr/commit/f1bb20f6b43b8b241e45f3f132f0e7bbfc65401b -#if MEMFAULT_ZEPHYR_VERSION_GT(2, 5) +// LOG2 was moved to LOG in Zephyr 3.2 +// https://github.com/zephyrproject-rtos/zephyr/issues/46500 +#if MEMFAULT_ZEPHYR_VERSION_GT(3, 1) +static void prv_log_process(const struct log_backend *const backend, union log_msg_generic *msg) { + log_output_msg_process(&s_log_output_mflt, &msg->log, g_flags); +} +#elif MEMFAULT_ZEPHYR_VERSION_GT(2, 5) // Additional processing for log2 output static void prv_log_process(const struct log_backend *const backend, union log_msg2_generic *msg) { log_output_msg2_process(&s_log_output_mflt, &msg->log, g_flags);