boot: zephyr: Fix CONFIG_LOG_IMMEDIATE
CONFIG_LOG_IMMEDIATE was renamed to CONFIG_LOG_MODE_IMMEDIATE.
Change aligns MCUboot code to support new naming convention.
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c
index cee7505..0a0c874 100644
--- a/boot/zephyr/main.c
+++ b/boot/zephyr/main.c
@@ -59,7 +59,14 @@
#define ZEPHYR_LOG_MODE_MINIMAL 1
#endif
-#if defined(CONFIG_LOG) && !defined(CONFIG_LOG_IMMEDIATE) && \
+/* CONFIG_LOG_IMMEDIATE is the legacy Kconfig property,
+ * replaced by CONFIG_LOG_MODE_IMMEDIATE.
+ */
+#if (defined(CONFIG_LOG_MODE_IMMEDIATE) || defined(CONFIG_LOG_IMMEDIATE))
+#define ZEPHYR_LOG_MODE_IMMEDIATE 1
+#endif
+
+#if defined(CONFIG_LOG) && !defined(ZEPHYR_LOG_MODE_IMMEDIATE) && \
!defined(ZEPHYR_LOG_MODE_MINIMAL)
#ifdef CONFIG_LOG_PROCESS_THREAD
#warning "The log internal thread for log processing can't transfer the log"\
@@ -83,7 +90,9 @@
/* synchronous log mode doesn't need to be initalized by the application */
#define ZEPHYR_BOOT_LOG_START() do { } while (false)
#define ZEPHYR_BOOT_LOG_STOP() do { } while (false)
-#endif /* defined(CONFIG_LOG) && !defined(CONFIG_LOG_IMMEDIATE) */
+#endif /* defined(CONFIG_LOG) && !defined(ZEPHYR_LOG_MODE_IMMEDIATE) && \
+ * !defined(ZEPHYR_LOG_MODE_MINIMAL)
+ */
#ifdef CONFIG_SOC_FAMILY_NRF
#include <helpers/nrfx_reset_reason.h>
@@ -303,7 +312,7 @@
}
#endif
-#if defined(CONFIG_LOG) && !defined(CONFIG_LOG_IMMEDIATE) &&\
+#if defined(CONFIG_LOG) && !defined(ZEPHYR_LOG_MODE_IMMEDIATE) && \
!defined(CONFIG_LOG_PROCESS_THREAD) && !defined(ZEPHYR_LOG_MODE_MINIMAL)
/* The log internal thread for log processing can't transfer log well as has too
* low priority.
@@ -356,8 +365,9 @@
*/
(void)k_sem_take(&boot_log_sem, K_FOREVER);
}
-#endif/* defined(CONFIG_LOG) && !defined(CONFIG_LOG_IMMEDIATE) &&\
- !defined(CONFIG_LOG_PROCESS_THREAD) */
+#endif /* defined(CONFIG_LOG) && !defined(ZEPHYR_LOG_MODE_IMMEDIATE) && \
+ * !defined(CONFIG_LOG_PROCESS_THREAD) && !defined(ZEPHYR_LOG_MODE_MINIMAL)
+ */
#if defined(CONFIG_MCUBOOT_SERIAL) || defined(CONFIG_BOOT_USB_DFU_GPIO)
static bool detect_pin(const char* port, int pin, uint32_t expected, int delay)