Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions CMake/binutils.ChibiOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ macro(nf_add_platform_dependencies target)
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})

if(CHIBIOS_COMMUNITY_TARGET)
if(IS_COMMUNITY_TARGET)
target_include_directories(NF_CoreCLR PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
Expand All @@ -152,7 +152,7 @@ macro(nf_add_platform_dependencies target)
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})

if(CHIBIOS_COMMUNITY_TARGET)
if(IS_COMMUNITY_TARGET)
target_include_directories(WireProtocol PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
Expand All @@ -174,7 +174,7 @@ macro(nf_add_platform_dependencies target)
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})

if(CHIBIOS_COMMUNITY_TARGET)
if(IS_COMMUNITY_TARGET)
target_include_directories(NF_Debugger PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
Expand All @@ -197,7 +197,7 @@ macro(nf_add_platform_dependencies target)
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})

if(CHIBIOS_COMMUNITY_TARGET)
if(IS_COMMUNITY_TARGET)
target_include_directories(NF_NativeAssemblies PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
Expand Down Expand Up @@ -226,7 +226,7 @@ macro(nf_add_platform_dependencies target)
${${TARGET_STM32_CUBE_PACKAGE}_CubePackage_INCLUDE_DIRS}
EXTRA_COMPILE_DEFINITIONS -DHAL_USE_MAC=TRUE)

if(CHIBIOS_COMMUNITY_TARGET)
if(IS_COMMUNITY_TARGET)
target_include_directories(NF_Network PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
Expand Down Expand Up @@ -258,7 +258,7 @@ macro(nf_add_platform_include_directories target)
${SPIFFS_INCLUDE_DIRS}
)

if(CHIBIOS_COMMUNITY_TARGET)
if(IS_COMMUNITY_TARGET)
target_include_directories(${target}.elf PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD}/nanoCLR)
Expand Down
37 changes: 36 additions & 1 deletion CMake/binutils.TI_SimpleLink.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ macro(nf_add_platform_dependencies target)
${TI_XDCTools_INCLUDE_DIR}
${TARGET_TI_SimpleLink_COMMON_INCLUDE_DIRS}
${TARGET_TI_SimpleLink_NANOCLR_INCLUDE_DIRS})

if(IS_COMMUNITY_TARGET)
target_include_directories(NF_CoreCLR PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}/nanoCLR)

endif()

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

Expand All @@ -121,6 +128,13 @@ macro(nf_add_platform_dependencies target)
${TARGET_TI_SimpleLink_COMMON_INCLUDE_DIRS}
${TARGET_TI_SimpleLink_NANOCLR_INCLUDE_DIRS})

if(IS_COMMUNITY_TARGET)
target_include_directories(WireProtocol PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}/nanoCLR)

endif()

add_dependencies(${target}.elf nano::WireProtocol)

if(NF_FEATURE_DEBUGGER)
Expand All @@ -132,6 +146,13 @@ macro(nf_add_platform_dependencies target)
${TARGET_TI_SimpleLink_NANOCLR_INCLUDE_DIRS})

add_dependencies(${target}.elf nano::NF_Debugger)

if(IS_COMMUNITY_TARGET)
target_include_directories(NF_Debugger PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}/nanoCLR)

endif()

endif()

Expand All @@ -142,7 +163,14 @@ macro(nf_add_platform_dependencies target)
${TI_XDCTools_INCLUDE_DIR}
${TARGET_TI_SimpleLink_COMMON_INCLUDE_DIRS}
${TARGET_TI_SimpleLink_NANOCLR_INCLUDE_DIRS})


if(IS_COMMUNITY_TARGET)
target_include_directories(NF_NativeAssemblies PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}/nanoCLR)

endif()

# add dependency from SysConfig and TI RTOS configs (this is required to make sure that the intermediate artifacts are generated in the proper order)
add_dependencies(COPY_TIRTOS_CONFIG SYSCONFIG_TASKS)
add_dependencies(TIRTOS_CONFIG COPY_TIRTOS_CONFIG)
Expand Down Expand Up @@ -185,6 +213,13 @@ macro(nf_add_platform_include_directories target)

)

if(IS_COMMUNITY_TARGET)
target_include_directories(${target}.elf PUBLIC
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}
${CMAKE_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD}/nanoCLR)

endif()

target_link_libraries(
${NANOCLR_PROJECT_NAME}.elf

Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,9 @@ endif()

#################################################################

# assume no community board... until proven otherwise
set(IS_COMMUNITY_TARGET FALSE CACHE INTERNAL "Community target flag")

#######################
# ChibiOS
if(RTOS_CHIBIOS_CHECK)
Expand Down Expand Up @@ -872,6 +875,9 @@ elseif(RTOS_TI_SIMPLELINK_CHECK)

# try to find board in the Community targets folder
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD})

# set flag for this being a community board
set(IS_COMMUNITY_TARGET TRUE CACHE INTERNAL "Community target flag")

# set target base location
set(TARGET_BASE_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/targets-community/TI_SimpleLink/${TARGET_BOARD})
Expand Down
5 changes: 1 addition & 4 deletions targets/ChibiOS/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,6 @@ include_directories( ${CMSIS_RTOS_INCLUDE_DIR})

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

# assume no community board... until proven otherwise
set(CHIBIOS_COMMUNITY_TARGET FALSE CACHE INTERNAL "Community target flag")

# start search in nanoFramework ChibiOS 'overlay' folder
if(EXISTS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/boards/${TARGET_BOARD})
# board found
Expand Down Expand Up @@ -349,7 +346,7 @@ else()
# try to find board in the Community targets folder
if(EXISTS ${CMAKE_SOURCE_DIR}/targets-community/ChibiOS/${TARGET_BOARD})
# set flag for this being a community board
set(CHIBIOS_COMMUNITY_TARGET TRUE CACHE INTERNAL "Community target flag")
set(IS_COMMUNITY_TARGET TRUE CACHE INTERNAL "Community target flag")


# check if the board definition files are available at the target folder
Expand Down
2 changes: 1 addition & 1 deletion targets/ChibiOS/_include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ list(APPEND TARGET_CHIBIOS_COMMON_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/targets/${RTO
set(TARGET_CHIBIOS_COMMON_INCLUDE_DIRS ${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS} CACHE INTERNAL "make global")

# add headers with target platform definitions and SWO
if(CHIBIOS_COMMUNITY_TARGET)
if(IS_COMMUNITY_TARGET)

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