File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,16 @@ if(CONFIG_BOOTLOADER_MCUBOOT)
203203 )
204204 endif ()
205205
206+ # For devices with USB then a USB CDC node in mcuboot is required.
207+ # As USB CDC is generally needed for this mcuboot use-case it should be
208+ # considered if this solution could be better generalized.
209+ if (CONFIG_MCUBOOT_USB_SUPPORT)
210+ add_overlay_dts(
211+ mcuboot
212+ ${ZEPHYR_NRF_MODULE_DIR} /modules/mcuboot/usb.overlay
213+ )
214+ endif ()
215+
206216 add_child_image(
207217 NAME mcuboot
208218 SOURCE_DIR ${ZEPHYR_MCUBOOT_MODULE_DIR} /boot/zephyr
Original file line number Diff line number Diff line change @@ -34,4 +34,8 @@ config DT_FLASH_WRITE_BLOCK_SIZE
3434 int
3535 default $(dt_node_int_prop_int,$(DT_CHOSEN_ZEPHYR_FLASH),write-block-size)
3636
37+ config MCUBOOT_USB_SUPPORT
38+ bool
39+ default y if "$(dt_nodelabel_enabled,zephyr_udc0)"
40+
3741endmenu
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2021 Nordic Semiconductor ASA
3+ *
4+ * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+ */
6+
7+ &zephyr_udc0 {
8+ cdc_acm_uart0: cdc_acm_uart0 {
9+ compatible = "zephyr,cdc-acm-uart";
10+ label = "CDC_ACM_0";
11+ };
12+ };
You can’t perform that action at this time.
0 commit comments