Skip to content

Commit e43387a

Browse files
committed
rework cmake with rtos support add RTOS to family_configure_device/host/dual_example()
1 parent bc0d6c7 commit e43387a

File tree

48 files changed

+272
-404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+272
-404
lines changed

examples/device/audio_4_channel_mic/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ target_include_directories(${PROJECT} PUBLIC
2828
${CMAKE_CURRENT_SOURCE_DIR}/src
2929
)
3030

31-
# Configure compilation flags and libraries for the example... see the corresponding function
32-
# in hw/bsp/FAMILY/family.cmake for details.
33-
family_configure_device_example(${PROJECT})
31+
# Configure compilation flags and libraries for the example without RTOS.
32+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
33+
family_configure_device_example(${PROJECT} noos)

examples/device/audio_test/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ target_include_directories(${PROJECT} PUBLIC
2828
${CMAKE_CURRENT_SOURCE_DIR}/src
2929
)
3030

31-
# Configure compilation flags and libraries for the example... see the corresponding function
32-
# in hw/bsp/FAMILY/family.cmake for details.
33-
family_configure_device_example(${PROJECT})
31+
# Configure compilation flags and libraries for the example without RTOS.
32+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
33+
family_configure_device_example(${PROJECT} noos)

examples/device/audio_test_multi_rate/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ target_include_directories(${PROJECT} PUBLIC
2828
${CMAKE_CURRENT_SOURCE_DIR}/src
2929
)
3030

31-
# Configure compilation flags and libraries for the example... see the corresponding function
32-
# in hw/bsp/FAMILY/family.cmake for details.
33-
family_configure_device_example(${PROJECT})
31+
# Configure compilation flags and libraries for the example without RTOS.
32+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
33+
family_configure_device_example(${PROJECT} noos)

examples/device/board_test/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ target_include_directories(${PROJECT} PUBLIC
2727
${CMAKE_CURRENT_SOURCE_DIR}/src
2828
)
2929

30-
# Configure compilation flags and libraries for the example... see the corresponding function
31-
# in hw/bsp/FAMILY/family.cmake for details.
32-
family_configure_device_example(${PROJECT})
30+
# Configure compilation flags and libraries for the example without RTOS.
31+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
32+
family_configure_device_example(${PROJECT} noos)

examples/device/cdc_dual_ports/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ target_include_directories(${PROJECT} PUBLIC
2828
${CMAKE_CURRENT_SOURCE_DIR}/src
2929
)
3030

31-
# Configure compilation flags and libraries for the example... see the corresponding function
32-
# in hw/bsp/FAMILY/family.cmake for details.
33-
family_configure_device_example(${PROJECT})
31+
# Configure compilation flags and libraries for the example without RTOS.
32+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
33+
family_configure_device_example(${PROJECT} noos)

