Zephyr: samples:mimxrt1010_evk:samples/subsys/usb/audio: build error no usbd found

Created on 14 May 2020  路  18Comments  路  Source: zephyrproject-rtos/zephyr

Describe the bug
build error report usbd not found, but usbd is supported on this platform

To Reproduce
Steps to reproduce the behavior:

  1. mkdir build; cd build
  2. cmake -DBOARD=mimxrt1010_evk ..
  3. make
  4. See error

Expected behavior
can build and run well

Impact
NA

Screenshots or console output


-- Application: /build/src/workspace/mimxrt1010_evk_usb_master/zephyr/samples/subsys/usb/audio/headset

-- Zephyr version: 2.3.0-rc1 (/build/src/workspace/mimxrt1010_evk_usb_master/zephyr)

-- Found Python3: /usr/bin/python3.6 (found suitable exact version "3.6.10") found components:  Interpreter 

-- git describe failed: fatal: No names found, cannot describe anything.;

   BUILD_VERSION is left undefined

-- Board: mimxrt1010_evk

-- Found toolchain: zephyr (/root/zephyr-sdk)

-- Found west: /root/.local/bin/west (found suitable version "0.7.2", minimum required is "0.7.1")

-- Found dtc: /root/zephyr-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")

-- Found BOARD.dts: /build/src/workspace/mimxrt1010_evk_usb_master/zephyr/boards/arm/mimxrt1010_evk/mimxrt1010_evk.dts

-- Found devicetree overlay: /build/src/workspace/mimxrt1010_evk_usb_master/zephyr/samples/subsys/usb/audio/headset/app.overlay

Error: mimxrt1010_evk.dts.pre.tmp:671.1-6 Label or path usbd not found

FATAL ERROR: Syntax error parsing input tree

CMake Error at /build/src/workspace/mimxrt1010_evk_usb_master/zephyr/cmake/dts.cmake:195 (message):

  command failed with return code: 1

Call Stack (most recent call first):

  /build/src/workspace/mimxrt1010_evk_usb_master/zephyr/cmake/app/boilerplate.cmake:503 (include)

  CMakeLists.txt:4 (include)

-- Configuring incomplete, errors occurred!

make: *** No targets specified and no makefile found.  Stop.

script returned exit code 2

Environment (please complete the following information):

  • Linux
  • Zephyr SDK
  • v2.3.0-RC1
Samples USB bug NXP low

Most helpful comment

@galak Can we use common node label for the first usb device?

diff --git a/boards/arm/mimxrt1010_evk/mimxrt1010_evk.dts b/boards/arm/mimxrt1010_evk/mimxrt1010_evk.dts
index 1f560ec26f..6443883bd7 100644
--- a/boards/arm/mimxrt1010_evk/mimxrt1010_evk.dts
+++ b/boards/arm/mimxrt1010_evk/mimxrt1010_evk.dts
@@ -63,6 +63,6 @@ arduino_serial: &lpuart1 {};
        current-speed = <115200>;
 };

-&usb1 {
+usbd: &usb1 {
        status = "okay";
 };

All 18 comments

@MaureenHelm

@galak Can we use common node label for the first usb device?

diff --git a/boards/arm/mimxrt1010_evk/mimxrt1010_evk.dts b/boards/arm/mimxrt1010_evk/mimxrt1010_evk.dts
index 1f560ec26f..6443883bd7 100644
--- a/boards/arm/mimxrt1010_evk/mimxrt1010_evk.dts
+++ b/boards/arm/mimxrt1010_evk/mimxrt1010_evk.dts
@@ -63,6 +63,6 @@ arduino_serial: &lpuart1 {};
        current-speed = <115200>;
 };

-&usb1 {
+usbd: &usb1 {
        status = "okay";
 };

@galak Can we use common node label for the first usb device?

This is in line with what I proposed here:
https://github.com/zephyrproject-rtos/zephyr/issues/24745#issuecomment-630166439
Though, if we decide there's a generic alternate node label that should be used for zephyr samples and tests, should it be called with something like zephyr_usbd?

What is wrong with just usbd ?

What is wrong with just usbd ?

Since the label is zephyr specific we need to name it as such.

PR https://github.com/zephyrproject-rtos/zephyr/pull/25495 to address a precursor aspect of this issue (ie, sanitycheck doesn't build anything for these samples).

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

Either all dts files change name for usbd or this sample will not work.

@galak, are you suggesting that this sample will need a board specific overlay for the rt1010 similar to nrf overlay?

@galak, are you suggesting that this sample will need a board specific overlay for the rt1010 similar to nrf overlay?

I see 2 ways of handling this:

  1. either add board specific overlays similar to what is already there.
  2. Add a generic overlay using a common dts anchor (zephyr_usbd) that boards can define.

I like the second option... seems cleaner (I think). Where does this generic overlay reside? Do you have an example of something like this?

Look at something like samples/sensor/dps310/app.overlay

2\. Add a generic overlay using a common dts anchor (`zephyr_usbd`) that boards can define.

Sounds good.

We will need to add a section in the docs for these zephyr specific node labels to give the specific intent/usage.

Dev-Review (Sept 10, 2020): No issue w/using a node label for this purpose, just needs a zephyr namespace. (And added to docs) @jfischer-phytec-iot asked about doing something similar for display. Don't see any issue, but asked to work up PR to see specific details.

If we're going wit this solution (which I find elegant), should we add some way to filter on this for sanitycheck?
https://github.com/zephyrproject-rtos/zephyr/pull/25590 was merged recently using alias. I guess it would have to be replaced by a label for coherency. but we'd need a function equivalent to dt_alias_exists, so we can do stuff like:

tests:
  sample.drivers.adc:
    tags: ADC
    depends_on: adc
    filter: dt_alias_exists("zephyr_adc")

Since there are thoughts of supporting more than one device controller, and host support is WiP, would "zephyr_usbd0" node label be acceptable?

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

Was this page helpful?
0 / 5 - 0 ratings