Skip to content

Commit 822b6cb

Browse files
committed
boot: zephyr: serial_adapter: Fail if USB CDC enabled with console
This prevents MCUboot from successfully building if console and serial recovery (USB CDC) are both enabled and they both point to the same device Signed-off-by: Jamie McCrae <[email protected]>
1 parent 4a1effb commit 822b6cb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

boot/zephyr/serial_adapter.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@
2525
#if defined(CONFIG_BOOT_SERIAL_UART) && defined(CONFIG_UART_CONSOLE) && \
2626
(!DT_HAS_CHOSEN(zephyr_uart_mcumgr) || \
2727
DT_SAME_NODE(DT_CHOSEN(zephyr_uart_mcumgr), DT_CHOSEN(zephyr_console)))
28-
#error Zephyr UART console must been disabled if serial_adapter module is used.
28+
#error Zephyr UART console must be disabled if serial_adapter module is used.
2929
#endif
3030

3131
#if defined(CONFIG_BOOT_SERIAL_CDC_ACM) && \
32-
defined(CONFIG_UART_CONSOLE) && !DT_HAS_CHOSEN(zephyr_uart_mcumgr)
33-
#error Zephyr UART console must been disabled if CDC ACM is enabled and MCUmgr \
32+
defined(CONFIG_UART_CONSOLE) && (!DT_HAS_CHOSEN(zephyr_uart_mcumgr) || \
33+
DT_SAME_NODE(DT_CHOSEN(zephyr_uart_mcumgr), DT_CHOSEN(zephyr_console)))
34+
#error Zephyr UART console must be disabled if CDC ACM is enabled and MCUmgr \
3435
has not been redirected to other UART with DTS chosen zephyr,uart-mcumgr.
3536
#endif
3637

@@ -199,7 +200,6 @@ boot_uart_fifo_getline(char **line)
199200
static int
200201
boot_uart_fifo_init(void)
201202
{
202-
203203
#if defined(CONFIG_BOOT_SERIAL_UART)
204204

205205
#if DT_HAS_CHOSEN(zephyr_uart_mcumgr)

0 commit comments

Comments
 (0)