Skip to content

Commit 52359c9

Browse files
authored
Work CI-CD (#2019)
***NO_CI***
1 parent e9df4a2 commit 52359c9

File tree

5 files changed

+50
-12
lines changed

5 files changed

+50
-12
lines changed

CMake/binutils.ChibiOS.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ macro(nf_add_platform_dependencies target)
133133
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
134134
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})
135135

136-
if(CHIBIOS_COMMUNITY_TARGET)
136+
if(IS_COMMUNITY_TARGET)
137137
target_include_directories(NF_CoreCLR PUBLIC
138138
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
139139
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
@@ -152,7 +152,7 @@ macro(nf_add_platform_dependencies target)
152152
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
153153
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})
154154

155-
if(CHIBIOS_COMMUNITY_TARGET)
155+
if(IS_COMMUNITY_TARGET)
156156
target_include_directories(WireProtocol PUBLIC
157157
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
158158
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
@@ -174,7 +174,7 @@ macro(nf_add_platform_dependencies target)
174174
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
175175
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})
176176

177-
if(CHIBIOS_COMMUNITY_TARGET)
177+
if(IS_COMMUNITY_TARGET)
178178
target_include_directories(NF_Debugger PUBLIC
179179
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
180180
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
@@ -197,7 +197,7 @@ macro(nf_add_platform_dependencies target)
197197
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
198198
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})
199199

200-
if(CHIBIOS_COMMUNITY_TARGET)
200+
if(IS_COMMUNITY_TARGET)
201201
target_include_directories(NF_NativeAssemblies PUBLIC
202202
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
203203
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
@@ -226,7 +226,7 @@ macro(nf_add_platform_dependencies target)
226226
${${TARGET_STM32_CUBE_PACKAGE}_CubePackage_INCLUDE_DIRS}
227227
EXTRA_COMPILE_DEFINITIONS -DHAL_USE_MAC=TRUE)
228228

229-
if(CHIBIOS_COMMUNITY_TARGET)
229+
if(IS_COMMUNITY_TARGET)
230230
target_include_directories(NF_Network PUBLIC
231231
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
232232
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
@@ -258,7 +258,7 @@ macro(nf_add_platform_include_directories target)
258258
${SPIFFS_INCLUDE_DIRS}
259259
)
260260

261-
if(CHIBIOS_COMMUNITY_TARGET)
261+
if(IS_COMMUNITY_TARGET)
262262
target_include_directories(${target}.elf PUBLIC
263263
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
264264
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)

CMake/binutils.TI_SimpleLink.cmake

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,13 @@ macro(nf_add_platform_dependencies target)
111111
${TI_XDCTools_INCLUDE_DIR}
112112
${TARGET_TI_SimpleLink_COMMON_INCLUDE_DIRS}
113113
${TARGET_TI_SimpleLink_NANOCLR_INCLUDE_DIRS})
114+
115+
if(IS_COMMUNITY_TARGET)
116+
target_include_directories(NF_CoreCLR PUBLIC
117+
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}
118+
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}/nanoCLR)
119+
120+
endif()
114121

115122
add_dependencies(${target}.elf nano::NF_CoreCLR)
116123

@@ -121,6 +128,13 @@ macro(nf_add_platform_dependencies target)
121128
${TARGET_TI_SimpleLink_COMMON_INCLUDE_DIRS}
122129
${TARGET_TI_SimpleLink_NANOCLR_INCLUDE_DIRS})
123130

131+
if(IS_COMMUNITY_TARGET)
132+
target_include_directories(WireProtocol PUBLIC
133+
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}
134+
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}/nanoCLR)
135+
136+
endif()
137+
124138
add_dependencies(${target}.elf nano::WireProtocol)
125139

126140
if(NF_FEATURE_DEBUGGER)
@@ -132,6 +146,13 @@ macro(nf_add_platform_dependencies target)
132146
${TARGET_TI_SimpleLink_NANOCLR_INCLUDE_DIRS})
133147

