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
38 changes: 37 additions & 1 deletion CMake/binutils.ChibiOS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,15 @@ macro(nf_add_platform_dependencies target)
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})

if(CHIBIOS_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)

endif()

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

nf_add_lib_wireprotocol(
EXTRA_INCLUDES
${CHIBIOS_INCLUDE_DIRS}
Expand All @@ -143,7 +151,14 @@ macro(nf_add_platform_dependencies target)
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})


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

endif()

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

if(NF_FEATURE_DEBUGGER)
Expand All @@ -159,6 +174,13 @@ macro(nf_add_platform_dependencies target)
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})

if(CHIBIOS_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)

endif()

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

endif()
Expand All @@ -175,6 +197,13 @@ macro(nf_add_platform_dependencies target)
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
${chibios_SOURCE_DIR}/os/hal/boards/${TARGET_BOARD})

if(CHIBIOS_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)

endif()

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

# nF feature: networking
Expand Down Expand Up @@ -221,6 +250,13 @@ macro(nf_add_platform_include_directories target)
${CHIBIOS_LWIP_INCLUDE_DIRS}
${SPIFFS_INCLUDE_DIRS}
)

if(CHIBIOS_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)

endif()

# includes specific to nanoBooter
if(${target} STREQUAL ${NANOBOOTER_PROJECT_NAME})
Expand Down
2 changes: 1 addition & 1 deletion CMake/binutils.common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ macro(nf_add_common_dependencies target)
if("${target}" STREQUAL "${NANOCLR_PROJECT_NAME}")

configure_file(${BASE_PATH_FOR_CLASS_LIBRARIES_MODULES}/target_platform.h.in
${CMAKE_CURRENT_BINARY_DIR}/target_platform.h @ONLY)
${CMAKE_BINARY_DIR}/targets/${RTOS}/${TARGET_BOARD}/target_platform.h @ONLY)

endif()

Expand Down