File tree Expand file tree Collapse file tree 16 files changed +81
-67
lines changed Expand file tree Collapse file tree 16 files changed +81
-67
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.5 )
1
+ cmake_minimum_required (VERSION 3.17 )
2
2
3
3
#set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
4
4
include (${CMAKE_CURRENT_SOURCE_DIR} /../hw/bsp/family_support.cmake )
5
5
6
6
project (tinyusb_examples C CXX ASM )
7
7
8
8
add_subdirectory (device )
9
- # add_subdirectory(dual)
10
- # add_subdirectory(host)
9
+ add_subdirectory (dual )
10
+ add_subdirectory (host )
Original file line number Diff line number Diff line change 1
- set (TOOLCHAIN_COMMON_FLAGS
2
- -mthumb
3
- -mcpu=cortex-m7
4
- -mfloat-abi=hard
5
- -mfpu=fpv5-d16
6
- )
1
+ if (TOOLCHAIN STREQUAL "gcc" )
2
+ set (TOOLCHAIN_COMMON_FLAGS
3
+ -mthumb
4
+ -mcpu=cortex-m7
5
+ -mfloat-abi=hard
6
+ -mfpu=fpv5-d16
7
+ )
8
+
9
+ set (FREERTOS_PORT GCC_ARM_CM7 CACHE INTERNAL "" )
10
+ else ()
11
+ # TODO support IAR
12
+ endif ()
Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.5 )
1
+ cmake_minimum_required (VERSION 3.17 )
2
2
3
3
include (${CMAKE_CURRENT_SOURCE_DIR} /../../hw/bsp/family_support.cmake )
4
4
Original file line number Diff line number Diff line change @@ -34,11 +34,5 @@ target_include_directories(${PROJECT} PUBLIC
34
34
# in hw/bsp/FAMILY/family.cmake for details.
35
35
family_configure_device_example (${PROJECT} )
36
36
37
- if (NOT TARGET freertos_kernel )
38
- family_configure_freertos_example (${PROJECT} )
39
- add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /../../../lib/FreeRTOS-Kernel lib/FreeRTOS-Kernel )
40
- endif ()
41
-
42
- target_link_libraries (${PROJECT} PUBLIC
43
- freertos_kernel
44
- )
37
+ # Add FreeRTOS for this example
38
+ family_add_freertos (${PROJECT} )
Original file line number Diff line number Diff line change @@ -33,11 +33,5 @@ target_include_directories(${PROJECT} PUBLIC
33
33
# in hw/bsp/FAMILY/family.cmake for details.
34
34
family_configure_device_example (${PROJECT} )
35
35
36
- if (NOT TARGET freertos_kernel )
37
- family_configure_freertos_example (${PROJECT} )
38
- add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /../../../lib/FreeRTOS-Kernel lib/FreeRTOS-Kernel )
39
- endif ()
40
-
41
- target_link_libraries (${PROJECT} PUBLIC
42
- freertos_kernel
43
- )
36
+ # Add FreeRTOS for this example
37
+ family_add_freertos (${PROJECT} )
Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.5 )
1
+ cmake_minimum_required (VERSION 3.17 )
2
2
3
3
include (${CMAKE_CURRENT_SOURCE_DIR} /../../hw/bsp/family_support.cmake )
4
4
5
- project (tinyusb_dual_examples )
5
+ project (tinyusb_dual_examples C CXX ASM )
6
6
family_initialize_project (tinyusb_dual_examples ${CMAKE_CURRENT_LIST_DIR} )
7
7
if (FAMILY STREQUAL "rp2040" AND NOT TARGET tinyusb_pico_pio_usb )
8
8
message ("Skipping dual host/device mode examples as Pico-PIO-USB is not available" )
Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.5 )
1
+ cmake_minimum_required (VERSION 3.17 )
2
2
3
3
include (${CMAKE_CURRENT_SOURCE_DIR} /../../../hw/bsp/family_support.cmake )
4
4
5
5
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
6
6
family_get_project_name (PROJECT ${CMAKE_CURRENT_LIST_DIR} )
7
7
8
- project (${PROJECT} )
8
+ project (${PROJECT} C CXX ASM )
9
9
10
10
# Checks this example is valid for the family and initializes the project
11
11
family_initialize_project (${PROJECT} ${CMAKE_CURRENT_LIST_DIR} )
Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.5 )
1
+ cmake_minimum_required (VERSION 3.17 )
2
2
3
3
include (${CMAKE_CURRENT_SOURCE_DIR} /../../hw/bsp/family_support.cmake )
4
4
5
- project (tinyusb_host_examples )
5
+ project (tinyusb_host_examples C CXX ASM )
6
6
family_initialize_project (tinyusb_host_examples ${CMAKE_CURRENT_LIST_DIR} )
7
7
8
8
# family_add_subdirectory will filter what to actually add based on selected FAMILY
Original file line number Diff line number Diff line change 1
- cmake_minimum_required (VERSION 3.5 )
1
+ cmake_minimum_required (VERSION 3.17 )
2
2
3
3
include (${CMAKE_CURRENT_SOURCE_DIR} /../../../hw/bsp/family_support.cmake )
4
4
5
5
# gets PROJECT name for the example
6
6
family_get_project_name (PROJECT ${CMAKE_CURRENT_LIST_DIR} )
7
7
8
- project (${PROJECT} )
8
+ project (${PROJECT} C CXX ASM )
9
9
10
10
# Checks this example is valid for the family and initializes the project
11
11
family_initialize_project (${PROJECT} ${CMAKE_CURRENT_LIST_DIR} )
You can’t perform that action at this time.
0 commit comments