Skip to content

Commit 42c5978

Browse files
Remove need for source control in chibios (#1989)
***NO_CI***
1 parent 8eba0d1 commit 42c5978

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

targets/ChibiOS/CMakeLists.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,24 @@ else()
9494
# sanity check is source path exists
9595
if(EXISTS ${RTOS_SOURCE_FOLDER}/)
9696
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
97-
message(STATUS "RTOS is: ChibiOS ${RTOS_VERSION} (source from: ${RTOS_SOURCE_FOLDER}) and has to be cloned with svn.")
9897

98+
message(STATUS "RTOS is: ChibiOS ${RTOS_VERSION} (source from: ${RTOS_SOURCE_FOLDER})")
9999
FetchContent_Declare(
100100
chibios
101-
SVN_REPOSITORY ${RTOS_SOURCE_FOLDER}
102-
SVN_REVISION -rHEAD
103-
)
101+
SOURCE_DIR ${RTOS_SOURCE_FOLDER}
102+
)
103+
104104
else()
105-
message(STATUS "RTOS is: ChibiOS ${RTOS_VERSION} (source from: ${RTOS_SOURCE_FOLDER}) and has to be cloned with: git svn clone RUL -rHEAD.")
105+
# running on *nix requires setting up a local git repo from SVN
106+
# with git svn clone https://svn.osdn.net/svnroot/chibios/branches/${RTOS_VERSION} -rHEAD
107+
message(STATUS "RTOS is: ChibiOS ${RTOS_VERSION} (source from: ${RTOS_SOURCE_FOLDER})")
106108

107109
FetchContent_Declare(
108110
chibios
109111
GIT_REPOSITORY ${RTOS_SOURCE_FOLDER}
110112
GIT_TAG master
111113
)
114+
112115
endif()
113116
else()
114117
message(FATAL_ERROR "Couldn't find ChibiOS source at ${RTOS_SOURCE_FOLDER}/")
@@ -140,8 +143,7 @@ if(CHIBIOS_CONTRIB_REQUIRED)
140143

141144
FetchContent_Declare(
142145
chibios-contrib
143-
GIT_REPOSITORY ${CHIBIOS_CONTRIB_SOURCE}
144-
GIT_TAG nanoframework
146+
SOURCE_DIR ${CHIBIOS_CONTRIB_SOURCE}
145147
)
146148

147149
else()
@@ -205,8 +207,7 @@ if(NF_FEATURE_HAS_SDCARD OR NF_FEATURE_HAS_USB_MSD)
205207

206208
FetchContent_Declare(
207209
fatfs
208-
GIT_REPOSITORY ${FATFS_SOURCE}
209-
GIT_TAG ${FATFS_VERSION_TAG}
210+
SOURCE_DIR ${FATFS_SOURCE}
210211
)
211212

212213
else()
@@ -261,12 +262,11 @@ if(NF_SECURITY_MBEDTLS)
261262
# sanity check is source path exists
262263
if(EXISTS ${MBEDTLS_SOURCE}/)
263264

264-
message(STATUS "mbedTLS ${FATFS_VERSION_TAG} (source from: ${MBEDTLS_SOURCE})")
265+
message(STATUS "mbedTLS ${MBEDTLS_GIT_TAG} (source from: ${MBEDTLS_SOURCE})")
265266

266267
FetchContent_Declare(
267268
mbedtls
268-
GIT_REPOSITORY ${MBEDTLS_SOURCE}
269-
GIT_TAG ${MBEDTLS_GIT_TAG}
269+
SOURCE_DIR ${MBEDTLS_SOURCE}
270270
)
271271

272272
else()

0 commit comments

Comments
 (0)