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: Jamie McCrae <jamie.mccrae@nordicsemi.no>
diff --git a/boot/zephyr/serial_adapter.c b/boot/zephyr/serial_adapter.c
index bff34a2..de2e5c5 100644
--- a/boot/zephyr/serial_adapter.c
+++ b/boot/zephyr/serial_adapter.c
@@ -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