Commit d5c963c5 authored by Jamie McCrae's avatar Jamie McCrae Committed by Jamie
Browse files

boot: zephyr: serial_adapter: Add error if main thread not preemptible

Adds a build failure if the main thread priority is not preemptible
and USB CDC ACM serial recovery is used, this is because if this is
the case, USB events will never be able to be processed and serial
recovery cannot ever enumerate

Signed-off-by: default avatarJamie McCrae <jamie.mccrae@nordicsemi.no>
parent 822b6cb7
Loading
Loading
Loading
Loading
+5 −0
Changes for boot/zephyr/serial_adapter.c: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -35,6 +35,11 @@
       has not been redirected to other UART with DTS chosen zephyr,uart-mcumgr.
#endif

#if defined(CONFIG_BOOT_SERIAL_CDC_ACM) && CONFIG_MAIN_THREAD_PRIORITY < 0
#error CONFIG_MAIN_THREAD_PRIORITY must be preemptible to support USB CDC ACM \
       (0 or above)
#endif

BOOT_LOG_MODULE_REGISTER(serial_adapter);

/** @brief Console input representation