Skip to content

Commit 3c39c65

Browse files
Simplifies naming convention for RTOS Source location. (#1717)
***NO_CI***
1 parent 51dbf59 commit 3c39c65

File tree

11 files changed

+32
-33
lines changed

11 files changed

+32
-33
lines changed

.vscode/cmake-variants.TEMPLATE.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@
3838
"DP_FLOATINGPOINT": "<OFF-default-ON-for-adding-support-for-double-precision-floating-point>",
3939
"SUPPORT_ANY_BASE_CONVERSION": "<OFF-default-ON-for-adding-support-for-conversion-strings-to-values-on-any-base>",
4040
"RTOS": "<one-of-valid-rtos-options-CHIBIOS-FREERTOS-FREERTOS_ESP32-TI_SIMPLELINK>",
41-
"CHIBIOS_SOURCE": "<path-to-chibios-source-mind-the-forward-slash>",
41+
"RTOS_SOURCE_FOLDER": "<path-to-RTOS-source-folder-if-supported-mind-the-forward-slash>",
4242
"CHIBIOS_CONTRIB_REQUIRED": "OFF-default-ON-to-include_ChibiOS-Contrib-repository-in-the-build",
4343
"CHIBIOS_CONTRIB_SOURCE": "<path-to-local-ChibiOS-contrib-source-mind-the-forward-slash>",
4444
"FREERTOS_BOARD": "<valid-freertos-board-name-from-boards-collection>",
4545
"FREERTOS_VERSION": "<valid-freertos-version-if-empty-use-default-set-cmake>",
46-
"FREERTOS_SOURCE": "<path-to-freertos-source-mind-the-forward-slash>",
4746
"CMSIS_SOURCE": "<path-to-cmsis-source-mind-the-forward-slash>",
4847
"CMSIS_VERSION": "<valid-cmsis-version-if-empty-use-default-set-cmake>",
4948
"CHIBIOS_BOARD": "<valid-chibios-board-name-from-boards-collection>",

CMakeSettings.SAMPLE.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@
299299
"type": "STRING"
300300
},
301301
{
302-
"name": "CHIBIOS_SOURCE",
302+
"name": "RTOS_SOURCE_FOLDER",
303303
"value": "C:/usr/src/NanoFramework/ChibiOS",
304304
"type": "PATH"
305305
},

CMakeSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"value": "ST_STM32F769I_DISCOVERY"
4949
},
5050
{
51-
"name": "CHIBIOS_SOURCE",
51+
"name": "RTOS_SOURCE_FOLDER",
5252
"value": "E:/GitHub/ChibiOS"
5353
},
5454
{

targets/CMSIS-OS/ChibiOS/CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ if(DEFINED TOOL_HEX2DFU_PREFIX)
2323
endif()
2424
endif()
2525

26-
# check if CHIBIOS_SOURCE was specified or if it's empty (default is empty)
27-
set(NO_CHIBIOS_SOURCE TRUE)
28-
if(CHIBIOS_SOURCE)
29-
if(NOT "${CHIBIOS_SOURCE}" STREQUAL "")
30-
set(NO_CHIBIOS_SOURCE FALSE)
26+
# check if RTOS_SOURCE_FOLDER was specified or if it's empty (default is empty)
27+
set(NO_RTOS_SOURCE_FOLDER TRUE)
28+
if(RTOS_SOURCE_FOLDER)
29+
if(NOT "${RTOS_SOURCE_FOLDER}" STREQUAL "")
30+
set(NO_RTOS_SOURCE_FOLDER FALSE)
3131
endif()
3232
endif()
3333

@@ -39,7 +39,7 @@ if(CHIBIOS_CONTRIB_SOURCE)
3939
endif()
4040
endif()
4141

42-
if(NO_CHIBIOS_SOURCE)
42+
if(NO_RTOS_SOURCE_FOLDER)
4343
# no CHIBIOS source specified, download it from it's repo
4444

4545
# check for Git (needed here for advanced warning to user if it's not installed)
@@ -93,21 +93,21 @@ else()
9393
# ChibiOS source was specified
9494

9595
# sanity check is source path exists
96-
if(EXISTS "${CHIBIOS_SOURCE}/")
97-
message(STATUS "RTOS is: ChibiOS (source from: ${CHIBIOS_SOURCE})")
96+
if(EXISTS "${RTOS_SOURCE_FOLDER}/")
97+
message(STATUS "RTOS is: ChibiOS (source from: ${RTOS_SOURCE_FOLDER})")
9898

9999
# check if we already have the sources, no need to copy again
100100
NF_DIRECTORY_EXISTS_NOT_EMPTY(${CMAKE_BINARY_DIR}/ChibiOS_Source/ SOURCE_EXISTS)
101101

102102
if(NOT ${SOURCE_EXISTS})
103-
file(COPY "${CHIBIOS_SOURCE}/" DESTINATION "${CMAKE_BINARY_DIR}/ChibiOS_Source")
103+
file(COPY "${RTOS_SOURCE_FOLDER}/" DESTINATION "${CMAKE_BINARY_DIR}/ChibiOS_Source")
104104
else()
105-
message(STATUS "Using local cache of ChibiOS source from ${CHIBIOS_SOURCE}")
105+
message(STATUS "Using local cache of ChibiOS source from ${RTOS_SOURCE_FOLDER}")
106106
endif()
107107

108108
set(CHIBIOS_INCLUDE_DIR ${CMAKE_BINARY_DIR}/ChibiOS_Source/include)
109109
else()
110-
message(FATAL_ERROR "Couldn't find ChibiOS source at ${CHIBIOS_SOURCE}/")
110+
message(FATAL_ERROR "Couldn't find ChibiOS source at ${RTOS_SOURCE_FOLDER}/")
111111
endif()
112112

113113
# add ChibiOS as external project

targets/CMSIS-OS/ChibiOS/MBN_QUAIL/cmake-variants.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
"TOOL_HEX2DFU_PREFIX": "<absolute-path-to-hex2dfu-mind-the-forward-slashes>",
3232
"RTOS": "CHIBIOS",
3333
"TARGET_SERIES": "STM32F4xx",
34-
"CHIBIOS_SOURCE": "",
35-
"CHIBIOS_BOARD": "MBN_QUAIL",
34+
"RTOS_SOURCE_FOLDER": "",
35+
"RTOS_BOARD": "MBN_QUAIL",
3636
"CHIBIOS_CONTRIB_REQUIRED": "OFF",
3737
"CHIBIOS_CONTRIB_SOURCE": "",
3838
"STM32_CUBE_PACKAGE_REQUIRED": "OFF",

targets/CMSIS-OS/ChibiOS/NETDUINO3_WIFI/cmake-variants.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"TOOL_HEX2DFU_PREFIX": "<absolute-path-to-hex2dfu-mind-the-forward-slashes>",
3232
"RTOS": "CHIBIOS",
3333
"TARGET_SERIES": "STM32F4xx",
34-
"CHIBIOS_SOURCE": "",
34+
"RTOS_SOURCE_FOLDER": "",
3535
"CHIBIOS_BOARD": "NETDUINO3_WIFI",
3636
"CHIBIOS_CONTRIB_REQUIRED": "OFF",
3737
"CHIBIOS_CONTRIB_SOURCE": "",

targets/CMSIS-OS/ChibiOS/ORGPAL_PALTHREE/cmake-variants.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"TOOL_HEX2DFU_PREFIX": "<absolute-path-to-hex2dfu-mind-the-forward-slashes>",
3232
"RTOS": "CHIBIOS",
3333
"TARGET_SERIES": "STM32F7xx",
34-
"CHIBIOS_SOURCE": "",
34+
"RTOS_SOURCE_FOLDER": "",
3535
"CHIBIOS_BOARD": "ORGPAL_PALTHREE",
3636
"CHIBIOS_CONTRIB_REQUIRED": "OFF",
3737
"CHIBIOS_CONTRIB_SOURCE": "",

targets/CMSIS-OS/ChibiOS/ST_NUCLEO64_F091RC/cmake-variants.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"TOOL_HEX2DFU_PREFIX": "<absolute-path-to-hex2dfu-mind-the-forward-slashes>",
3232
"TARGET_SERIES": "STM32F0xx",
3333
"RTOS": "CHIBIOS",
34-
"CHIBIOS_SOURCE": "",
34+
"RTOS_SOURCE_FOLDER": "",
3535
"CHIBIOS_BOARD": "ST_NUCLEO64_F091RC",
3636
"CHIBIOS_CONTRIB_REQUIRED": "OFF",
3737
"CHIBIOS_CONTRIB_SOURCE": "",

targets/CMSIS-OS/ChibiOS/ST_STM32F429I_DISCOVERY/cmake-variants.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"TOOL_HEX2DFU_PREFIX": "<absolute-path-to-hex2dfu-mind-the-forward-slashes>",
3232
"RTOS": "CHIBIOS",
3333
"TARGET_SERIES": "STM32F4xx",
34-
"CHIBIOS_SOURCE": "",
34+
"RTOS_SOURCE_FOLDER": "",
3535
"CHIBIOS_BOARD": "ST_STM32F429I_DISCOVERY",
3636
"CHIBIOS_CONTRIB_REQUIRED": "OFF",
3737
"CHIBIOS_CONTRIB_SOURCE": "",

targets/CMSIS-OS/ChibiOS/ST_STM32F769I_DISCOVERY/cmake-variants.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"TOOL_HEX2DFU_PREFIX": "<absolute-path-to-hex2dfu-mind-the-forward-slashes>",
3232
"RTOS": "CHIBIOS",
3333
"TARGET_SERIES": "STM32F7xx",
34-
"CHIBIOS_SOURCE": "",
34+
"RTOS_SOURCE_FOLDER": "",
3535
"CHIBIOS_BOARD": "ST_STM32F769I_DISCOVERY",
3636
"CHIBIOS_CONTRIB_REQUIRED": "OFF",
3737
"CHIBIOS_CONTRIB_SOURCE": "",

0 commit comments

Comments
 (0)