Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hakehuang opened this issue May 14, 2020 · 21 comments · Fixed by #35465
Closed

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

hakehuang opened this issue May 14, 2020 · 21 comments · Fixed by #35465
Assignees
Labels
area: Samples Samples area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug
Milestone

Comments

@hakehuang
Copy link
Collaborator

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
@hakehuang hakehuang added the bug The issue is a bug, or the PR is fixing a bug label May 14, 2020
@hakehuang hakehuang changed the title samples: samples:mimxrt1010_evk:samples/subsys/usb/audio: build error no usbd found May 14, 2020
@hakehuang hakehuang added area: Samples Samples area: USB Universal Serial Bus platform: NXP NXP labels May 14, 2020
@hakehuang
Copy link
Collaborator Author

@MaureenHelm

@jfischer-no
Copy link
Collaborator

@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";
 };

@erwango
Copy link
Member

erwango commented May 19, 2020

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

This is in line with what I proposed here:
#24745 (comment)
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?

@jfischer-no
Copy link
Collaborator

What is wrong with just usbd ?

@carlescufi carlescufi added this to the v2.3.0 milestone May 20, 2020
@galak
Copy link
Collaborator

galak commented May 20, 2020

What is wrong with just usbd ?

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

@galak
Copy link
Collaborator

galak commented May 20, 2020

PR #25495 to address a precursor aspect of this issue (ie, sanitycheck doesn't build anything for these samples).

@carlescufi carlescufi modified the milestones: v2.3.0, v2.4.0 Jun 5, 2020
@github-actions
Copy link

github-actions bot commented Aug 5, 2020

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.

@github-actions github-actions bot added the Stale label Aug 5, 2020
@eobalski
Copy link
Collaborator

eobalski commented Aug 6, 2020

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

@github-actions github-actions bot removed the Stale label Aug 7, 2020
@dleach02
Copy link
Member

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

@galak
Copy link
Collaborator

galak commented Aug 12, 2020

@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.

@dleach02
Copy link
Member

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

@galak
Copy link
Collaborator

galak commented Aug 13, 2020

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

@jfischer-no
Copy link
Collaborator

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

Sounds good.

@carlescufi carlescufi added the dev-review To be discussed in dev-review meeting label Sep 9, 2020
@galak
Copy link
Collaborator

galak commented Sep 10, 2020

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

@galak galak removed the dev-review To be discussed in dev-review meeting label Sep 10, 2020
@galak
Copy link
Collaborator

galak commented Sep 10, 2020

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.

@erwango
Copy link
Member

erwango commented Sep 10, 2020

If we're going wit this solution (which I find elegant), should we add some way to filter on this for sanitycheck?
#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")

@jfischer-no
Copy link
Collaborator

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

@github-actions
Copy link

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.

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Jan 18, 2021
@MaureenHelm MaureenHelm removed the Stale label Jan 26, 2021
@carlescufi carlescufi modified the milestones: v2.4.0, v2.6.0 Feb 3, 2021
@carlescufi
Copy link
Member

@jfischer-no there seems to be an agreement on how to fix this, could you send a PR?

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Apr 11, 2021
@jfischer-no jfischer-no removed the Stale label Apr 11, 2021
jfischer-no added a commit to jfischer-no/zephyr that referenced this issue May 20, 2021
USB audio class samples are generic and can be built for any
board that supports USB device and isochronous endpoints.
Add app.overlay that uses aliases and remove board specific overlays.

Note: USB audio is still experimental and even though the sample can
be built for specific platform, it does not mean that it can be run
on it without issues.

Fixes: zephyrproject-rtos#25313

Signed-off-by: Johann Fischer <[email protected]>
nashif pushed a commit that referenced this issue May 21, 2021
USB audio class samples are generic and can be built for any
board that supports USB device and isochronous endpoints.
Add app.overlay that uses aliases and remove board specific overlays.

Note: USB audio is still experimental and even though the sample can
be built for specific platform, it does not mean that it can be run
on it without issues.

Fixes: #25313

Signed-off-by: Johann Fischer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Samples Samples area: USB Universal Serial Bus bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants