Hi,
I am in the process of updating an open-source project from esp_idf v4.4.5 to release v5.1.1 and I would like some advice on the best way to include a component from the component registry as the project uses Tinyusb which is no longer a core component.
The project is a custom cmake project which uses esp-idf.
The latest documentation doesn't include any details on how to do this and the examples don't include a component from the component registry. See:->https://docs.espressif.com/projects/esp ... -projects.
I hope someone can help.
Including tinyusb in a custom cmake project
Re: Including tinyusb in a custom cmake project
Can any of the espressif guys help ?
So given the example cmake shown in the documentation how would add registry components like tiny_usb. As adding them to idf_build_process() doesn't find them and having an idl_components.yml doesn't seem to help. Also with a custom cmake project you would want to control where the components are downloaded.
So given the example cmake shown in the documentation how would add registry components like tiny_usb. As adding them to idf_build_process() doesn't find them and having an idl_components.yml doesn't seem to help. Also with a custom cmake project you would want to control where the components are downloaded.
- cmake_minimum_required(VERSION 3.16)
- project(my_custom_app C)
- # Include CMake file that provides ESP-IDF CMake build system APIs.
- include($ENV{IDF_PATH}/tools/cmake/idf.cmake)
- # Include ESP-IDF components in the build, may be thought as an equivalent of
- # add_subdirectory() but with some additional processing and magic for ESP-IDF build
- # specific build processes.
- idf_build_process(esp32)
- # Create the project executable and plainly link the newlib component to it using
- # its alias, idf::newlib.
- add_executable(${CMAKE_PROJECT_NAME}.elf main.c)
- target_link_libraries(${CMAKE_PROJECT_NAME}.elf idf::newlib)
- # Let the build system know what the project executable is to attach more targets, dependencies, etc.
- idf_build_executable(${CMAKE_PROJECT_NAME}.elf)
Who is online
Users browsing this forum: Bing [Bot] and 260 guests