Skip to content

Can't compile TinyUSB examples #376

@tobias-groeger

Description

@tobias-groeger

When trying to execute cmake for pico-examples I get the following error:

CMake Error at .../pico-sdk/lib/tinyusb/examples/host/msc_file_explorer/CMakeLists.txt:13 (add_executable):
  Cannot find source file:

    /lib/fatfs/source/ff.c

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
  .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc

Upon further investigation I found that the TinyUSB examples are added from the the submodule in the pico-sdk.
In the msc_file_explorer example in $PICO_SDK_PATH/lib/tinyusb/examples/host/msc_file_explorer/CMakeLists.txt
some of the source files are added relative to the ${TOP} cmake variable which isn't set so the files aren't found properly.

I am running gcc version 12.2.0 and cmake version 3.26.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions