-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #865 from kilograham/pico-0.10.0
Pico 0.10.0
- Loading branch information
Showing
38 changed files
with
827 additions
and
946 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../hw/bsp/${FAMILY}/family.cmake) | ||
|
||
project(tinyusb_device_examples) | ||
family_initialize_project(tinyusb_device_examples ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
# family_add_subdirectory will filter what to actually add based on selected FAMILY | ||
family_add_subdirectory(audio_4_channel_mic) | ||
family_add_subdirectory(audio_test) | ||
family_add_subdirectory(board_test) | ||
family_add_subdirectory(cdc_dual_ports) | ||
family_add_subdirectory(cdc_msc) | ||
family_add_subdirectory(cdc_msc_freertos) | ||
family_add_subdirectory(dfu) | ||
family_add_subdirectory(dfu_runtime) | ||
family_add_subdirectory(dynamic_configuration) | ||
family_add_subdirectory(hid_composite) | ||
family_add_subdirectory(hid_composite_freertos) | ||
family_add_subdirectory(hid_generic_inout) | ||
family_add_subdirectory(hid_multiple_interface) | ||
family_add_subdirectory(midi_test) | ||
family_add_subdirectory(msc_dual_lun) | ||
family_add_subdirectory(net_lwip_webserver) | ||
family_add_subdirectory(uac2_headset) | ||
family_add_subdirectory(usbtmc) | ||
family_add_subdirectory(webusb_serial) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,28 @@ | ||
# use BOARD-Directory name for project id | ||
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
set(PROJECT ${BOARD}-${PROJECT}) | ||
|
||
# TOP is absolute path to root directory of TinyUSB git repo | ||
set(TOP "../../..") | ||
get_filename_component(TOP "${TOP}" REALPATH) | ||
|
||
# Check for -DFAMILY= | ||
if(FAMILY STREQUAL "rp2040") | ||
cmake_minimum_required(VERSION 3.12) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/pico_sdk_import.cmake) | ||
project(${PROJECT}) | ||
add_executable(${PROJECT}) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake) | ||
|
||
# Example source | ||
target_sources(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c | ||
) | ||
|
||
# Example include | ||
target_include_directories(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
# Example defines | ||
target_compile_definitions(${PROJECT} PUBLIC | ||
CFG_TUSB_OS=OPT_OS_PICO | ||
) | ||
|
||
else() | ||
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}") | ||
endif() | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/${FAMILY}/family.cmake) | ||
|
||
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>) | ||
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
project(${PROJECT}) | ||
|
||
# Checks this example is valid for the family and initializes the project | ||
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
add_executable(${PROJECT}) | ||
|
||
# Example source | ||
target_sources(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c | ||
) | ||
|
||
# Example include | ||
target_include_directories(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
# Configure compilation flags and libraries for the example... see the corresponding function | ||
# in hw/bsp/FAMILY/family.cmake for details. | ||
family_configure_device_example(${PROJECT}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,28 @@ | ||
# use BOARD-Directory name for project id | ||
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
set(PROJECT ${BOARD}-${PROJECT}) | ||
|
||
# TOP is absolute path to root directory of TinyUSB git repo | ||
set(TOP "../../..") | ||
get_filename_component(TOP "${TOP}" REALPATH) | ||
|
||
# Check for -DFAMILY= | ||
if(FAMILY STREQUAL "rp2040") | ||
cmake_minimum_required(VERSION 3.12) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/pico_sdk_import.cmake) | ||
project(${PROJECT}) | ||
add_executable(${PROJECT}) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake) | ||
|
||
# Example source | ||
target_sources(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c | ||
) | ||
|
||
# Example include | ||
target_include_directories(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
# Example defines | ||
target_compile_definitions(${PROJECT} PUBLIC | ||
CFG_TUSB_OS=OPT_OS_PICO | ||
) | ||
|
||
else() | ||
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}") | ||
endif() | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/${FAMILY}/family.cmake) | ||
|
||
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>) | ||
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
project(${PROJECT}) | ||
|
||
# Checks this example is valid for the family and initializes the project | ||
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
add_executable(${PROJECT}) | ||
|
||
# Example source | ||
target_sources(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c | ||
) | ||
|
||
# Example include | ||
target_include_directories(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
# Configure compilation flags and libraries for the example... see the corresponding function | ||
# in hw/bsp/FAMILY/family.cmake for details. | ||
family_configure_device_example(${PROJECT}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,43 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
# use BOARD-Directory name for project id | ||
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
set(PROJECT ${BOARD}-${PROJECT}) | ||
|
||
# TOP is absolute path to root directory of TinyUSB git repo | ||
set(TOP "../../..") | ||
get_filename_component(TOP "${TOP}" REALPATH) | ||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/${FAMILY}/family.cmake) | ||
|
||
# Check for -DFAMILY= | ||
if(FAMILY MATCHES "^esp32s[2-3]") | ||
cmake_minimum_required(VERSION 3.5) | ||
# use BOARD-Directory name for project id | ||
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
set(PROJECT ${BOARD}-${PROJECT}) | ||
|
||
# TOP is absolute path to root directory of TinyUSB git repo | ||
set(TOP "../../..") | ||
get_filename_component(TOP "${TOP}" REALPATH) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake) | ||
project(${PROJECT}) | ||
|
||
elseif(FAMILY STREQUAL "rp2040") | ||
cmake_minimum_required(VERSION 3.12) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/pico_sdk_import.cmake) | ||
else() | ||
|
||
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>) | ||
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
project(${PROJECT}) | ||
add_executable(${PROJECT}) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake) | ||
# Checks this example is valid for the family and initializes the project | ||
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
add_executable(${PROJECT}) | ||
|
||
# Example source | ||
target_sources(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c | ||
) | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c | ||
) | ||
|
||
# Example include | ||
target_include_directories(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
# Example defines | ||
target_compile_definitions(${PROJECT} PUBLIC | ||
CFG_TUSB_OS=OPT_OS_PICO | ||
) | ||
|
||
else() | ||
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}") | ||
# Configure compilation flags and libraries for the example... see the corresponding function | ||
# in hw/bsp/FAMILY/family.cmake for details. | ||
family_configure_device_example(${PROJECT}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,28 @@ | ||
# use directory name for project id | ||
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
set(PROJECT ${BOARD}-${PROJECT}) | ||
|
||
# TOP is absolute path to root directory of TinyUSB git repo | ||
set(TOP "../../..") | ||
get_filename_component(TOP "${TOP}" REALPATH) | ||
|
||
# Check for -DFAMILY= | ||
if(FAMILY STREQUAL "rp2040") | ||
cmake_minimum_required(VERSION 3.12) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/pico_sdk_import.cmake) | ||
project(${PROJECT}) | ||
add_executable(${PROJECT}) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake) | ||
|
||
# Example source | ||
target_sources(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c | ||
) | ||
|
||
# Example include | ||
target_include_directories(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
# Example defines | ||
target_compile_definitions(${PROJECT} PUBLIC | ||
CFG_TUSB_OS=OPT_OS_PICO | ||
) | ||
|
||
else() | ||
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}") | ||
endif() | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/${FAMILY}/family.cmake) | ||
|
||
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>) | ||
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
project(${PROJECT}) | ||
|
||
# Checks this example is valid for the family and initializes the project | ||
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
add_executable(${PROJECT}) | ||
|
||
# Example source | ||
target_sources(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c | ||
) | ||
|
||
# Example include | ||
target_include_directories(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
# Configure compilation flags and libraries for the example... see the corresponding function | ||
# in hw/bsp/FAMILY/family.cmake for details. | ||
family_configure_device_example(${PROJECT}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,29 @@ | ||
# use directory name for project id | ||
get_filename_component(PROJECT ${CMAKE_CURRENT_SOURCE_DIR} NAME) | ||
set(PROJECT ${BOARD}-${PROJECT}) | ||
|
||
# TOP is absolute path to root directory of TinyUSB git repo | ||
set(TOP "../../..") | ||
get_filename_component(TOP "${TOP}" REALPATH) | ||
|
||
# Check for -DFAMILY= | ||
if(FAMILY STREQUAL "rp2040") | ||
cmake_minimum_required(VERSION 3.12) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/pico_sdk_import.cmake) | ||
project(${PROJECT}) | ||
add_executable(${PROJECT}) | ||
|
||
include(${TOP}/hw/bsp/${FAMILY}/family.cmake) | ||
|
||
# Example source | ||
target_sources(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/msc_disk.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c | ||
) | ||
|
||
# Example include | ||
target_include_directories(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
# Example defines | ||
target_compile_definitions(${PROJECT} PUBLIC | ||
CFG_TUSB_OS=OPT_OS_PICO | ||
) | ||
|
||
else() | ||
message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}") | ||
endif() | ||
cmake_minimum_required(VERSION 3.5) | ||
|
||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../../hw/bsp/${FAMILY}/family.cmake) | ||
|
||
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>) | ||
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
project(${PROJECT}) | ||
|
||
# Checks this example is valid for the family and initializes the project | ||
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR}) | ||
|
||
add_executable(${PROJECT}) | ||
|
||
# Example source | ||
target_sources(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/main.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/msc_disk.c | ||
${CMAKE_CURRENT_SOURCE_DIR}/src/usb_descriptors.c | ||
) | ||
|
||
# Example include | ||
target_include_directories(${PROJECT} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
# Configure compilation flags and libraries for the example... see the corresponding function | ||
# in hw/bsp/FAMILY/family.cmake for details. | ||
family_configure_device_example(${PROJECT}) |
Oops, something went wrong.