Родитель
9983c02db2
Коммит
fbe1dd3141
|
@ -3,54 +3,14 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(binutils.common)
|
||||
include(binutils.ChibiOS)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOBOOTER_PROJECT_NAME "nanoBooter")
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(CHIBIOS REQUIRED)
|
||||
find_package(ChibiOSnfOverlay REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# ChibiOS contrib repo
|
||||
if(CHIBIOS_CONTRIB_REQUIRED)
|
||||
find_package(ChibiOS-Contrib REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: networking
|
||||
if(USE_NETWORKING_OPTION)
|
||||
find_package(CHIBIOS_LWIP REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: filesystem
|
||||
if(USE_FILESYSTEM_OPTION)
|
||||
find_package(CHIBIOS_FATFS REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
|
@ -64,115 +24,29 @@ add_subdirectory("nanoCLR")
|
|||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOBOOTER_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager_stubs.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOBOOTER_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOBOOTER_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
)
|
||||
|
||||
NF_ADD_COMMON_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoBooter
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
||||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOCLR_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${CHIBIOS_CONTRIB_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
# add dependency from ChibiOS (this is required to make sure the ChibiOS repo is downloaded before the build starts)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf ChibiOS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf ChibiOS)
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${CHIBIOS_INCLUDE_DIRS}
|
||||
${ChibiOSnfOverlay_INCLUDE_DIRS}
|
||||
${CHIBIOS_CONTRIB_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TARGET_CMSIS_COMMON_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# include directories for nanoBooter
|
||||
target_include_directories(${NANOBOOTER_PROJECT_NAME}.elf PUBLIC
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter
|
||||
|
||||
${TARGET_CMSIS_NANOBOOTER_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_CMSIS_NANOCLR_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
|
@ -217,15 +91,15 @@ if(HEX2DFU_TOOL_AVAILABLE)
|
|||
####################################################################################################
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||
NF_GENERATE_DFU_PACKAGE(
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08008000
|
||||
${PROJECT_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08008000
|
||||
${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
|
||||
)
|
||||
else()
|
||||
NF_GENERATE_DFU_PACKAGE(
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08004000
|
||||
${PROJECT_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08004000
|
||||
${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_adc_native_target.h"
|
||||
#include <win_dev_adc_native_target.h>
|
||||
|
||||
|
||||
const NF_PAL_ADC_PORT_PIN_CHANNEL AdcPortPinConfig[] = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_i2c_native_target.h"
|
||||
#include <win_dev_i2c_native_target.h>
|
||||
|
||||
//////////
|
||||
// I2C1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_windows_devices_serialcommunication_config.h"
|
||||
#include "win_dev_serial_native_target.h"
|
||||
#include <win_dev_serial_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART1 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_spi_native_target.h"
|
||||
#include <win_dev_spi_native_target.h>
|
||||
|
||||
//////////
|
||||
// SPI1 //
|
||||
|
|
|
@ -3,54 +3,14 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(binutils.common)
|
||||
include(binutils.ChibiOS)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOBOOTER_PROJECT_NAME "nanoBooter")
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(CHIBIOS REQUIRED)
|
||||
find_package(ChibiOSnfOverlay REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# ChibiOS contrib repo
|
||||
if(CHIBIOS_CONTRIB_REQUIRED)
|
||||
find_package(ChibiOS-Contrib REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: networking
|
||||
if(USE_NETWORKING_OPTION)
|
||||
find_package(CHIBIOS_LWIP REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: filesystem
|
||||
if(USE_FILESYSTEM_OPTION)
|
||||
find_package(CHIBIOS_FATFS REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
|
@ -64,115 +24,29 @@ add_subdirectory("nanoCLR")
|
|||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOBOOTER_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager_stubs.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOBOOTER_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOBOOTER_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
)
|
||||
|
||||
NF_ADD_COMMON_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoBooter
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
||||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOCLR_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${CHIBIOS_CONTRIB_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
# add dependency from ChibiOS (this is required to make sure the ChibiOS repo is downloaded before the build starts)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf ChibiOS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf ChibiOS)
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${CHIBIOS_INCLUDE_DIRS}
|
||||
${ChibiOSnfOverlay_INCLUDE_DIRS}
|
||||
${CHIBIOS_CONTRIB_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TARGET_CMSIS_COMMON_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# include directories for nanoBooter
|
||||
target_include_directories(${NANOBOOTER_PROJECT_NAME}.elf PUBLIC
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter
|
||||
|
||||
${TARGET_CMSIS_NANOBOOTER_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_CMSIS_NANOCLR_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
|
@ -208,9 +82,9 @@ if(HEX2DFU_TOOL_AVAILABLE)
|
|||
## DO NOT use the leading 0x notation, just the address in plain hexadecimal formating ##
|
||||
####################################################################################################
|
||||
NF_GENERATE_DFU_PACKAGE(
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08008000
|
||||
${PROJECT_SOURCE_DIR}/build/nanoframework-4-electron.dfu
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08008000
|
||||
${CMAKE_SOURCE_DIR}/build/nanoframework-4-electron.dfu
|
||||
)
|
||||
|
||||
endif()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_adc_native_target.h"
|
||||
#include <win_dev_adc_native_target.h>
|
||||
|
||||
|
||||
const NF_PAL_ADC_PORT_PIN_CHANNEL AdcPortPinConfig[] = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_i2c_native_target.h"
|
||||
#include <Windows.Devices.I2c/win_dev_i2c_native_target.h>
|
||||
|
||||
//////////
|
||||
// I2C1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_windows_devices_serialcommunication_config.h"
|
||||
#include "win_dev_serial_native_target.h"
|
||||
#include <win_dev_serial_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART2 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_spi_native_target.h"
|
||||
#include <Windows.Devices.Spi/win_dev_spi_native_target.h>
|
||||
|
||||
//////////
|
||||
// SPI1 //
|
||||
|
|
|
@ -3,54 +3,14 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(binutils.common)
|
||||
include(binutils.ChibiOS)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOBOOTER_PROJECT_NAME "nanoBooter")
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(CHIBIOS REQUIRED)
|
||||
find_package(ChibiOSnfOverlay REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# ChibiOS contrib repo
|
||||
if(CHIBIOS_CONTRIB_REQUIRED)
|
||||
find_package(ChibiOS-Contrib REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: networking
|
||||
if(USE_NETWORKING_OPTION)
|
||||
find_package(CHIBIOS_LWIP REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: filesystem
|
||||
if(USE_FILESYSTEM_OPTION)
|
||||
find_package(CHIBIOS_FATFS REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
|
@ -64,115 +24,29 @@ add_subdirectory("nanoCLR")
|
|||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOBOOTER_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager_stubs.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOBOOTER_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOBOOTER_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
)
|
||||
|
||||
NF_ADD_COMMON_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoBooter
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
||||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOCLR_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${CHIBIOS_CONTRIB_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
# add dependency from ChibiOS (this is required to make sure the ChibiOS repo is downloaded before the build starts)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf ChibiOS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf ChibiOS)
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${CHIBIOS_INCLUDE_DIRS}
|
||||
${ChibiOSnfOverlay_INCLUDE_DIRS}
|
||||
${CHIBIOS_CONTRIB_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TARGET_CMSIS_COMMON_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# include directories for nanoBooter
|
||||
target_include_directories(${NANOBOOTER_PROJECT_NAME}.elf PUBLIC
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter
|
||||
|
||||
${TARGET_CMSIS_NANOBOOTER_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_CMSIS_NANOCLR_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
|
@ -214,15 +88,15 @@ if(HEX2DFU_TOOL_AVAILABLE)
|
|||
####################################################################################################
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||
NF_GENERATE_DFU_PACKAGE(
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08008000
|
||||
${PROJECT_SOURCE_DIR}/build/nanoframework-4-oxygen.dfu
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08008000
|
||||
${CMAKE_SOURCE_DIR}/build/nanoframework-4-oxygen.dfu
|
||||
)
|
||||
else()
|
||||
NF_GENERATE_DFU_PACKAGE(
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08004000
|
||||
${PROJECT_SOURCE_DIR}/build/nanoframework-4-oxygen.dfu
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08004000
|
||||
${CMAKE_SOURCE_DIR}/build/nanoframework-4-oxygen.dfu
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_adc_native_target.h"
|
||||
#include <win_dev_adc_native_target.h>
|
||||
|
||||
|
||||
const NF_PAL_ADC_PORT_PIN_CHANNEL AdcPortPinConfig[] = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_i2c_native_target.h"
|
||||
#include <Windows.Devices.I2c/win_dev_i2c_native_target.h>
|
||||
|
||||
//////////
|
||||
// I2C1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_windows_devices_serialcommunication_config.h"
|
||||
#include "win_dev_serial_native_target.h"
|
||||
#include <win_dev_serial_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART1 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_spi_native_target.h"
|
||||
#include <Windows.Devices.Spi/win_dev_spi_native_target.h>
|
||||
|
||||
//////////
|
||||
// SPI1 //
|
||||
|
|
|
@ -3,55 +3,14 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(binutils.common)
|
||||
include(binutils.ChibiOS)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOBOOTER_PROJECT_NAME "nanoBooter")
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(CHIBIOS REQUIRED)
|
||||
find_package(ChibiOSnfOverlay REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# ChibiOS contrib repo
|
||||
if(CHIBIOS_CONTRIB_REQUIRED)
|
||||
find_package(ChibiOS-Contrib REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: networking
|
||||
if(USE_NETWORKING_OPTION)
|
||||
find_package(CHIBIOS_LWIP REQUIRED)
|
||||
find_package(NF_Networking REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: filesystem
|
||||
if(USE_FILESYSTEM_OPTION)
|
||||
find_package(CHIBIOS_FATFS REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
|
@ -65,125 +24,29 @@ add_subdirectory("nanoCLR")
|
|||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOBOOTER_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager_stubs.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOBOOTER_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOBOOTER_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
)
|
||||
|
||||
NF_ADD_COMMON_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoBooter
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
||||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager_stubs.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOCLR_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${CHIBIOS_CONTRIB_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for nanoFramework Network LWIP and Sockets
|
||||
"${CHIBIOS_LWIP_SOURCES}"
|
||||
${NF_Networking_SOURCES}
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
# add dependency from ChibiOS (this is required to make sure the ChibiOS repo is downloaded before the build starts)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf ChibiOS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf ChibiOS)
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${CHIBIOS_INCLUDE_DIRS}
|
||||
${ChibiOSnfOverlay_INCLUDE_DIRS}
|
||||
${CHIBIOS_CONTRIB_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TARGET_CMSIS_COMMON_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# include directories for nanoBooter
|
||||
target_include_directories(${NANOBOOTER_PROJECT_NAME}.elf PUBLIC
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter
|
||||
|
||||
${TARGET_CMSIS_NANOBOOTER_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_CMSIS_NANOCLR_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
|
||||
# incudes for Networking
|
||||
${NF_Networking_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_adc_native_target.h"
|
||||
#include <win_dev_adc_native_target.h>
|
||||
|
||||
const NF_PAL_ADC_PORT_PIN_CHANNEL AdcPortPinConfig[] = {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_i2c_native_target.h"
|
||||
#include <Windows.Devices.I2c/win_dev_i2c_native_target.h>
|
||||
|
||||
//////////
|
||||
// I2C1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_windows_devices_serialcommunication_config.h"
|
||||
#include "win_dev_serial_native_target.h"
|
||||
#include <win_dev_serial_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART2 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_spi_native_target.h"
|
||||
#include <Windows.Devices.Spi/win_dev_spi_native_target.h>
|
||||
|
||||
//////////
|
||||
// SPI1 //
|
||||
|
|
|
@ -3,60 +3,14 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(binutils.common)
|
||||
include(binutils.ChibiOS)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOBOOTER_PROJECT_NAME "nanoBooter")
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(CHIBIOS REQUIRED)
|
||||
find_package(ChibiOSnfOverlay REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# ChibiOS contrib repo
|
||||
if(CHIBIOS_CONTRIB_REQUIRED)
|
||||
find_package(ChibiOS-Contrib REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: networking
|
||||
if(USE_NETWORKING_OPTION)
|
||||
find_package(CHIBIOS_LWIP REQUIRED)
|
||||
find_package(NF_Networking REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: filesystem
|
||||
if(USE_FILESYSTEM_OPTION)
|
||||
find_package(CHIBIOS_FATFS REQUIRED)
|
||||
endif()
|
||||
|
||||
# security provider is mbedTLS
|
||||
if(USE_SECURITY_MBEDTLS_OPTION)
|
||||
find_package(mbedTLS REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
|
@ -70,157 +24,34 @@ add_subdirectory("nanoCLR")
|
|||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOBOOTER_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOBOOTER_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOBOOTER_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
)
|
||||
|
||||
NF_ADD_COMMON_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoBooter
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
||||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOCLR_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${CHIBIOS_CONTRIB_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for ChibiOS FatFS
|
||||
${CHIBIOS_FATFS_SOURCES}
|
||||
|
||||
# sources for nanoFramework Network LWIP, Sockets and TLS
|
||||
"${CHIBIOS_LWIP_SOURCES}"
|
||||
${NF_Networking_SOURCES}
|
||||
"${mbedTLS_SOURCES}"
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
# add dependency from ChibiOS (this is required to make sure the ChibiOS repo is downloaded before the build starts)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf ChibiOS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf ChibiOS)
|
||||
|
||||
# add dependencies from CHIBIOS_NETWORK_COMPONENTS (this is required to make sure that ChibiOS network components are unzip at the proper locations before the build starts)
|
||||
# only required if networking in ON
|
||||
if(USE_NETWORKING_OPTION)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf CHIBIOS_NETWORK_COMPONENTS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf CHIBIOS_NETWORK_COMPONENTS)
|
||||
|
||||
# add dependency for security provider mbedTLS
|
||||
if(USE_SECURITY_MBEDTLS_OPTION)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf mbedTLS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${CHIBIOS_INCLUDE_DIRS}
|
||||
${ChibiOSnfOverlay_INCLUDE_DIRS}
|
||||
${CHIBIOS_CONTRIB_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TARGET_CMSIS_COMMON_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# include directories for nanoBooter
|
||||
target_include_directories(${NANOBOOTER_PROJECT_NAME}.elf PUBLIC
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter
|
||||
|
||||
${TARGET_CMSIS_NANOBOOTER_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_INCLUDE_DIRS}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_CMSIS_NANOCLR_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
|
||||
# includes for ChibiOS FatFS
|
||||
${CHIBIOS_FATFS_INCLUDE_DIRS}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
|
||||
# incudes for Networking and TLS
|
||||
${NF_Networking_INCLUDE_DIRS}
|
||||
${mbedTLS_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
nf_set_compiler_options(${NANOCLR_PROJECT_NAME}.elf)
|
||||
|
||||
# mbed TLS requires a config file
|
||||
if(USE_SECURITY_MBEDTLS_OPTION)
|
||||
# this seems to be only option to properly set a compiler define through the command line that needs to be a string literal
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBEDTLS_CONFIG_FILE=\"<${PROJECT_SOURCE_DIR}/src/PAL/COM/sockets/ssl/mbedTLS/nf_mbedtls_config.h>\"")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBEDTLS_CONFIG_FILE=\"<${PROJECT_SOURCE_DIR}/src/PAL/COM/sockets/ssl/mbedTLS/nf_mbedtls_config.h>\"")
|
||||
endif()
|
||||
|
||||
# set compiler definitions
|
||||
nf_set_compiler_definitions(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
nf_set_compiler_definitions(${NANOCLR_PROJECT_NAME}.elf)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_adc_native_target.h"
|
||||
#include <win_dev_adc_native_target.h>
|
||||
|
||||
const NF_PAL_ADC_PORT_PIN_CHANNEL AdcPortPinConfig[] = {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_i2c_native_target.h"
|
||||
#include <Windows.Devices.I2c/win_dev_i2c_native_target.h>
|
||||
|
||||
//////////
|
||||
// I2C1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_windows_devices_serialcommunication_config.h"
|
||||
#include "win_dev_serial_native_target.h"
|
||||
#include <win_dev_serial_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART1 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_spi_native_target.h"
|
||||
#include <Windows.Devices.Spi/win_dev_spi_native_target.h>
|
||||
|
||||
//////////
|
||||
// SPI5 //
|
||||
|
|
|
@ -3,60 +3,14 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(binutils.common)
|
||||
include(binutils.ChibiOS)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOBOOTER_PROJECT_NAME "nanoBooter")
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(CHIBIOS REQUIRED)
|
||||
find_package(ChibiOSnfOverlay REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# ChibiOS contrib repo
|
||||
if(CHIBIOS_CONTRIB_REQUIRED)
|
||||
find_package(ChibiOS-Contrib REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: networking
|
||||
if(USE_NETWORKING_OPTION)
|
||||
find_package(CHIBIOS_LWIP REQUIRED)
|
||||
find_package(NF_Networking REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: filesystem
|
||||
if(USE_FILESYSTEM_OPTION)
|
||||
find_package(CHIBIOS_FATFS REQUIRED)
|
||||
endif()
|
||||
|
||||
# security provider is mbedTLS
|
||||
if(USE_SECURITY_MBEDTLS_OPTION)
|
||||
find_package(mbedTLS REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
|
@ -71,150 +25,36 @@ add_executable(
|
|||
# executables for project, project sources
|
||||
${NANOBOOTER_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOBOOTER_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOBOOTER_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
${CMAKE_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager.c
|
||||
)
|
||||
|
||||
NF_ADD_COMMON_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoBooter
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
||||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOCLR_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${CHIBIOS_CONTRIB_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for nanoFramework Network LWIP, Sockets and TLS
|
||||
"${CHIBIOS_LWIP_SOURCES}"
|
||||
${NF_Networking_SOURCES}
|
||||
"${mbedTLS_SOURCES}"
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
# add dependency from ChibiOS (this is required to make sure the ChibiOS repo is downloaded before the build starts)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf ChibiOS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf ChibiOS)
|
||||
|
||||
# add dependencies from CHIBIOS_NETWORK_COMPONENTS (this is required to make sure that ChibiOS network components are unzip at the proper locations before the build starts)
|
||||
# only required if networking in ON
|
||||
if(USE_NETWORKING_OPTION)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf CHIBIOS_NETWORK_COMPONENTS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf CHIBIOS_NETWORK_COMPONENTS)
|
||||
|
||||
# add dependency for security provider mbedTLS
|
||||
if(USE_SECURITY_MBEDTLS_OPTION)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf mbedTLS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${CHIBIOS_INCLUDE_DIRS}
|
||||
${ChibiOSnfOverlay_INCLUDE_DIRS}
|
||||
${CHIBIOS_CONTRIB_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TARGET_CMSIS_COMMON_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# include directories for nanoBooter
|
||||
target_include_directories(${NANOBOOTER_PROJECT_NAME}.elf PUBLIC
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter
|
||||
|
||||
${TARGET_CMSIS_NANOBOOTER_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_INCLUDE_DIRS}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_CMSIS_NANOCLR_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
|
||||
# incudes for Networking and TLS
|
||||
${NF_Networking_INCLUDE_DIRS}
|
||||
${mbedTLS_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
nf_set_compiler_options(${NANOCLR_PROJECT_NAME}.elf)
|
||||
|
||||
# mbed TLS requires a config file
|
||||
if(USE_SECURITY_MBEDTLS_OPTION)
|
||||
# this seems to be only option to properly set a compiler define through the command line that needs to be a string literal
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBEDTLS_CONFIG_FILE=\"<${PROJECT_SOURCE_DIR}/src/PAL/COM/sockets/ssl/mbedTLS/nf_mbedtls_config.h>\"")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBEDTLS_CONFIG_FILE=\"<${PROJECT_SOURCE_DIR}/src/PAL/COM/sockets/ssl/mbedTLS/nf_mbedtls_config.h>\"")
|
||||
endif()
|
||||
|
||||
# set compiler definitions
|
||||
nf_set_compiler_definitions(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
nf_set_compiler_definitions(${NANOCLR_PROJECT_NAME}.elf)
|
||||
|
@ -252,15 +92,15 @@ if(HEX2DFU_TOOL_AVAILABLE)
|
|||
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||
NF_GENERATE_DFU_PACKAGE(
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08010000
|
||||
${PROJECT_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08010000
|
||||
${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
|
||||
)
|
||||
else()
|
||||
NF_GENERATE_DFU_PACKAGE(
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${PROJECT_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08010000
|
||||
${PROJECT_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOBOOTER_PROJECT_NAME}.bin 08000000
|
||||
${CMAKE_SOURCE_DIR}/build/${NANOCLR_PROJECT_NAME}.bin 08010000
|
||||
${CMAKE_SOURCE_DIR}/build/nanobooter-nanoclr.dfu
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_nf_devices_onewire_config.h"
|
||||
#include <nf_devices_onewire_native_target.h>
|
||||
#include <nanoFramework.Devices.OneWire/nf_devices_onewire_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART4 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_adc_native_target.h"
|
||||
#include <win_dev_adc_native_target.h>
|
||||
|
||||
const NF_PAL_ADC_PORT_PIN_CHANNEL AdcPortPinConfig[] = {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_i2c_native_target.h"
|
||||
#include <Windows.Devices.I2c/win_dev_i2c_native_target.h>
|
||||
|
||||
//////////
|
||||
// I2C1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_windows_devices_serialcommunication_config.h"
|
||||
#include "win_dev_serial_native_target.h"
|
||||
#include <win_dev_serial_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART2 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_spi_native_target.h"
|
||||
#include <Windows.Devices.Spi/win_dev_spi_native_target.h>
|
||||
|
||||
//////////
|
||||
// SPI5 //
|
||||
|
|
|
@ -3,54 +3,14 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(binutils.common)
|
||||
include(binutils.ChibiOS)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOBOOTER_PROJECT_NAME "nanoBooter")
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(CHIBIOS REQUIRED)
|
||||
find_package(ChibiOSnfOverlay REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# ChibiOS contrib repo
|
||||
if(CHIBIOS_CONTRIB_REQUIRED)
|
||||
find_package(ChibiOS-Contrib REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: networking
|
||||
if(USE_NETWORKING_OPTION)
|
||||
find_package(CHIBIOS_LWIP REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: filesystem
|
||||
if(USE_FILESYSTEM_OPTION)
|
||||
find_package(CHIBIOS_FATFS REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
|
@ -64,115 +24,29 @@ add_subdirectory("nanoCLR")
|
|||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOBOOTER_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager_stubs.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOBOOTER_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOBOOTER_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
)
|
||||
|
||||
NF_ADD_COMMON_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoBooter
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
||||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOCLR_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${CHIBIOS_CONTRIB_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
# add dependency from ChibiOS (this is required to make sure the ChibiOS repo is downloaded before the build starts)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf ChibiOS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf ChibiOS)
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${CHIBIOS_INCLUDE_DIRS}
|
||||
${ChibiOSnfOverlay_INCLUDE_DIRS}
|
||||
${CHIBIOS_CONTRIB_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TARGET_CMSIS_COMMON_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# include directories for nanoBooter
|
||||
target_include_directories(${NANOBOOTER_PROJECT_NAME}.elf PUBLIC
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter
|
||||
|
||||
${TARGET_CMSIS_NANOBOOTER_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_CMSIS_NANOCLR_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_nf_devices_onewire_config.h"
|
||||
#include <nf_devices_onewire_native_target.h>
|
||||
#include <nanoFramework.Devices.OneWire/nf_devices_onewire_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART1 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_adc_native_target.h"
|
||||
#include <win_dev_adc_native_target.h>
|
||||
|
||||
|
||||
const NF_PAL_ADC_PORT_PIN_CHANNEL AdcPortPinConfig[] = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_i2c_native_target.h"
|
||||
#include <Windows.Devices.I2c/win_dev_i2c_native_target.h>
|
||||
|
||||
//////////
|
||||
// I2C1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_windows_devices_serialcommunication_config.h"
|
||||
#include "win_dev_serial_native_target.h"
|
||||
#include <win_dev_serial_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART6 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_spi_native_target.h"
|
||||
#include <Windows.Devices.Spi/win_dev_spi_native_target.h>
|
||||
|
||||
//////////
|
||||
// SPI2 //
|
||||
|
|
|
@ -3,54 +3,14 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(binutils.common)
|
||||
include(binutils.ChibiOS)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOBOOTER_PROJECT_NAME "nanoBooter")
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(CHIBIOS REQUIRED)
|
||||
find_package(ChibiOSnfOverlay REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# ChibiOS contrib repo
|
||||
if(CHIBIOS_CONTRIB_REQUIRED)
|
||||
find_package(ChibiOS-Contrib REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: networking
|
||||
if(USE_NETWORKING_OPTION)
|
||||
find_package(CHIBIOS_LWIP REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: filesystem
|
||||
if(USE_FILESYSTEM_OPTION)
|
||||
find_package(CHIBIOS_FATFS REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
|
@ -64,115 +24,29 @@ add_subdirectory("nanoCLR")
|
|||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOBOOTER_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager_stubs.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOBOOTER_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOBOOTER_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
)
|
||||
|
||||
NF_ADD_COMMON_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoBooter
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
||||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOCLR_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${CHIBIOS_CONTRIB_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
# add dependency from ChibiOS (this is required to make sure the ChibiOS repo is downloaded before the build starts)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf ChibiOS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf ChibiOS)
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${CHIBIOS_INCLUDE_DIRS}
|
||||
${ChibiOSnfOverlay_INCLUDE_DIRS}
|
||||
${CHIBIOS_CONTRIB_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TARGET_CMSIS_COMMON_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# include directories for nanoBooter
|
||||
target_include_directories(${NANOBOOTER_PROJECT_NAME}.elf PUBLIC
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter
|
||||
|
||||
${TARGET_CMSIS_NANOBOOTER_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_CMSIS_NANOCLR_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_adc_native_target.h"
|
||||
#include <win_dev_adc_native_target.h>
|
||||
|
||||
const NF_PAL_ADC_PORT_PIN_CHANNEL AdcPortPinConfig[] = {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_i2c_native_target.h"
|
||||
#include <Windows.Devices.I2c/win_dev_i2c_native_target.h>
|
||||
|
||||
//////////
|
||||
// I2C1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_windows_devices_serialcommunication_config.h"
|
||||
#include "win_dev_serial_native_target.h"
|
||||
#include <win_dev_serial_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART1 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_spi_native_target.h"
|
||||
#include <Windows.Devices.Spi/win_dev_spi_native_target.h>
|
||||
|
||||
//////////
|
||||
// SPI2 //
|
||||
|
|
|
@ -3,54 +3,14 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(binutils.common)
|
||||
include(binutils.ChibiOS)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOBOOTER_PROJECT_NAME "nanoBooter")
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(CHIBIOS REQUIRED)
|
||||
find_package(ChibiOSnfOverlay REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# ChibiOS contrib repo
|
||||
if(CHIBIOS_CONTRIB_REQUIRED)
|
||||
find_package(ChibiOS-Contrib REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: networking
|
||||
if(USE_NETWORKING_OPTION)
|
||||
find_package(CHIBIOS_LWIP REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: filesystem
|
||||
if(USE_FILESYSTEM_OPTION)
|
||||
find_package(CHIBIOS_FATFS REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
|
@ -64,115 +24,29 @@ add_subdirectory("nanoCLR")
|
|||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOBOOTER_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager_stubs.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOBOOTER_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOBOOTER_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
)
|
||||
|
||||
NF_ADD_COMMON_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoBooter
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
||||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOCLR_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${CHIBIOS_CONTRIB_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
# add dependency from ChibiOS (this is required to make sure the ChibiOS repo is downloaded before the build starts)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf ChibiOS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf ChibiOS)
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${CHIBIOS_INCLUDE_DIRS}
|
||||
${ChibiOSnfOverlay_INCLUDE_DIRS}
|
||||
${CHIBIOS_CONTRIB_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TARGET_CMSIS_COMMON_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# include directories for nanoBooter
|
||||
target_include_directories(${NANOBOOTER_PROJECT_NAME}.elf PUBLIC
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter
|
||||
|
||||
${TARGET_CMSIS_NANOBOOTER_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_CMSIS_NANOCLR_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_adc_native_target.h"
|
||||
#include <win_dev_adc_native_target.h>
|
||||
|
||||
const NF_PAL_ADC_PORT_PIN_CHANNEL AdcPortPinConfig[] = {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_i2c_native_target.h"
|
||||
#include <Windows.Devices.I2c/win_dev_i2c_native_target.h>
|
||||
|
||||
//////////
|
||||
// I2C1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_windows_devices_serialcommunication_config.h"
|
||||
#include "win_dev_serial_native_target.h"
|
||||
#include <win_dev_serial_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART1 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_spi_native_target.h"
|
||||
#include <Windows.Devices.Spi/win_dev_spi_native_target.h>
|
||||
|
||||
//////////
|
||||
// SPI1 //
|
||||
|
|
|
@ -3,54 +3,14 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
include(binutils.common)
|
||||
include(binutils.ChibiOS)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOBOOTER_PROJECT_NAME "nanoBooter")
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(CHIBIOS REQUIRED)
|
||||
find_package(ChibiOSnfOverlay REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# ChibiOS contrib repo
|
||||
if(CHIBIOS_CONTRIB_REQUIRED)
|
||||
find_package(ChibiOS-Contrib REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: networking
|
||||
if(USE_NETWORKING_OPTION)
|
||||
find_package(CHIBIOS_LWIP REQUIRED)
|
||||
endif()
|
||||
|
||||
# nF feature: filesystem
|
||||
if(USE_FILESYSTEM_OPTION)
|
||||
find_package(CHIBIOS_FATFS REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
|
@ -64,115 +24,29 @@ add_subdirectory("nanoCLR")
|
|||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOBOOTER_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_BlockStorage.c"
|
||||
|
||||
# need to add configuration manager to allow get/store configuration blocks
|
||||
"${PROJECT_SOURCE_DIR}/src/HAL/nanoHAL_ConfigurationManager_stubs.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOBOOTER_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOBOOTER_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
)
|
||||
|
||||
NF_ADD_COMMON_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoBooter
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOBOOTER_PROJECT_NAME})
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
||||
add_executable(
|
||||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/target_common.c"
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_CMSIS_COMMON_SOURCES}
|
||||
${TARGET_CMSIS_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_CHIBIOS_COMMON_SOURCES}
|
||||
${TARGET_CHIBIOS_NANOCLR_SOURCES}
|
||||
|
||||
${CHIBIOS_SOURCES}
|
||||
${CHIBIOS_CONTRIB_SOURCES}
|
||||
${ChibiOSnfOverlay_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
# add dependency from ChibiOS (this is required to make sure the ChibiOS repo is downloaded before the build starts)
|
||||
add_dependencies(${NANOBOOTER_PROJECT_NAME}.elf ChibiOS)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf ChibiOS)
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${CHIBIOS_INCLUDE_DIRS}
|
||||
${ChibiOSnfOverlay_INCLUDE_DIRS}
|
||||
${CHIBIOS_CONTRIB_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TARGET_CMSIS_COMMON_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
# include directories for nanoBooter
|
||||
target_include_directories(${NANOBOOTER_PROJECT_NAME}.elf PUBLIC
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoBooter"
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoBooter
|
||||
|
||||
${TARGET_CMSIS_NANOBOOTER_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOBOOTER_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_CMSIS_NANOCLR_INCLUDE_DIRS}
|
||||
${TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
|
||||
# includes for ChibiOS LwIP
|
||||
${CHIBIOS_LWIP_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOBOOTER_PROJECT_NAME}.elf)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <hal.h>
|
||||
#include "target_nf_devices_can_config.h"
|
||||
#include <nf_devices_can_native_target.h>
|
||||
#include <nanoFramework.Devices.Can/nf_devices_can_native_target.h>
|
||||
|
||||
///////////
|
||||
// CAN1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_nf_devices_onewire_config.h"
|
||||
#include <nf_devices_onewire_native_target.h>
|
||||
#include <nanoFramework.Devices.OneWire/nf_devices_onewire_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART4 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_adc_native_target.h"
|
||||
#include <win_dev_adc_native_target.h>
|
||||
|
||||
const NF_PAL_ADC_PORT_PIN_CHANNEL AdcPortPinConfig[] = {
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_i2c_native_target.h"
|
||||
#include <Windows.Devices.I2c/win_dev_i2c_native_target.h>
|
||||
|
||||
//////////
|
||||
// I2C1 //
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
//
|
||||
|
||||
#include "target_windows_devices_serialcommunication_config.h"
|
||||
#include <win_dev_serial_native_target.h>
|
||||
#include <Windows.Devices.SerialCommunication/win_dev_serial_native_target.h>
|
||||
|
||||
///////////
|
||||
// UART2 //
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
#include "win_dev_spi_native_target.h"
|
||||
#include <Windows.Devices.Spi/win_dev_spi_native_target.h>
|
||||
|
||||
//////////
|
||||
// SPI1 //
|
||||
|
|
|
@ -3,97 +3,23 @@
|
|||
# See LICENSE file in the project root for full license information.
|
||||
#
|
||||
|
||||
include(binutils.common)
|
||||
include(binutils.TI_SimpleLink)
|
||||
|
||||
ENABLE_LANGUAGE(ASM)
|
||||
|
||||
# add header files with common OS definitions and board definitions specific for each image
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR/target_board.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/nanoCLR/target_board.h" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/target_common.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/target_common.h" @ONLY)
|
||||
|
||||
set(NANOCLR_PROJECT_NAME "nanoCLR")
|
||||
|
||||
find_package(BuildUtils REQUIRED)
|
||||
find_package(TI_SimpleLink REQUIRED)
|
||||
find_package(WireProtocol REQUIRED)
|
||||
find_package(nanoHALCore REQUIRED)
|
||||
|
||||
# packages for nanoFramework libraries
|
||||
#######################################
|
||||
# mandatory
|
||||
find_package(NF_CoreCLR REQUIRED)
|
||||
|
||||
#######################################
|
||||
# optional
|
||||
|
||||
# nF feature: debugger
|
||||
if(NF_FEATURE_DEBUGGER)
|
||||
find_package(NF_Debugger REQUIRED)
|
||||
find_package(NF_Diagnostics REQUIRED)
|
||||
endif()
|
||||
# add packages
|
||||
NF_ADD_COMMON_PACKAGES()
|
||||
NF_ADD_PLATFORM_PACKAGES()
|
||||
|
||||
#######################################
|
||||
|
||||
add_subdirectory("common")
|
||||
# add_subdirectory("nanoBooter")
|
||||
add_subdirectory("nanoCLR")
|
||||
|
||||
#######################################
|
||||
|
||||
# copy Sys Config file to build directory
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${CMAKE_CURRENT_BINARY_DIR}/TI_CC1352P1_LAUNCHXL.syscfg
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/TI_CC1352P1_LAUNCHXL.syscfg
|
||||
${CMAKE_CURRENT_BINARY_DIR}/TI_CC1352P1_LAUNCHXL.syscfg
|
||||
COMMENT "Copy TI-RTOS configuration file to build directory"
|
||||
)
|
||||
|
||||
# execute Sys Config with configuration file
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
${CMAKE_CURRENT_BINARY_DIR}/syscfg/ti_devices_config.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/syscfg/ti_drivers_config.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/syscfg/ti_easylink_config.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/syscfg/ti_radio_config.c
|
||||
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/TI_CC1352P1_LAUNCHXL.syscfg
|
||||
|
||||
COMMAND ${CMAKE_BINARY_DIR}/TI_SysConfig_Source/sysconfig_cli.bat -s "${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/.metadata/product.json" -o "syscfg" --compiler gcc TI_CC1352P1_LAUNCHXL.syscfg
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generate configuration files"
|
||||
)
|
||||
|
||||
######################################
|
||||
|
||||
# need to copy the configuration file to the build directory
|
||||
# because the obj files resulting from TI-RTOS build are placed in the same directory as the configuration file
|
||||
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)
|
||||
set(TI_RTOS_CONFIG_FILE ti-rtos-debug.cfg)
|
||||
else()
|
||||
set(TI_RTOS_CONFIG_FILE ti-rtos-release.cfg)
|
||||
endif()
|
||||
|
||||
# need to use a specific target because TARGET dependency PRE_BUILT doesn't work on NINJA build files
|
||||
|
||||
add_custom_target(
|
||||
COPY_TIRTOS_CONFIG
|
||||
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/${TI_RTOS_CONFIG_FILE}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${TI_RTOS_CONFIG_FILE}
|
||||
COMMENT "Copy TI-RTOS configuration file to build directory"
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
TIRTOS_CONFIG
|
||||
|
||||
COMMAND ${CMAKE_BINARY_DIR}/TI_XDCTools_Source/xs.exe --xdcpath="${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/source\;${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/kernel/tirtos/packages" xdc.tools.configuro -o configPkg -t gnu.targets.arm.M4F -p ti.platforms.simplelink:CC1352 -r release -c "${TOOLCHAIN_PREFIX}" --compileOptions " -DDeviceFamily_CC13X2 " "${CMAKE_CURRENT_BINARY_DIR}/${TI_RTOS_CONFIG_FILE}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
|
||||
COMMENT "Generate TI-RTOS configuration"
|
||||
)
|
||||
NF_ADD_PLATFORM_SYSCONFIG_STEPS(CC1352 CC13X2)
|
||||
|
||||
#######################
|
||||
# nanoCLR executable
|
||||
|
@ -102,96 +28,15 @@ add_executable(
|
|||
# executables for project, project sources
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/target_common.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/target_Power.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CC1352P1_LAUNCHXL_fxns.c
|
||||
|
||||
${COMMON_PROJECT_SOURCES}
|
||||
${NANOCLR_PROJECT_SOURCES}
|
||||
|
||||
${TARGET_TI_SimpleLink_COMMON_SOURCES}
|
||||
|
||||
${TARGET_TI_SimpleLink_NANOCLR_SOURCES}
|
||||
|
||||
${TARGET_TI_SimpleLink_SOURCES}
|
||||
|
||||
${WireProtocol_SOURCES}
|
||||
${nanoHALCore_SOURCES}
|
||||
|
||||
${CMAKE_CURRENT_BINARY_DIR}/syscfg/ti_devices_config.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/syscfg/ti_drivers_config.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/syscfg/ti_easylink_config.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/syscfg/ti_radio_config.c
|
||||
|
||||
# sources for nanoFramework libraries
|
||||
${NF_CoreCLR_SOURCES}
|
||||
${NF_Debugger_SOURCES}
|
||||
${NF_Diagnostics_SOURCES}
|
||||
|
||||
# sources for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_SOURCES}
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
${NANOCLR_PROJECT_NAME}.elf
|
||||
|
||||
${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/source/ti/display/lib/display.am4fg
|
||||
${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/source/ti/grlib/lib/gcc/m4f/grlib.a
|
||||
${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/source/ti/drivers/rf/lib/rf_multiMode_cc13x2.am4fg
|
||||
${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/source/ti/drivers/lib/drivers_cc13x2.am4fg
|
||||
${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/source/ti/devices/cc13x2_cc26x2/driverlib/bin/gcc/driverlib.lib
|
||||
${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/kernel/tirtos/packages/ti/dpl/lib/dpl_cc13x2.am4fg
|
||||
|
||||
${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/thumb/v7e-m/hard/libm.a
|
||||
${PROJECT_BINARY_DIR}/SimpleLinkCC13x2_26x2SDK_Source/kernel/tirtos/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/thumb/v7e-m/hard/libnosys.a
|
||||
)
|
||||
|
||||
# add dependency from TI SimpleLink CC13x2_26x2 SDK, TI SysConfig and XDCTools (this is required to make sure that those repos are downloaded before the build starts)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf TI_SysConfig)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf SimpleLinkCC13x2_26x2SDK)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf COPY_TIRTOS_CONFIG)
|
||||
add_dependencies(${NANOCLR_PROJECT_NAME}.elf TIRTOS_CONFIG)
|
||||
add_dependencies(TIRTOS_CONFIG TI_XDCTools)
|
||||
add_dependencies(TIRTOS_CONFIG COPY_TIRTOS_CONFIG)
|
||||
|
||||
#############################
|
||||
|
||||
# include common directories
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/common
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Core
|
||||
${PROJECT_SOURCE_DIR}/src/CLR/Include
|
||||
${PROJECT_SOURCE_DIR}/src/HAL/Include
|
||||
${PROJECT_SOURCE_DIR}/src/PAL/Include
|
||||
|
||||
${WireProtocol_INCLUDE_DIRS}
|
||||
${nanoHALCore_INCLUDE_DIRS}
|
||||
|
||||
${TI_SimpleLink_INCLUDE_DIRS}
|
||||
${TI_XDCTools_INCLUDE_DIR}
|
||||
|
||||
${CMAKE_CURRENT_BINARY_DIR}/syscfg
|
||||
|
||||
${TARGET_TI_SimpleLink_COMMON_INCLUDE_DIRS}
|
||||
)
|
||||
NF_ADD_COMMON_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_SOURCES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# include directories for nanoCLR
|
||||
target_include_directories(${NANOCLR_PROJECT_NAME}.elf PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/nanoCLR
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/nanoCLR
|
||||
|
||||
${TARGET_TI_SimpleLink_NANOCLR_INCLUDE_DIRS}
|
||||
|
||||
# directories for nanoFramework libraries
|
||||
${NF_CoreCLR_INCLUDE_DIRS}
|
||||
${NF_Debugger_INCLUDE_DIRS}
|
||||
${NF_Diagnostics_INCLUDE_DIRS}
|
||||
|
||||
# includes for nanoFramework APIs
|
||||
${TARGET_NANO_APIS_INCLUDES}
|
||||
)
|
||||
NF_ADD_COMMON_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
NF_ADD_PLATFORM_INCLUDE_DIRECTORIES(${NANOCLR_PROJECT_NAME})
|
||||
|
||||
# set compiler options
|
||||
nf_set_compiler_options(${NANOCLR_PROJECT_NAME}.elf)
|
||||
|
@ -199,9 +44,6 @@ nf_set_compiler_options(${NANOCLR_PROJECT_NAME}.elf)
|
|||
# set compiler definitions
|
||||
nf_set_compiler_definitions(${NANOCLR_PROJECT_NAME}.elf -DDeviceFamily_CC13X2 )
|
||||
|
||||
# set compiler definitions pertaining PHY types availability
|
||||
nf_set_compiler_definitions(${NANOCLR_PROJECT_NAME}.elf -DSUPPORT_PHY_CUSTOM -DSUPPORT_PHY_50KBPS2GFSK -DSUPPORT_PHY_5KBPSSLLR -DSUPPORT_PHY_200KBPS2GFSK )
|
||||
|
||||
# set compiler definitions pertaining PA availability
|
||||
nf_set_compiler_definitions(${NANOCLR_PROJECT_NAME}.elf -DCCFG_FORCE_VDDR_HH=0x1 )
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"TOOLCHAIN_PREFIX": "<absolute-path-to-the-toolchain-folder-mind-the-forward-slashes>",
|
||||
"RTOS": "TI_SIMPLELINK",
|
||||
"TARGET_SERIES": "CC13x2_26x2",
|
||||
"TI_BOARD": "TI_CC1352P1_LAUNCHXL",
|
||||
"TARGET_BOARD": "TI_CC1352P1_LAUNCHXL",
|
||||
"TI_SL_CC13x2_26x2_SDK_SOURCE": "",
|
||||
"TI_XDCTOOLS_SOURCE": "<path-to-local-TI-XDC-Tools-source-mind-the-forward-slash>",
|
||||
"TI_SYSCONFIG_SOURCE": "<path-to-local-TI-SYSCONFIG-Tool-source-mind-the-forward-slash>",
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
/////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////
|
||||
#define OEMSYSTEMINFOSTRING "nanoCLR running @ @TI_BOARD@"
|
||||
#define TARGETNAMESTRING "@TI_BOARD@"
|
||||
#define OEMSYSTEMINFOSTRING "nanoCLR running @ @TARGET_BOARD@"
|
||||
#define TARGETNAMESTRING "@TARGET_BOARD@"
|
||||
#define PLATFORMNAMESTRING "TI_SL_CC13x2"
|
||||
//////////////////////////////////////////////
|
||||
|
||||
|
|
|
@ -190,8 +190,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: GHI_FEZ_CERB40_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON
|
||||
TargetBoard: GHI_FEZ_CERB40_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('GHI_FEZ_CERB40_NF_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
@ -227,8 +227,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: I2M_ELECTRON_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DNF_FEATURE_DEBUGGER=ON -DUSE_RNG=OFF -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON
|
||||
TargetBoard: I2M_ELECTRON_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DUSE_RNG=OFF -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('I2M_ELECTRON_NF_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
@ -264,8 +264,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: I2M_OXYGEN_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DNF_FEATURE_DEBUGGER=ON -DUSE_RNG=OFF -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON
|
||||
TargetBoard: I2M_OXYGEN_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DUSE_RNG=OFF -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('I2M_OXYGEN_NF_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
@ -301,8 +301,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: ST_NUCLEO64_F401RE_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DNF_FEATURE_DEBUGGER=ON -DUSE_RNG=OFF -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.Devices.OneWire=ON
|
||||
TargetBoard: ST_NUCLEO64_F401RE_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DUSE_RNG=OFF -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.Devices.OneWire=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('ST_NUCLEO64_F401RE_NF_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
@ -338,8 +338,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: ST_NUCLEO64_F411RE_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DNF_FEATURE_DEBUGGER=ON -DUSE_RNG=OFF -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Text=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON
|
||||
TargetBoard: ST_NUCLEO64_F411RE_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DUSE_RNG=OFF -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Text=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('ST_NUCLEO64_F411RE_NF_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
@ -375,8 +375,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: ST_STM32F411_DISCOVERY
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DNF_FEATURE_DEBUGGER=ON -DUSE_RNG=OFF -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Text=ON
|
||||
TargetBoard: ST_STM32F411_DISCOVERY
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DUSE_RNG=OFF -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Text=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('ST_STM32F411_DISCOVERY_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
@ -412,8 +412,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: ST_NUCLEO144_F412ZG_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DNF_FEATURE_DEBUGGER=ON -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_Windows.Devices.Adc=ON
|
||||
TargetBoard: ST_NUCLEO144_F412ZG_NF
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_Windows.Devices.Adc=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('ST_NUCLEO144_F412ZG_NF_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
@ -449,8 +449,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: ST_NUCLEO144_F746ZG
|
||||
BuildOptions: -DTARGET_SERIES=STM32F7xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Text=ON
|
||||
TargetBoard: ST_NUCLEO144_F746ZG
|
||||
BuildOptions: -DTARGET_SERIES=STM32F7xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DNF_SECURITY_MBEDTLS=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.System.Collections=ON -DAPI_nanoFramework.ResourceManager=ON -DAPI_nanoFramework.System.Text=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('ST_NUCLEO144_F746ZG_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
@ -486,8 +486,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: ST_STM32F4_DISCOVERY
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.Devices.Can=ON
|
||||
TargetBoard: ST_STM32F4_DISCOVERY
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DSUPPORT_ANY_BASE_CONVERSION=ON -DNF_FEATURE_DEBUGGER=ON -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.Devices.OneWire=ON -DAPI_nanoFramework.Devices.Can=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('ST_STM32F4_DISCOVERY_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
@ -523,8 +523,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: ST_NUCLEO144_F439ZI
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DNF_SECURITY_MBEDTLS=ON
|
||||
TargetBoard: ST_NUCLEO144_F439ZI
|
||||
BuildOptions: -DTARGET_SERIES=STM32F4xx -DRTOS=CHIBIOS -DNF_FEATURE_DEBUGGER=ON -DSWO_OUTPUT=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_HAS_CONFIG_BLOCK=ON -DAPI_System.Math=ON -DAPI_Hardware.Stm32=ON -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=ON -DAPI_Windows.Devices.I2c=ON -DAPI_Windows.Devices.Pwm=ON -DAPI_Windows.Devices.SerialCommunication=ON -DAPI_Windows.Devices.Adc=ON -DAPI_System.Net=ON -DNF_SECURITY_MBEDTLS=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('ST_NUCLEO144_F439ZI_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
@ -560,8 +560,8 @@ jobs:
|
|||
vmImage: 'VS2017-Win2016'
|
||||
|
||||
variables:
|
||||
TargetName: TI_CC1352P1_LAUNCHXL
|
||||
BuildOptions: -DTARGET_SERIES=CC13x2_26x2 -DRTOS=TI_SIMPLELINK -DSUPPORT_ANY_BASE_CONVERSION=OFF -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_WATCHDOG=OFF -DAPI_Windows.Devices.Gpio=ON -DAPI_System.Device.Gpio=ON -DAPI_Windows.Devices.Spi=OFF -DAPI_Windows.Devices.I2c=OFF -DAPI_Windows.Devices.Pwm=OFF -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.TI.EasyLink=ON -DAPI_nanoFramework.Hardware.TI=ON
|
||||
TargetBoard: TI_CC1352P1_LAUNCHXL
|
||||
BuildOptions: -DTARGET_SERIES=CC13x2_26x2 -DRTOS=TI_SIMPLELINK -DSUPPORT_ANY_BASE_CONVERSION=OFF -DNF_FEATURE_DEBUGGER=ON -DNF_FEATURE_RTC=ON -DNF_FEATURE_WATCHDOG=OFF -DAPI_Windows.Devices.Gpio=ON -DAPI_Windows.Devices.Spi=OFF -DAPI_Windows.Devices.I2c=OFF -DAPI_Windows.Devices.Pwm=OFF -DAPI_Windows.Devices.SerialCommunication=OFF -DAPI_Windows.Devices.Adc=ON -DAPI_nanoFramework.TI.EasyLink=ON -DAPI_nanoFramework.Hardware.TI=ON
|
||||
# creates a counter and assigns it to the revision variable
|
||||
REVISION: $[counter('TI_CC1352P1_LAUNCHXL_versioncounter', 0)]
|
||||
GccArm_Version:
|
||||
|
|
Загрузка…
Ссылка в новой задаче