Commit fb47d2e3 authored by Marek Pieta's avatar Marek Pieta Committed by Andrzej Puzdrowski
Browse files

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: default avatarMarek Pieta <Marek.Pieta@nordicsemi.no>
parent b365e234
......@@ -59,7 +59,14 @@ const struct boot_uart_funcs boot_funcs = {
#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 @@ K_SEM_DEFINE(boot_log_sem, 1, 1);
/* 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 @@ static void do_boot(struct boot_rsp *rsp)
}
#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 zephyr_boot_log_stop(void)
*/
(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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment