Skip to content

Commit

Permalink
Merge pull request #2021 from nanoframework/release-v1.6.6
Browse files Browse the repository at this point in the history
Release release-v1.7.0
  • Loading branch information
josesimoes authored Aug 25, 2021
2 parents 9ca8e54 + e6b59de commit cee00d3
Show file tree
Hide file tree
Showing 599 changed files with 5,686 additions and 35,366 deletions.
4 changes: 2 additions & 2 deletions .vscode/cmake-variants-DEVCONTAINER.json
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@
"API_Windows.Devices.SerialCommunication": "ON",
"API_System.IO.Ports": "ON",
"API_System.Device.Spi": "ON",
"API_Windows.Devices.Spi": "OFF",
"API_Windows.Devices.Spi": "ON",
"API_Windows.Storage": "ON",
"API_Hardware.Esp32": "ON",
"API_nanoFramework.Hardware.Esp32.Rmt": "ON"
Expand Down Expand Up @@ -406,4 +406,4 @@
}
}
}
}
}
8 changes: 4 additions & 4 deletions .vscode/cmake-variants.TEMPLATE.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"USE_RNG": "<ON-default-for-using-hardware-true-random-generator-unit>",
"DP_FLOATINGPOINT": "<OFF-default-ON-for-adding-support-for-double-precision-floating-point>",
"SUPPORT_ANY_BASE_CONVERSION": "<OFF-default-ON-for-adding-support-for-conversion-strings-to-values-on-any-base>",
"RTOS": "<one-of-valid-rtos-options-CHIBIOS-FREERTOS-FREERTOS_ESP32-TI_SIMPLELINK>",
"RTOS": "<one-of-valid-rtos-options-ChibiOS-FreeRTOS-FreeRTOS_ESP32-TI_SIMPLELINK>",
"RTOS_SOURCE_FOLDER": "<path-to-RTOS-source-folder-if-supported-mind-the-forward-slash>",
"CHIBIOS_CONTRIB_REQUIRED": "OFF-default-ON-to-include_ChibiOS-Contrib-repository-in-the-build",
"CHIBIOS_CONTRIB_SOURCE": "<path-to-local-ChibiOS-contrib-source-mind-the-forward-slash>",
Expand All @@ -50,8 +50,8 @@
"CMSIS_VERSION": "<valid-cmsis-version-if-empty-use-default-set-cmake>",
"STM32_CUBE_PACKAGE_REQUIRED": "<OFF-default-ON-to-include_STM-cube-package-in-the-build>",
"STM32_CUBE_PACKAGE_SOURCE": "<path-to-stm32-cubemx-package-mind-the-forward-slash>",
"TI_SL_CC32xx_SDK_SOURCE": "<path-to-local-TI-SimpleLink-CC32xx-SDK-source-mind-the-forward-slash>",
"TI_SL_CC13x2_26x2_SDK_SOURCE": "<path-to-local-TI-SimpleLink-CC13x2_26x2-SDK-source-mind-the-forward-slash>",
"TI_SL_CC32xx_SDK_SOURCE": "<path-to-local-TI_SimpleLink-CC32xx-SDK-source-mind-the-forward-slash>",
"TI_SL_CC13x2_26x2_SDK_SOURCE": "<path-to-local-TI_SimpleLink-CC13x2_26x2-SDK-source-mind-the-forward-slash>",
"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>",
"RADIO_FREQUENCY": "<radio-frequency-for-target-with-configurable-radio-valid-values-868-915>",
Expand All @@ -67,7 +67,7 @@
"NF_WP_TRACE_STATE": "OFF-default-ON-to-enable-trace-state-messages-wire-protocol",
"NF_WP_TRACE_NODATA": "OFF-default-ON-to-enable-trace-no-data-messages-wire-protocol",
"NF_WP_TRACE_ALL": "OFF-default-ON-to-enable-trace-all-messages-wire-protocol",
"NF_WP_IMPLEMENTS_CRC32": "ON-default-OFF-to-disable-CRC32-wire-protocol",
"NF_WP_IMPLEMENTS_CRC32": "OFF-default-OFF-to-disable-CRC32-wire-protocol",
"NF_FEATURE_DEBUGGER": "OFF-default-ON-to-include-managed-app-debugging-capability",
"NF_FEATURE_RTC": "OFF-default-ON-to-enable-hardware-RTC",
"NF_FEATURE_USE_APPDOMAINS": "OFF-default-ON-to-enable-support-for-Application-Domains",
Expand Down
6 changes: 3 additions & 3 deletions CMake/ChibiOS_target_os.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

#include <chversion.h>

#ifndef _TARGET_OS_H_
#define _TARGET_OS_H_ 1
#ifndef TARGET_OS_H
#define TARGET_OS_H

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
Expand All @@ -31,4 +31,4 @@
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
#define TARGET_HAS_NANOBOOTER @TARGET_HAS_NANOBOOTER@

#endif /* _TARGET_OS_H_ */
#endif // TARGET_OS_H
6 changes: 3 additions & 3 deletions CMake/ESP32_target_os.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// Any changes you make here will be overwritten when it's generated again. //
//////////////////////////////////////////////////////////////////////////////

#ifndef _TARGET_OS_H_
#define _TARGET_OS_H_ 1
#ifndef TARGET_OS_H
#define TARGET_OS_H

#define VERSION_MAJOR @nanoFramework_VERSION_MAJOR@U
#define VERSION_MINOR @nanoFramework_VERSION_MINOR@U
Expand All @@ -27,4 +27,4 @@
#define TARGET_HAS_NANOBOOTER FALSE
#cmakedefine TARGET_SERIAL_BAUDRATE @TARGET_SERIAL_BAUDRATE@

#endif /* _TARGET_OS_H_ */
#endif // TARGET_OS_H
6 changes: 3 additions & 3 deletions CMake/FreeRTOS_target_os.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// Any changes you make here will be overwritten when it's generated again. //
//////////////////////////////////////////////////////////////////////////////

#ifndef _TARGET_OS_H_
#define _TARGET_OS_H_ 1
#ifndef TARGET_OS_H
#define TARGET_OS_H

#define STR_HELPER(x) #x
#define STR(x) STR_HELPER(x)
Expand All @@ -29,4 +29,4 @@
#define NANOCLR_SYSTEM_COLLECTIONS @TARGET_SYSTEM_COLLECTIONS@
#define TARGET_HAS_NANOBOOTER @TARGET_HAS_NANOBOOTER@

#endif /* _TARGET_OS_H_ */
#endif // TARGET_OS_H
48 changes: 33 additions & 15 deletions CMake/Modules/CHIBIOS_STM32F0xx_GCC_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,52 @@ set(CMAKE_ASM_FLAGS " -mthumb -mcpu=cortex-m0 -mfloat-abi=soft -mabi=aapcs -x as
set(CMAKE_EXE_LINKER_FLAGS " -Wl,--gc-sections -Wl,--no-wchar-size-warning -Wl,--print-memory-usage -mthumb -mcpu=cortex-m0 -mfloat-abi=soft -mabi=aapcs -nostartfiles " CACHE INTERNAL "executable linker flags")


function(NF_SET_COMPILER_OPTIONS TARGET)
# TARGET parameter to set the target that's setting them for
# optional EXTRA_COMPILE_OPTIONS with compile options to be added
macro(nf_set_compile_options)

# parse arguments
cmake_parse_arguments(NFSCO "" "TARGET" "EXTRA_COMPILE_OPTIONS" ${ARGN})

if(NOT NFSCO_TARGET OR "${NFSCO_TARGET}" STREQUAL "")
message(FATAL_ERROR "Need to set TARGET argument when calling nf_set_compile_options()")
endif()

# include any extra options coming from any extra args?
target_compile_options(${TARGET} PUBLIC ${ARGN} -mthumb -mcpu=cortex-m0 -mabi=aapcs -nostdlib -Wall -Wextra -Werror -Wundef -fshort-wchar -fno-builtin -fno-common -mno-long-calls -fno-exceptions -fcheck-new )
target_compile_options(${NFSCO_TARGET} PUBLIC ${NFSCO_EXTRA_COMPILE_OPTIONS} -mthumb -mcpu=cortex-m0 -mabi=aapcs -nostdlib -Wall -Wextra -Werror -Wundef -Wshadow -Wimplicit-fallthrough -fshort-wchar -fno-builtin -fno-common -mno-long-calls -fno-exceptions -fcheck-new )

# this series doesn't have FPU
target_compile_definitions(${TARGET} PUBLIC -DCORTEX_USE_FPU=FALSE -DUSE_FPU=TRUE)
target_compile_definitions(${NFSCO_TARGET} PUBLIC -DPLATFORM_ARM -DCORTEX_USE_FPU=FALSE -DUSE_FPU=TRUE)

endfunction()
endmacro()


function(NF_SET_LINKER_OPTIONS TARGET)
# TARGET parameter to set the target that's setting them for
# optional EXTRA_LINK_FLAGS with link flags to be added
macro(nf_set_linker_options)

# request specs from newlib nano
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " --specs=nano.specs ")
# parse arguments
cmake_parse_arguments(NFSLO "" "TARGET;EXTRA_LINK_FLAGS" "" ${ARGN})