134148
add_dependencies(${target}.elf nano::NF_Debugger)
149+
150+
if(IS_COMMUNITY_TARGET)
151+
target_include_directories(NF_Debugger PUBLIC
152+
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}
153+
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}/nanoCLR)
154+
155+
endif()
135156

136157
endif()
137158

@@ -142,7 +163,14 @@ macro(nf_add_platform_dependencies target)
142163
${TI_XDCTools_INCLUDE_DIR}
143164
${TARGET_TI_SimpleLink_COMMON_INCLUDE_DIRS}
144165
${TARGET_TI_SimpleLink_NANOCLR_INCLUDE_DIRS})
145-
166+
167+
if(IS_COMMUNITY_TARGET)
168+
target_include_directories(NF_NativeAssemblies PUBLIC
169+
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}
170+
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}/nanoCLR)
171+
172+
endif()
173+
146174
# add dependency from SysConfig and TI RTOS configs (this is required to make sure that the intermediate artifacts are generated in the proper order)
147175
add_dependencies(COPY_TIRTOS_CONFIG SYSCONFIG_TASKS)
148176
add_dependencies(TIRTOS_CONFIG COPY_TIRTOS_CONFIG)
@@ -185,6 +213,13 @@ macro(nf_add_platform_include_directories target)
185213

186214
)
187215

216+
if(IS_COMMUNITY_TARGET)
217+
target_include_directories(${target}.elf PUBLIC
218+
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}
219+
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}/nanoCLR)
220+
221+
endif()
222+
188223
target_link_libraries(
189224
${NANOCLR_PROJECT_NAME}.elf
190225

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,9 @@ endif()
770770

771771
#################################################################
772772

773+
# assume no community board... until proven otherwise
774+
set(IS_COMMUNITY_TARGET FALSE CACHE INTERNAL "Community target flag")
775+
773776
#######################
774777
# ChibiOS
775778
if(RTOS_CHIBIOS_CHECK)
@@ -872,6 +875,9 @@ elseif(RTOS_TI_SIMPLELINK_CHECK)
872875

873876
# try to find board in the Community targets folder
874877
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD})
878+
879+
# set flag for this being a community board
880+
set(IS_COMMUNITY_TARGET TRUE CACHE INTERNAL "Community target flag")
875881

876882
# set target base location
877883
set(TARGET_BASE_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD})

targets/ChibiOS/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,6 @@ include_directories( ${CMSIS_RTOS_INCLUDE_DIR})
305305

306306
# need to find board definition files (board.c and board.h)
307307

308-
# assume no community board... until proven otherwise
309-
set(CHIBIOS_COMMUNITY_TARGET FALSE CACHE INTERNAL "Community target flag")
310-
311308
# start search in nanoFramework ChibiOS 'overlay' folder
312309
if(EXISTS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/boards/${TARGET_BOARD})
313310
# board found
@@ -349,7 +346,7 @@ else()
349346
# try to find board in the Community targets folder
350347
if(EXISTS ${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD})
351348
# set flag for this being a community board
352-
set(CHIBIOS_COMMUNITY_TARGET TRUE CACHE INTERNAL "Community target flag")
349+
set(IS_COMMUNITY_TARGET TRUE CACHE INTERNAL "Community target flag")
353350

354351

355352
# check if the board definition files are available at the target folder

targets/ChibiOS/_include/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ list(APPEND TARGET_CHIBIOS_COMMON_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/targets/${RTO
1111
set(TARGET_CHIBIOS_COMMON_INCLUDE_DIRS ${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS} CACHE INTERNAL "make global")
1212

1313
# add headers with target platform definitions and SWO
14-
if(CHIBIOS_COMMUNITY_TARGET)
14+
if(IS_COMMUNITY_TARGET)
1515

1616
configure_file(${CMAKE_SOURCE_DIR}/CMake/ChibiOS_target_os.h.in
1717
${CMAKE_BINARY_DIR}/targets/${RTOS}/${TARGET_BOARD}/target_os.h @ONLY)

0 commit comments

Comments
 (0)