Konstantin Oblaukhov пре 8 година
родитељ
комит
eb4e8d37e2
2 измењених фајлова са 16 додато и 44 уклоњено
  1. 16 26
      cmake/ChibiOS/ChibiOS17.cmake
  2. 0 18
      cmake/ChibiOS/ChibiOS17_Kernel.cmake

+ 16 - 26
cmake/ChibiOS/ChibiOS17.cmake

@@ -3,33 +3,23 @@ IF(NOT ChibiOS_FIND_COMPONENTS)
     MESSAGE(STATUS "No ChibiOS components specified, using default: ${ChibiOS_FIND_COMPONENTS}")
 ENDIF()
 
-# LIST(FIND ChibiOS_FIND_COMPONENTS nil ChibiOS_FIND_COMPONENTS_nil)
-# LIST(FIND ChibiOS_FIND_COMPONENTS rt ChibiOS_FIND_COMPONENTS_rt)
-# # LIST(FIND ChibiOS_FIND_COMPONENTS hal ChibiOS_FIND_COMPONENTS_hal)
-# # LIST(FIND ChibiOS_FIND_COMPONENTS st ChibiOS_FIND_COMPONENTS_st)
-# 
-# IF((${ChibiOS_FIND_COMPONENTS_nil} LESS 0) AND (${ChibiOS_FIND_COMPONENTS_rt} LESS 0))
-#   MESSAGE(STATUS "No kernel component selected, using Nil kernel")
-#   LIST(APPEND ChibiOS_FIND_COMPONENTS nil)
-#   SET(CHIBIOS_KERNEL nil)
-# ELSE()
-#   IF((NOT (${ChibiOS_FIND_COMPONENTS_nil} LESS 0)) AND (NOT (${ChibiOS_FIND_COMPONENTS_rt} LESS 0)))
-#     MESSAGE(FATAL_ERROR "Cannot use RT and Nil kernel at the same time")
-#   ENDIF()
-#   IF(NOT (${ChibiOS_FIND_COMPONENTS_nil} LESS 0))
-#     SET(CHIBIOS_KERNEL nil)
-#   ELSE()
-#     SET(CHIBIOS_KERNEL rt)
-#   ENDIF()
-# ENDIF()
+LIST(FIND ChibiOS_FIND_COMPONENTS nil ChibiOS_FIND_COMPONENTS_nil)
+LIST(FIND ChibiOS_FIND_COMPONENTS rt ChibiOS_FIND_COMPONENTS_rt)
 
-# IF(${ChibiOS_FIND_COMPONENTS_hal} LESS 0)
-#   LIST(APPEND ChibiOS_FIND_COMPONENTS hal)
-# ENDIF()
-# 
-# IF(${ChibiOS_FIND_COMPONENTS_st} LESS 0)
-#   LIST(APPEND ChibiOS_FIND_COMPONENTS st)
-# ENDIF()
+IF((${ChibiOS_FIND_COMPONENTS_nil} LESS 0) AND (${ChibiOS_FIND_COMPONENTS_rt} LESS 0))
+  MESSAGE(STATUS "No kernel component selected, using Nil kernel")
+  LIST(APPEND ChibiOS_FIND_COMPONENTS nil)
+  SET(CHIBIOS_KERNEL nil)
+ELSE()
+  IF((NOT (${ChibiOS_FIND_COMPONENTS_nil} LESS 0)) AND (NOT (${ChibiOS_FIND_COMPONENTS_rt} LESS 0)))
+    MESSAGE(FATAL_ERROR "Cannot use RT and Nil kernel at the same time")
+  ENDIF()
+  IF(NOT (${ChibiOS_FIND_COMPONENTS_nil} LESS 0))
+    SET(CHIBIOS_KERNEL nil)
+  ELSE()
+    SET(CHIBIOS_KERNEL rt)
+  ENDIF()
+ENDIF()
 
 INCLUDE(ChibiOS/ChibiOS17_LD)
 INCLUDE(ChibiOS/ChibiOS17_Kernel)

+ 0 - 18
cmake/ChibiOS/ChibiOS17_Kernel.cmake

@@ -1,21 +1,3 @@
-LIST(FIND ChibiOS_FIND_COMPONENTS nil ChibiOS_FIND_COMPONENTS_nil)
-LIST(FIND ChibiOS_FIND_COMPONENTS rt ChibiOS_FIND_COMPONENTS_rt)
-
-IF((${ChibiOS_FIND_COMPONENTS_nil} LESS 0) AND (${ChibiOS_FIND_COMPONENTS_rt} LESS 0))
-  MESSAGE(STATUS "No kernel component selected, using Nil kernel")
-  LIST(APPEND ChibiOS_FIND_COMPONENTS nil)
-  SET(CHIBIOS_KERNEL nil)
-ELSE()
-  IF((NOT (${ChibiOS_FIND_COMPONENTS_nil} LESS 0)) AND (NOT (${ChibiOS_FIND_COMPONENTS_rt} LESS 0)))
-    MESSAGE(FATAL_ERROR "Cannot use RT and Nil kernel at the same time")
-  ENDIF()
-  IF(NOT (${ChibiOS_FIND_COMPONENTS_nil} LESS 0))
-    SET(CHIBIOS_KERNEL nil)
-  ELSE()
-    SET(CHIBIOS_KERNEL rt)
-  ENDIF()
-ENDIF()
-
 SET(CHIBIOS_kernel_SEARCH_PATH 
   ${CHIBIOS_ROOT}/os/license
   ${CHIBIOS_ROOT}/os/common/ports/ARMCMx