if(NOT NFSLO_TARGET OR "${NFSLO_TARGET}" STREQUAL "")
message(FATAL_ERROR "Need to set TARGET argument when calling nf_set_linker_options()")
endif()

# set extra linker flags
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " ${ARGN}")
# request specs from newlib nano
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " --specs=nano.specs ")

# set optimization linker flags for RELEASE and MinSizeRel
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -flto -Os -fstrict-aliasing -fomit-frame-pointer -fno-unroll-loops -frounding-math -fsignaling-nans -ffloat-store -fno-math-errno -ftree-vectorize -fno-default-inline -finline-functions-called-once -fno-defer-pop ")
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -flto -Os -fstrict-aliasing -fomit-frame-pointer -fno-unroll-loops -frounding-math -fsignaling-nans -ffloat-store -fno-math-errno -ftree-vectorize -fno-default-inline -finline-functions-called-once -fno-defer-pop ")
endif()

# include libraries in build
nf_include_libraries_in_build(${NFSLO_TARGET})

# set extra linker flags
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " ${NFSLO_EXTRA_LINK_FLAGS} ")

# set optimization flags
nf_set_optimization_options(${TARGET})

# set link map
nf_set_link_map(${TARGET})
nf_set_optimization_options(${NFSLO_TARGET})

endfunction()
endmacro()
35 changes: 0 additions & 35 deletions CMake/Modules/CHIBIOS_STM32F0xx_sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,38 +43,3 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS})
endforeach()

list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv6-M)

####################################################################################
# WHEN ADDING A NEW CHIBIOS OVERLAY component add the include directory(ies) below
####################################################################################
# component STM32_FLASH
list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/FLASHv1)
# component STM32_CRC
list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/CRCv1)
# component STM32_ONEWIRE
list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/ONEWIREv1)

###############################################################################################################################
# Add above the required include directory(ies) for a new nanoFramework overlay component that you are adding
# following the template below.
#
# list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/<path-here>)
###############################################################################################################################


####################################################################################################
# WHEN ADDING A NEW CHIBIOS OVERLAY component add the source file(s) specific to this series below
####################################################################################################
# component STM32_FLASH
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/FLASHv1/flash_lld.c)
# component STM32_CRC
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/CRCv1/crc_lld.c)
# component STM32_ONEWIRE
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/ONEWIREv1/onewire_lld.c)

##########################################################################################################################
# Add above ALL the source code file(s) low level driver specif for a series required for a new nanoFramework
# overlay component that you are adding following the template below.
#
# list(APPEND CHIBIOS_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/src/<path-here>)
##########################################################################################################################
51 changes: 35 additions & 16 deletions CMake/Modules/CHIBIOS_STM32F4xx_GCC_options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,53 @@ set(CMAKE_ASM_FLAGS " -mthumb -mcpu=cortex-m4 -x assembler-with-cpp" CACHE INTER
set(CMAKE_EXE_LINKER_FLAGS " -Wl,--gc-sections -Wl,--no-wchar-size-warning -Wl,--print-memory-usage -mthumb -mcpu=cortex-m4 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mabi=aapcs -nostartfiles " CACHE INTERNAL "executable linker flags")


function(NF_SET_COMPILER_OPTIONS TARGET)
# TARGET parameter to set the target that's setting them for
# optional EXTRA_COMPILE_OPTIONS with compile options to be added
macro(nf_set_compile_options)

# parse arguments
cmake_parse_arguments(NFSCO "" "TARGET" "EXTRA_COMPILE_OPTIONS" ${ARGN})

if(NOT NFSCO_TARGET OR "${NFSCO_TARGET}" STREQUAL "")
message(FATAL_ERROR "Need to set TARGET argument when calling nf_set_compile_options()")
endif()


# include any extra options coming from any extra args?
target_compile_options(${TARGET} PUBLIC ${ARGN} -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mabi=aapcs -nostdlib -Wall -Wextra -Werror -Wundef -fshort-wchar -fno-builtin -fno-common -mno-long-calls -fno-exceptions -fcheck-new )
target_compile_options(${NFSCO_TARGET} PUBLIC ${NFSCO__EXTRA_COMPILE_OPTIONS} -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mabi=aapcs -nostdlib -Wall -Wextra -Werror -Wundef -Wshadow -Wimplicit-fallthrough -fshort-wchar -fno-builtin -fno-common -mno-long-calls -fno-exceptions -fcheck-new )

# this series has FPU
target_compile_definitions(${TARGET} PUBLIC -DCORTEX_USE_FPU=TRUE -DUSE_FPU=TRUE)
target_compile_definitions(${NFSCO_TARGET} PUBLIC -DPLATFORM_ARM -DCORTEX_USE_FPU=TRUE -DUSE_FPU=TRUE)

endfunction()
endmacro()


function(NF_SET_LINKER_OPTIONS TARGET)
# TARGET parameter to set the target that's setting them for
# optional EXTRA_LINK_FLAGS with link flags to be added
macro(nf_set_linker_options)

# request specs from newlib nano
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " --specs=nano.specs ")
# parse arguments
cmake_parse_arguments(NFSLO "" "TARGET;EXTRA_LINK_FLAGS" "" ${ARGN})

