Merge branch 'master' into refactor-irqhandler
This commit is contained in:
15
examples/device/board_test/CMakeLists.txt
Normal file
15
examples/device/board_test/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
# The following five lines of boilerplate have to be in your project's
|
||||
# CMakeLists in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
# TOP is absolute path to root directory of TinyUSB git repo
|
||||
set(TOP "../../..")
|
||||
get_filename_component(TOP "${TOP}" REALPATH)
|
||||
|
||||
# Add example src and bsp directories
|
||||
set(EXTRA_COMPONENT_DIRS "src" "${TOP}/hw/bsp/esp32s2_saola_1")
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
set(SUPPORTED_TARGETS esp32s2)
|
||||
|
||||
project(board_test)
|
4
examples/device/board_test/sdkconfig.defaults
Normal file
4
examples/device/board_test/sdkconfig.defaults
Normal file
@@ -0,0 +1,4 @@
|
||||
CONFIG_IDF_CMAKE=y
|
||||
CONFIG_IDF_TARGET="esp32s2"
|
||||
CONFIG_IDF_TARGET_ESP32S2=y
|
||||
|
15
examples/device/board_test/src/CMakeLists.txt
Normal file
15
examples/device/board_test/src/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
idf_component_register(SRCS "main.c"
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES freertos soc)
|
||||
|
||||
target_compile_options(${COMPONENT_TARGET} PUBLIC
|
||||
"-DCFG_TUSB_MCU=OPT_MCU_ESP32S2"
|
||||
"-DCFG_TUSB_OS=OPT_OS_FREERTOS"
|
||||
)
|
||||
|
||||
idf_component_get_property( FREERTOS_ORIG_INCLUDE_PATH freertos ORIG_INCLUDE_PATH)
|
||||
target_include_directories(${COMPONENT_TARGET} PUBLIC
|
||||
"${FREERTOS_ORIG_INCLUDE_PATH}"
|
||||
"${TOP}/hw"
|
||||
"${TOP}/src"
|
||||
)
|
@@ -73,3 +73,10 @@ int main(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if CFG_TUSB_MCU == OPT_MCU_ESP32S2
|
||||
void app_main(void)
|
||||
{
|
||||
main();
|
||||
}
|
||||
#endif
|
||||
|
@@ -39,8 +39,11 @@
|
||||
#error CFG_TUSB_MCU must be defined
|
||||
#endif
|
||||
|
||||
#ifndef CFG_TUSB_OS
|
||||
#define CFG_TUSB_OS OPT_OS_NONE
|
||||
#endif
|
||||
|
||||
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_NONE
|
||||
#define CFG_TUSB_OS OPT_OS_NONE
|
||||
|
||||
// CFG_TUSB_DEBUG is defined by compiler in DEBUG build
|
||||
// #define CFG_TUSB_DEBUG 0
|
||||
|
Reference in New Issue
Block a user