mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-14 04:18:56 +00:00
more esp32 cmake clean up
This commit is contained in:
parent
641613c428
commit
cf7aad790c
@ -1,12 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# -DFAMILY=espressif
|
||||
if(FAMILY STREQUAL "espressif")
|
||||
# TOP is absolute path to root directory of TinyUSB git repo
|
||||
set(TOP "../../..")
|
||||
get_filename_component(TOP "${TOP}" REALPATH)
|
||||
endif()
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
|
||||
|
||||
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
|
||||
|
@ -1,7 +1,3 @@
|
||||
idf_component_register(SRCS "main.c"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES freertos soc tinyusb_src)
|
||||
|
||||
target_include_directories(${COMPONENT_TARGET} PUBLIC
|
||||
"${TOP}/hw"
|
||||
)
|
||||
REQUIRES boards tinyusb_src)
|
||||
|
@ -1,10 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# TOP is absolute path to root directory of TinyUSB git repo
|
||||
# needed for esp32sx build. TODO could be removed later on
|
||||
set(TOP "../../..")
|
||||
get_filename_component(TOP "${TOP}" REALPATH)
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
|
||||
|
||||
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
|
||||
|
@ -1,7 +1,3 @@
|
||||
idf_component_register(SRCS "main.c" "usb_descriptors.c" "msc_disk.c"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES freertos soc tinyusb_src)
|
||||
|
||||
target_include_directories(${COMPONENT_TARGET} PUBLIC
|
||||
"${TOP}/hw"
|
||||
)
|
||||
REQUIRES boards tinyusb_src)
|
||||
|
@ -1,10 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# TOP is absolute path to root directory of TinyUSB git repo
|
||||
# needed for esp32sx build. TODO could be removed later on
|
||||
set(TOP "../../..")
|
||||
get_filename_component(TOP "${TOP}" REALPATH)
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/family_support.cmake)
|
||||
|
||||
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
|
||||
|
@ -1,7 +1,3 @@
|
||||
idf_component_register(SRCS "main.c" "usb_descriptors.c"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES freertos soc tinyusb_src)
|
||||
|
||||
target_include_directories(${COMPONENT_TARGET} PUBLIC
|
||||
"${TOP}/hw"
|
||||
)
|
||||
REQUIRES boards tinyusb_src)
|
||||
|
@ -1,8 +1,6 @@
|
||||
set(hw_dir "${CMAKE_CURRENT_LIST_DIR}/../../../")
|
||||
|
||||
idf_component_register(SRCS family.c
|
||||
INCLUDE_DIRS "." "${BOARD}"
|
||||
INCLUDE_DIRS "." ${BOARD} ${hw_dir}
|
||||
PRIV_REQUIRES "driver"
|
||||
REQUIRES led_strip src tinyusb_src)
|
||||
|
||||
target_include_directories(${COMPONENT_TARGET} PUBLIC
|
||||
"${TOP}/hw"
|
||||
)
|
||||
|
@ -2,9 +2,8 @@ idf_build_get_property(target IDF_TARGET)
|
||||
|
||||
set(srcs)
|
||||
set(includes_public)
|
||||
set(includes_private)
|
||||
set(compile_options)
|
||||
set(tusb_src "${TOP}/src")
|
||||
set(tusb_src "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../src")
|
||||
|
||||
if(target STREQUAL "esp32s3")
|
||||
set(tusb_mcu "OPT_MCU_ESP32S3")
|
||||
@ -25,10 +24,6 @@ list(APPEND compile_options
|
||||
|
||||
idf_component_get_property(freertos_component_dir freertos COMPONENT_DIR)
|
||||
|
||||
list(APPEND includes_private
|
||||
"${tusb_src}"
|
||||
)
|
||||
|
||||
list(APPEND includes_public
|
||||
"${tusb_src}"
|
||||
# The FreeRTOS API include convention in tinyusb is different from esp-idf
|
||||
@ -54,8 +49,7 @@ list(APPEND srcs
|
||||
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${includes_public}
|
||||
PRIV_INCLUDE_DIRS ${includes_private}
|
||||
PRIV_REQUIRES src
|
||||
REQUIRES src
|
||||
)
|
||||
|
||||
target_compile_options(${COMPONENT_LIB} PUBLIC ${compile_options})
|
||||
|
@ -1,6 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# Apply board specific content
|
||||
# Apply board specific content i.e IDF_TARGET must be set before project.cmake is included
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake")
|
||||
|
||||
# Add example src and bsp directories
|
||||
|
Loading…
x
Reference in New Issue
Block a user