mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
change(usb/examples): Trim the USB example builds
Include minimal set of components: main and everything it depends on
This commit is contained in:
parent
8fc8f3f479
commit
b4c387f9f3
@ -4,5 +4,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(tusb_composite)
|
||||
|
@ -1,8 +1,5 @@
|
||||
set(srcs "tusb_composite_main.c")
|
||||
set(requires fatfs wear_levelling)
|
||||
|
||||
idf_component_register(
|
||||
SRCS "${srcs}"
|
||||
SRCS tusb_composite_main.c
|
||||
INCLUDE_DIRS .
|
||||
REQUIRES "${requires}"
|
||||
PRIV_REQUIRES fatfs wear_levelling esp_partition
|
||||
)
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <errno.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
#include "esp_partition.h"
|
||||
#include "esp_check.h"
|
||||
#include "tinyusb.h"
|
||||
#include "tusb_msc_storage.h"
|
||||
|
@ -2,5 +2,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(tusb_console)
|
||||
|
@ -13,7 +13,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/reent.h>
|
||||
#include "esp_log.h"
|
||||
#include "esp_vfs.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "tinyusb.h"
|
||||
|
@ -4,5 +4,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(tusb_hid)
|
||||
|
@ -1,5 +1,5 @@
|
||||
idf_component_register(
|
||||
SRCS "tusb_hid_example_main.c"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES driver
|
||||
PRIV_REQUIRES driver
|
||||
)
|
||||
|
@ -2,5 +2,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(tusb_midi)
|
||||
|
@ -1,3 +1,4 @@
|
||||
idf_component_register(SRCS "tusb_midi_main.c"
|
||||
INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES esp_timer
|
||||
)
|
||||
|
@ -4,5 +4,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(tusb_msc)
|
||||
|
@ -1,12 +1,11 @@
|
||||
set(srcs "tusb_msc_main.c")
|
||||
set(requires fatfs console)
|
||||
set(priv_requires fatfs console)
|
||||
|
||||
if(CONFIG_EXAMPLE_STORAGE_MEDIA_SPIFLASH)
|
||||
list(APPEND requires wear_levelling)
|
||||
list(APPEND priv_requires wear_levelling esp_partition)
|
||||
endif()
|
||||
|
||||
idf_component_register(
|
||||
SRCS "${srcs}"
|
||||
SRCS "tusb_msc_main.c"
|
||||
INCLUDE_DIRS .
|
||||
REQUIRES "${requires}"
|
||||
PRIV_REQUIRES "${priv_requires}"
|
||||
)
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <dirent.h>
|
||||
#include "esp_console.h"
|
||||
#include "esp_check.h"
|
||||
#include "esp_partition.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "tinyusb.h"
|
||||
#include "tusb_msc_storage.h"
|
||||
|
@ -2,5 +2,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(tusb_ncm)
|
||||
|
@ -1,2 +1,4 @@
|
||||
idf_component_register(SRCS "tusb_ncm_main.c"
|
||||
INCLUDE_DIRS "")
|
||||
INCLUDE_DIRS ""
|
||||
PRIV_REQUIRES esp_wifi nvs_flash
|
||||
)
|
||||
|
@ -2,5 +2,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(tusb_serial_device)
|
||||
|
@ -4,5 +4,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(cdc_acm_host)
|
||||
|
@ -1,2 +1,4 @@
|
||||
idf_component_register(SRCS "usb_cdc_example_main.c"
|
||||
INCLUDE_DIRS ".")
|
||||
INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES usb
|
||||
)
|
||||
|
@ -4,5 +4,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(cdc_acm_vcp)
|
||||
|
@ -1,4 +1,5 @@
|
||||
idf_component_register(
|
||||
SRCS "cdc_acm_vcp_example_main.cpp"
|
||||
INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES usb
|
||||
)
|
||||
|
@ -2,6 +2,8 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
get_filename_component(ProjectId ${CMAKE_CURRENT_LIST_DIR} NAME)
|
||||
string(REPLACE " " "_" ProjectId ${ProjectId})
|
||||
|
@ -1,2 +1,4 @@
|
||||
idf_component_register(SRCS "hid_host_example.c"
|
||||
INCLUDE_DIRS ".")
|
||||
INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES usb driver
|
||||
)
|
||||
|
@ -2,5 +2,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(usb-msc)
|
||||
|
@ -1,3 +1,4 @@
|
||||
idf_component_register(SRCS "msc_example_main.c"
|
||||
INCLUDE_DIRS ""
|
||||
REQUIRES usb vfs)
|
||||
PRIV_REQUIRES usb fatfs driver esp_timer
|
||||
)
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <sys/stat.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/event_groups.h"
|
||||
@ -16,11 +17,9 @@
|
||||
#include "msc_host.h"
|
||||
#include "msc_host_vfs.h"
|
||||
#include "ffconf.h"
|
||||
#include "esp_vfs.h"
|
||||
#include "errno.h"
|
||||
#include "hal/usb_hal.h"
|
||||
#include "driver/gpio.h"
|
||||
#include <esp_vfs_fat.h>
|
||||
#include "esp_vfs_fat.h"
|
||||
|
||||
#define USB_DISCONNECT_PIN GPIO_NUM_10
|
||||
|
||||
|
@ -2,5 +2,7 @@
|
||||
# in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(usb_host_lib_example)
|
||||
|
@ -1,2 +1,4 @@
|
||||
idf_component_register(SRCS "usb_host_lib_main.c" "class_driver.c"
|
||||
INCLUDE_DIRS ".")
|
||||
INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES usb
|
||||
)
|
||||
|
@ -2,5 +2,7 @@
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# "Trim" the build. Include the minimal set of components, main, and anything it depends on.
|
||||
set(COMPONENTS main)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(usb-uvc)
|
||||
|
@ -1,3 +1,3 @@
|
||||
idf_component_register(SRCS "main.c" "tcp_server.c"
|
||||
INCLUDE_DIRS ""
|
||||
REQUIRES protocol_examples_common nvs_flash usb mdns esp_ringbuf esp_timer esp_wifi driver)
|
||||
PRIV_REQUIRES protocol_examples_common nvs_flash usb mdns esp_ringbuf esp_timer esp_wifi driver)
|
||||
|
Loading…
x
Reference in New Issue
Block a user