examples/device/cdc_msc/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ target_include_directories(${PROJECT} PUBLIC
3232

3333
# Configure compilation flags and libraries for the example... see the corresponding function
3434
# in hw/bsp/FAMILY/family.cmake for details.
35-
family_configure_device_example(${PROJECT})
35+
family_configure_device_example(${PROJECT} noos)

examples/device/cdc_msc_freertos/CMakeLists.txt

+3-6
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ target_include_directories(${PROJECT} PUBLIC
3030
${CMAKE_CURRENT_SOURCE_DIR}/src
3131
)
3232

33-
# Configure compilation flags and libraries for the example... see the corresponding function
34-
# in hw/bsp/FAMILY/family.cmake for details.
35-
family_configure_device_example(${PROJECT})
36-
37-
# Add FreeRTOS for this example
38-
family_add_freertos(${PROJECT})
33+
# Configure compilation flags and libraries for the example with FreeRTOS.
34+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
35+
family_configure_device_example(${PROJECT} freertos)

examples/device/dfu/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ target_include_directories(${PROJECT} PUBLIC
2727
${CMAKE_CURRENT_SOURCE_DIR}/src
2828
)
2929

30-
# Configure compilation flags and libraries for the example... see the corresponding function
31-
# in hw/bsp/FAMILY/family.cmake for details.
32-
family_configure_device_example(${PROJECT})
30+
# Configure compilation flags and libraries for the example without RTOS.
31+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
32+
family_configure_device_example(${PROJECT} noos)

examples/device/dfu_runtime/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ target_include_directories(${PROJECT} PUBLIC
2727
${CMAKE_CURRENT_SOURCE_DIR}/src
2828
)
2929

30-
# Configure compilation flags and libraries for the example... see the corresponding function
31-
# in hw/bsp/FAMILY/family.cmake for details.
32-
family_configure_device_example(${PROJECT})
30+
# Configure compilation flags and libraries for the example without RTOS.
31+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
32+
family_configure_device_example(${PROJECT} noos)

examples/device/dynamic_configuration/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ target_include_directories(${PROJECT} PUBLIC
2828
${CMAKE_CURRENT_SOURCE_DIR}/src
2929
)
3030

31-
# Configure compilation flags and libraries for the example... see the corresponding function
32-
# in hw/bsp/FAMILY/family.cmake for details.
33-
family_configure_device_example(${PROJECT})
31+
# Configure compilation flags and libraries for the example without RTOS.
32+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
33+
family_configure_device_example(${PROJECT} noos)

examples/device/hid_boot_interface/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ target_include_directories(${PROJECT} PUBLIC
2727
${CMAKE_CURRENT_SOURCE_DIR}/src
2828
)
2929

30-
# Configure compilation flags and libraries for the example... see the corresponding function
31-
# in hw/bsp/FAMILY/family.cmake for details.
32-
family_configure_device_example(${PROJECT})
30+
# Configure compilation flags and libraries for the example without RTOS.
31+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
32+
family_configure_device_example(${PROJECT} noos)

examples/device/hid_composite/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ target_include_directories(${PROJECT} PUBLIC
2727
${CMAKE_CURRENT_SOURCE_DIR}/src
2828
)
2929

30-
# Configure compilation flags and libraries for the example... see the corresponding function
31-
# in hw/bsp/FAMILY/family.cmake for details.
32-
family_configure_device_example(${PROJECT})
30+
# Configure compilation flags and libraries for the example without RTOS.
31+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
32+
family_configure_device_example(${PROJECT} noos)

examples/device/hid_composite_freertos/CMakeLists.txt

+3-6
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ target_include_directories(${PROJECT} PUBLIC
2929
${CMAKE_CURRENT_SOURCE_DIR}/src
3030
)
3131

32-
# Configure compilation flags and libraries for the example... see the corresponding function
33-
# in hw/bsp/FAMILY/family.cmake for details.
34-
family_configure_device_example(${PROJECT})
35-
36-
# Add FreeRTOS for this example
37-
family_add_freertos(${PROJECT})
32+
# Configure compilation flags and libraries for the example with FreeRTOS.
33+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
34+
family_configure_device_example(${PROJECT} freertos)

examples/device/hid_generic_inout/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ target_include_directories(${PROJECT} PUBLIC
2727
${CMAKE_CURRENT_SOURCE_DIR}/src
2828
)
2929

30-
# Configure compilation flags and libraries for the example... see the corresponding function
31-
# in hw/bsp/FAMILY/family.cmake for details.
32-
family_configure_device_example(${PROJECT})
30+
# Configure compilation flags and libraries for the example without RTOS.
31+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
32+
family_configure_device_example(${PROJECT} noos)

examples/device/hid_multiple_interface/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ target_include_directories(${PROJECT} PUBLIC
2727
${CMAKE_CURRENT_SOURCE_DIR}/src
2828
)
2929

30-
# Configure compilation flags and libraries for the example... see the corresponding function
31-
# in hw/bsp/FAMILY/family.cmake for details.
32-
family_configure_device_example(${PROJECT})
30+
# Configure compilation flags and libraries for the example without RTOS.
31+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
32+
family_configure_device_example(${PROJECT} noos)

examples/device/midi_test/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ target_include_directories(${PROJECT} PUBLIC
2626
${CMAKE_CURRENT_SOURCE_DIR}/src
2727
)
2828

29-
# Configure compilation flags and libraries for the example... see the corresponding function
30-
# in hw/bsp/FAMILY/family.cmake for details.
31-
family_configure_device_example(${PROJECT})
29+
# Configure compilation flags and libraries for the example without RTOS.
30+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
31+
family_configure_device_example(${PROJECT} noos)

examples/device/msc_dual_lun/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ target_include_directories(${PROJECT} PUBLIC
2929
${CMAKE_CURRENT_SOURCE_DIR}/src
3030
)
3131

32-
# Configure compilation flags and libraries for the example... see the corresponding function
33-
# in hw/bsp/FAMILY/family.cmake for details.
34-
family_configure_device_example(${PROJECT})
32+
# Configure compilation flags and libraries for the example without RTOS.
33+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
34+
family_configure_device_example(${PROJECT} noos)

examples/device/net_lwip_webserver/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,6 @@ elseif (CMAKE_C_COMPILER_ID STREQUAL "IAR")
8888

8989
endif ()
9090

91-
# Configure compilation flags and libraries for the example... see the corresponding function
92-
# in hw/bsp/FAMILY/family.cmake for details.
93-
family_configure_device_example(${PROJECT})
91+
# Configure compilation flags and libraries for the example without RTOS.
92+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
93+
family_configure_device_example(${PROJECT} noos)

examples/device/uac2_headset/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ target_include_directories(${PROJECT} PUBLIC
2828
${CMAKE_CURRENT_SOURCE_DIR}/src
2929
)
3030

31-
# Configure compilation flags and libraries for the example... see the corresponding function
32-
# in hw/bsp/FAMILY/family.cmake for details.
33-
family_configure_device_example(${PROJECT})
31+
# Configure compilation flags and libraries for the example without RTOS.
32+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
33+
family_configure_device_example(${PROJECT} noos)

examples/device/usbtmc/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ target_include_directories(${PROJECT} PUBLIC
2929
${CMAKE_CURRENT_SOURCE_DIR}/src
3030
)
3131

32-
# Configure compilation flags and libraries for the example... see the corresponding function
33-
# in hw/bsp/FAMILY/family.cmake for details.
34-
family_configure_device_example(${PROJECT})
32+
# Configure compilation flags and libraries for the example without RTOS.
33+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
34+
family_configure_device_example(${PROJECT} noos)

examples/device/video_capture/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ target_include_directories(${PROJECT} PUBLIC
3434
${CMAKE_CURRENT_SOURCE_DIR}/src
3535
)
3636

37-
# Configure compilation flags and libraries for the example... see the corresponding function
38-
# in hw/bsp/FAMILY/family.cmake for details.
39-
family_configure_device_example(${PROJECT})
37+
# Configure compilation flags and libraries for the example without RTOS.
38+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
39+
family_configure_device_example(${PROJECT} noos)

examples/device/webusb_serial/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ target_include_directories(${PROJECT} PUBLIC
2828
${CMAKE_CURRENT_SOURCE_DIR}/src
2929
)
3030

31-
# Configure compilation flags and libraries for the example... see the corresponding function
32-
# in hw/bsp/FAMILY/family.cmake for details.
33-
family_configure_device_example(${PROJECT})
31+
# Configure compilation flags and libraries for the example without RTOS.
32+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
33+
family_configure_device_example(${PROJECT} noos)

examples/dual/host_hid_to_device_cdc/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ target_include_directories(${PROJECT} PUBLIC
2323
${CMAKE_CURRENT_SOURCE_DIR}/src
2424
)
2525

26-
# Configure compilation flags and libraries for the example... see the corresponding function
27-
# in hw/bsp/FAMILY/family.cmake for details.
28-
family_configure_dual_usb_example(${PROJECT})
26+
# Configure compilation flags and libraries for the example without RTOS.
27+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
28+
family_configure_dual_usb_example(${PROJECT} noos)
2929

3030
# due to warnings from Pico-PIO-USB
3131
target_compile_options(${PROJECT} PUBLIC

examples/host/bare_api/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ target_include_directories(${PROJECT} PUBLIC
2222
${CMAKE_CURRENT_SOURCE_DIR}/src
2323
)
2424

25-
# Configure compilation flags and libraries for the example... see the corresponding function
26-
# in hw/bsp/FAMILY/family.cmake for details.
27-
family_configure_host_example(${PROJECT})
25+
# Configure compilation flags and libraries for the example without RTOS.
26+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
27+
family_configure_host_example(${PROJECT} noos)
2828

2929
# Add pico-pio-usb for rp2040 since user can choose to run on bit-banging host
3030
if(FAMILY STREQUAL "rp2040")

examples/host/cdc_msc_hid/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ target_include_directories(${PROJECT} PUBLIC
2525
${CMAKE_CURRENT_SOURCE_DIR}/src
2626
)
2727

28-
# Configure compilation flags and libraries for the example... see the corresponding function
29-
# in hw/bsp/FAMILY/family.cmake for details.
30-
family_configure_host_example(${PROJECT})
28+
# Configure compilation flags and libraries for the example without RTOS.
29+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
30+
family_configure_host_example(${PROJECT} noos)
3131

3232
# Add pico-pio-usb for rp2040 since user can choose to run on bit-banging host
3333
if(FAMILY STREQUAL "rp2040")

examples/host/hid_controller/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ target_include_directories(${PROJECT} PUBLIC
2323
${CMAKE_CURRENT_SOURCE_DIR}/src
2424
)
2525

26-
# Configure compilation flags and libraries for the example... see the corresponding function
27-
# in hw/bsp/FAMILY/family.cmake for details.
28-
family_configure_host_example(${PROJECT})
26+
# Configure compilation flags and libraries for the example without RTOS.
27+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
28+
family_configure_host_example(${PROJECT} noos)
2929

3030
# Add pico-pio-usb for rp2040 since user can choose to run on bit-banging host
3131
if(FAMILY STREQUAL "rp2040")

examples/host/msc_file_explorer/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ target_include_directories(${PROJECT} PUBLIC
3535
${TOP}/lib/embedded-cli
3636
)
3737

38-
# Configure compilation flags and libraries for the example... see the corresponding function
39-
# in hw/bsp/FAMILY/family.cmake for details.
40-
family_configure_host_example(${PROJECT})
38+
# Configure compilation flags and libraries for the example without RTOS.
39+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
40+
family_configure_host_example(${PROJECT} noos)
4141

4242
# Add pico-pio-usb for rp2040 since user can choose to run on bit-banging host
4343
if(FAMILY STREQUAL "rp2040")

examples/typec/power_delivery/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ target_include_directories(${PROJECT} PUBLIC
2727
${CMAKE_CURRENT_SOURCE_DIR}/src
2828
)
2929

30-
# Configure compilation flags and libraries for the example... see the corresponding function
31-
# in hw/bsp/FAMILY/family.cmake for details.
32-
family_configure_device_example(${PROJECT})
30+
# Configure compilation flags and libraries for the example without RTOS.
31+
# See the corresponding function in hw/bsp/FAMILY/family.cmake for details.
32+
family_configure_device_example(${PROJECT} noos)

examples/typec/power_delivery/src/tusb_config.h

+9-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
extern "C" {
3131
#endif
3232

33-
// special example that doesn't enable device or host stack
34-
// This can cause some TinyUSB API missing, this define hack to allow us to fill those API
35-
// to pass the compilation process
36-
#define tud_int_handler(x)
37-
3833
//--------------------------------------------------------------------
3934
// COMMON CONFIGURATION
4035
//--------------------------------------------------------------------
@@ -54,6 +49,15 @@
5449
// Enable TYPEC stack
5550
#define CFG_TUC_ENABLED 1
5651

52+
53+
// special example that doesn't enable device or host stack
54+
// This can cause some TinyUSB API missing, this define hack to allow us to fill those API
55+
// to pass the compilation process
56+
#if CFG_TUD_ENABLED == 0
57+
#define tud_int_handler(x)
58+
#endif
59+
60+
5761
// CFG_TUSB_DEBUG is defined by compiler in DEBUG build
5862
// #define CFG_TUSB_DEBUG 0
5963

0 commit comments

Comments
 (0)