hathach 4 лет назад
Родитель
Сommit
59f0fa1e5e

+ 1 - 1
examples/device/audio_4_channel_mic/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/audio_test/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 4 - 2
examples/device/board_test/CMakeLists.txt

@@ -1,4 +1,6 @@
-# use directory name for project id
+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})
 
@@ -38,5 +40,5 @@ elseif(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/cdc_dual_ports/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 3 - 8
examples/device/cdc_msc/CMakeLists.txt

@@ -7,18 +7,13 @@ set(TOP "../../..")
 get_filename_component(TOP "${TOP}" REALPATH)
 
 # Check for -DFAMILY=
-if(FAMILY MATCHES "^(esp32s[2-3])*")
-  cmake_minimum_required(VERSION 3.5)
-  include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
-  project(${PROJECT})
-
-elseif(FAMILY STREQUAL "rp2040")
+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
@@ -39,5 +34,5 @@ elseif(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 2 - 0
examples/device/cdc_msc_freertos/CMakeLists.txt

@@ -10,6 +10,8 @@ get_filename_component(TOP "${TOP}" REALPATH)
 
 # Check for -DFAMILY=
 if(FAMILY MATCHES "^esp32s[2-3]")
+  cmake_minimum_required(VERSION 3.5)
+
   include(${TOP}/hw/bsp/${FAMILY}/family.cmake)
   project(${PROJECT})
 

+ 1 - 1
examples/device/dfu_runtime/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/dynamic_configuration/CMakeLists.txt

@@ -34,5 +34,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/hid_composite/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/hid_generic_inout/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/hid_multiple_interface/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/midi_test/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/msc_dual_lun/CMakeLists.txt

@@ -34,5 +34,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/net_lwip_webserver/CMakeLists.txt

@@ -80,5 +80,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/uac2_headset/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/usbtmc/CMakeLists.txt

@@ -34,5 +34,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/device/webusb_serial/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()

+ 1 - 1
examples/host/cdc_msc_hid/CMakeLists.txt

@@ -33,5 +33,5 @@ if(FAMILY STREQUAL "rp2040")
   )
 
 else()
-  message(FATAL_ERROR "Invalid FAMILY specified")
+  message(FATAL_ERROR "Invalid FAMILY specified: ${FAMILY}")
 endif()