CONFIG_USB_CDC_ACM was assigned the value y, but got the value n. Missing dependencies: DT_HAS_ZEPHYR_CDC_ACM_UART_ENABLED

Hello,

As the subject says, I am working on a project that when I try to enable the CONFIG_USB_CDC_ACM in my prj.conf I see this error post-build. It seems to not matter what I change in the .conf file, nor the devicetree. I also checked the post-build zephyr.dts file that is created, however that also contains the cdc_acm_uart0 node you'd expect to see. It almost seems that this may be an error, but I can't tell. Any help would be greatly appreciated, or if I can provide any files to help. I am currently using NRF Connect SDK v2.5.0.

Thanks.

  • Hello,

    This symbol can only be enabled via the devicetree. When you checked the generated zephyr.dts, did the CDC node have its compatible property set to "zephyr,cdc-acm-uart", and had the parent USB controller node the status set to "okay" ?

    For example, this is what I get when building a for the nrf52840dongle which has usb cdc enabled by default:

    		usbd: zephyr_udc0: usbd@40027000 {
    			compatible = "nordic,nrf-usbd";
    			reg = < 0x40027000 0x1000 >;
    			interrupts = < 0x27 0x1 >;
    			num-bidir-endpoints = < 0x1 >;
    			num-in-endpoints = < 0x7 >;
    			num-out-endpoints = < 0x7 >;
    			num-isoin-endpoints = < 0x1 >;
    			num-isoout-endpoints = < 0x1 >;
    			status = "okay";
    			cdc_acm_uart: cdc_acm_uart {
    				compatible = "zephyr,cdc-acm-uart";
    			};
    		};

    Best regards,

    Vidar

  • Hey Vidar,

    Thanks for responding. I have attached a code snippet of the zephyr.dts in my build folder. It seems to almost exactly match yours.

    usbd: zephyr_udc0: usbd@36000 {
    	compatible = "nordic,nrf-usbd";
    	reg = < 0x36000 0x1000 >;
    	interrupts = < 0x36 0x1 >;
    	num-bidir-endpoints = < 0x1 >;
    	num-in-endpoints = < 0x7 >;
    	num-out-endpoints = < 0x7 >;
    	num-isoin-endpoints = < 0x1 >;
    	num-isoout-endpoints = < 0x1 >;
    	status = "okay";
    	cdc_acm_uart0: cdc_acm_uart0 {
    		compatible = "zephyr,cdc-acm-uart";
    	};
    };

  • Thanks fort sharing this. Unfortunately, I'm not able to spot any errors in your *.dts snippet either. Is your project a multi image build? I'm wondering if there is a chance the error is reported for a child image such as MCUBoot or similar.

    Does your generated config include the "CONFIG_DT_HAS_NORDIC_NRF_USBD_ENABLED=y" line as here:

    ?

    Thanks,

Related