File tree Expand file tree Collapse file tree 6 files changed +24
-17
lines changed
samples/subsys/mgmt/mcumgr/smp_svr Expand file tree Collapse file tree 6 files changed +24
-17
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,8 @@ Removed APIs in this release
5050* Removed ``CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_ACM `` and
5151 ``CONFIG_OPENTHREAD_COPROCESSOR_SPINEL_ON_UART_DEV_NAME `` Kconfig options
5252 in favor of chosen node ``zephyr,ot-uart ``.
53+ * Removed ``CONFIG_UART_MCUMGR_ON_DEV_NAME `` Kconfig option
54+ in favor of direct use of chosen node ``zephyr,uart-mcumgr ``.
5355
5456============================
5557
Original file line number Diff line number Diff line change @@ -246,17 +246,6 @@ config UART_MCUMGR
246246
247247if UART_MCUMGR
248248
249- # Workaround for not being able to have commas in macro arguments
250- DT_CHOSEN_Z_UART_MCUMGR := zephyr,uart-mcumgr
251-
252- config UART_MCUMGR_ON_DEV_NAME
253- string "Device Name of UART Device for mcumgr UART"
254- default "$(dt_chosen_label,$(DT_CHOSEN_Z_UART_MCUMGR))" if HAS_DTS
255- default "UART_0"
256- help
257- This option specifies the name of UART device to be used
258- for mcumgr UART.
259-
260249config UART_MCUMGR_RX_BUF_SIZE
261250 int "Size of receive buffer for mcumgr fragments received over UART, in bytes"
262251 default 128
Original file line number Diff line number Diff line change @@ -246,9 +246,9 @@ void uart_mcumgr_register(uart_mcumgr_recv_fn *cb)
246246{
247247 uart_mgumgr_recv_cb = cb ;
248248
249- uart_mcumgr_dev = device_get_binding ( CONFIG_UART_MCUMGR_ON_DEV_NAME );
249+ uart_mcumgr_dev = DEVICE_DT_GET ( DT_CHOSEN ( zephyr_uart_mcumgr ) );
250250
251- if (uart_mcumgr_dev != NULL ) {
251+ if (device_is_ready ( uart_mcumgr_dev ) ) {
252252 uart_mcumgr_setup (uart_mcumgr_dev );
253253 }
254254}
Original file line number Diff line number Diff line change 11# Enable USB subsystem
22CONFIG_USB_DEVICE_STACK=y
3- CONFIG_USB_CDC_ACM=y
4- CONFIG_UART_INTERRUPT_DRIVEN=y
3+ CONFIG_SERIAL=y
54CONFIG_UART_LINE_CTRL=y
65# USB backend is serial device
76CONFIG_MCUMGR_SMP_UART=y
8- # Choose USB serial device for backend (CDC_ACM)
9- CONFIG_UART_MCUMGR_ON_DEV_NAME="CDC_ACM_0"
Original file line number Diff line number Diff line change 1818 platform_allow : frdm_k64f
1919 sample.mcumg.smp_svr.cdc :
2020 extra_args : OVERLAY_CONFIG="overlay-cdc.conf"
21+ DTC_OVERLAY_FILE="usb.overlay"
2122 platform_allow : nrf52833dk_nrf52820 nrf52833dk_nrf52833 nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp
2223 sample.mcumg.smp_svr.serial :
2324 extra_args : OVERLAY_CONFIG="overlay-serial.conf"
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2021 Nordic Semiconductor ASA
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ / {
8+ chosen {
9+ zephyr,uart-mcumgr = &cdc_acm_uart0;
10+ };
11+ };
12+
13+ &zephyr_udc0 {
14+ cdc_acm_uart0: cdc_acm_uart0 {
15+ compatible = "zephyr,cdc-acm-uart";
16+ label = "CDC_ACM_0";
17+ };
18+ };
You can’t perform that action at this time.
0 commit comments