if(NOT NFSLO_TARGET OR "${NFSLO_TARGET}" STREQUAL "")
message(FATAL_ERROR "Need to set TARGET argument when calling nf_set_linker_options()")
endif()

# set extra linker flags
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " ${ARGN}")
# request specs from newlib nano
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " --specs=nano.specs ")

# set optimization linker flags for RELEASE and MinSizeRel
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")
set_property(TARGET ${TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -flto -Os -fstrict-aliasing -fomit-frame-pointer -fno-unroll-loops -frounding-math -fsignaling-nans -ffloat-store -fno-math-errno -ftree-vectorize -fno-default-inline -finline-functions-called-once -fno-defer-pop ")
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " -flto -Os -fstrict-aliasing -fomit-frame-pointer -fno-unroll-loops -frounding-math -fsignaling-nans -ffloat-store -fno-math-errno -ftree-vectorize -fno-default-inline -finline-functions-called-once -fno-defer-pop ")
endif()

# include libraries in build
nf_include_libraries_in_build(${NFSLO_TARGET})

# set extra linker flags
set_property(TARGET ${NFSLO_TARGET} APPEND_STRING PROPERTY LINK_FLAGS " ${NFSLO__EXTRA_LINK_FLAGS} ")

# set optimization flags
nf_set_optimization_options(${TARGET})

# set link map
nf_set_link_map(${TARGET})

endfunction()
nf_set_optimization_options(${NFSLO_TARGET})

endmacro()
49 changes: 0 additions & 49 deletions CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,52 +42,3 @@ foreach(SRC_FILE ${CHIBIOS_PORT_SRCS})
endforeach()

list(APPEND CHIBIOS_INCLUDE_DIRS ${chibios_SOURCE_DIR}/os/common/ports/ARMv7-M)

####################################################################################
# WHEN ADDING A NEW CHIBIOS OVERLAY component add the include directory(ies) below
####################################################################################
# component STM32_FLASH
list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/FLASHv2)
# component STM32_CRC
list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/CRCv1)
# component STM32_RNG
list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/RNGv1)
# component STM32_FSMC (Flexible Memory Controller)
list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/FSMCv1)
# component STM32_ONEWIRE (One Wire driver)
list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/ONEWIREv1)
# component STM32_QSPI (Quad-SPI)
list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/QSPIv1)

###############################################################################################################################
# Add above the required include directory(ies) for a new nanoFramework overlay component that you are adding
# following the template below.
#
# list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/<path-here>)
###############################################################################################################################


####################################################################################################
# WHEN ADDING A NEW CHIBIOS OVERLAY component add the source file(s) specific to this series below
####################################################################################################
# component STM32_FLASH
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/FLASHv2/flash_lld.c)
# component STM32_CRC
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/CRCv1/crc_lld.c)
# component STM32_RNG
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/RNGv1/rng_lld.c)
# component STM32_FSMC (Flexible Memory Controller)
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/FSMCv1/fsmc_nand_lld.c)
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sdram_lld.c)
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/FSMCv1/fsmc_sram_lld.c)
# component STM32_ONEWIRE
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/ONEWIREv1/onewire_lld.c)
# component STM32_QSPI (Quad-SPI)
list(APPEND ChibiOSnfOverlay_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/ports/STM32/LLD/QSPIv1/qspi_lld.c)

##########################################################################################################################
# Add above ALL the source code file(s) low level driver specif for a series required for a new nanoFramework
# overlay component that you are adding following the template below.
#
# list(APPEND CHIBIOS_SOURCES ${CMAKE_SOURCE_DIR}/targets/ChibiOS/_nf-overlay/os/hal/src/<path-here>)
##########################################################################################################################
Loading

0 comments on commit cee00d3

Please sign in to comment.