<commit_before>#
# Copyright (c) 2017 The nanoFramework project contributors
# See LICENSE file in the project root for full license information.
#

# from startup_stm32f4xx.mk
# List of the ChibiOS generic STM32F4xx startup and CMSIS files.

################################################################################################
# WHEN ADDING A NEW BOARD add the source code file for the hal/ports/STM32/STM32F4xx/platform.mk
################################################################################################

set(CHIBIOS_PORT_SRCS
    # startup code
    crt1.c
    vectors.S
    crt0_v7m.S

    nvic.c
    hal_lld.c
    stm32_isr.c

    hal_adc_lld.c
    hal_can_lld.c
    hal_dac_lld.c
    stm32_dma.c
    hal_pal_lld.c
    hal_i2c_lld.c
    hal_mac_lld.c
    hal_usb_lld.c
    hal_rtc_lld.c
    hal_sdc_lld.c
    hal_i2s_lld.c
    hal_spi_lld.c
    hal_gpt_lld.c
    hal_icu_lld.c
    hal_pwm_lld.c
    hal_st_lld.c
    hal_serial_lld.c
    hal_uart_lld.c
    hal_usb_lld.c
    hal_wdg_lld.c

    # RT
    chcore.c
    chcore_v7m.c
    chcoreasm_v7m.S
)

foreach(SRC_FILE ${CHIBIOS_PORT_SRCS})
    set(CHIBIOS_F4_SRC_FILE SRC_FILE-NOTFOUND)
    find_file(CHIBIOS_F4_SRC_FILE ${SRC_FILE}
        PATHS 

            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/ports/ARMCMx/compilers/GCC
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/startup/ARMCMx/compilers/GCC
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/ports/ARMCMx
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/common/ARMCMx

            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/STM32F4xx
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/ADCv2
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/CANv1

            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DACv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv2
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv2
            if(${CHIBIOS_BOARD} STREQUAL "ST_STM32F429I_DISCOVERY" OR 
               ${CHIBIOS_BOARD} STREQUAL "ST_STM32F4_DISCOVERY" OR 
               ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL" OR 
               ${CHIBIOS_BOARD} STREQUAL "NETDUINO3_WIFI" OR
               ${CHIBIOS_BOARD} STREQUAL "I2M_ELECTRON_NF" OR
               ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF" OR
               ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F411RE_NF" OR
               ${CHIBIOS_BOARD} STREQUAL "GHI_FEZ_CERB40_NF")
                ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1
            else()
                ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2
            endif()
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/MACv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/OTGv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/RTCv2
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/SDIOv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/SPIv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/TIMv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/USARTv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/USBv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/xWDGv1

        CMAKE_FIND_ROOT_PATH_BOTH
    )
    # message("${SRC_FILE} >> ${CHIBIOS_F4_SRC_FILE}") # debug helper
    list(APPEND CHIBIOS_SOURCES ${CHIBIOS_F4_SRC_FILE})
endforeach()

list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/portability/GCC)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/startup/ARMCMx/compilers/GCC)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/startup/ARMCMx/devices/STM32F4xx)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/ext/ARM/CMSIS/Core/Include)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/ext/ST/STM32F4xx)

list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/ADCv2)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/CANv1)

list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DACv1)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv2)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv2)
if(${CHIBIOS_BOARD} STREQUAL "ST_STM32F429I_DISCOVERY" OR 
   ${CHIBIOS_BOARD} STREQUAL "ST_STM32F4_DISCOVERY" OR 
   ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL" OR 
   ${CHIBIOS_BOARD} STREQUAL "NETDUINO3_WIFI" OR
   ${CHIBIOS_BOARD} STREQUAL "I2M_ELECTRON_NF" OR
   ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF" OR
   ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F411RE_NF" OR
   ${CHIBIOS_BOARD} STREQUAL "GHI_FEZ_CERB40_NF")
    list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1)
else()
    list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2)
endif()
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/MACv1)<commit_msg>Activate I2Cv1 for ST_NUCLEO64_F401RE_NF board<commit_after>#
# Copyright (c) 2017 The nanoFramework project contributors
# See LICENSE file in the project root for full license information.
#

# from startup_stm32f4xx.mk
# List of the ChibiOS generic STM32F4xx startup and CMSIS files.

################################################################################################
# WHEN ADDING A NEW BOARD add the source code file for the hal/ports/STM32/STM32F4xx/platform.mk
################################################################################################

set(CHIBIOS_PORT_SRCS
    # startup code
    crt1.c
    vectors.S
    crt0_v7m.S

    nvic.c
    hal_lld.c
    stm32_isr.c

    hal_adc_lld.c
    hal_can_lld.c
    hal_dac_lld.c
    stm32_dma.c
    hal_pal_lld.c
    hal_i2c_lld.c
    hal_mac_lld.c
    hal_usb_lld.c
    hal_rtc_lld.c
    hal_sdc_lld.c
    hal_i2s_lld.c
    hal_spi_lld.c
    hal_gpt_lld.c
    hal_icu_lld.c
    hal_pwm_lld.c
    hal_st_lld.c
    hal_serial_lld.c
    hal_uart_lld.c
    hal_usb_lld.c
    hal_wdg_lld.c

    # RT
    chcore.c
    chcore_v7m.c
    chcoreasm_v7m.S
)

foreach(SRC_FILE ${CHIBIOS_PORT_SRCS})
    set(CHIBIOS_F4_SRC_FILE SRC_FILE-NOTFOUND)
    find_file(CHIBIOS_F4_SRC_FILE ${SRC_FILE}
        PATHS 

            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/ports/ARMCMx/compilers/GCC
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/startup/ARMCMx/compilers/GCC
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/ports/ARMCMx
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/common/ARMCMx

            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/STM32F4xx
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/ADCv2
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/CANv1

            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DACv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv2
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv2
            if(${CHIBIOS_BOARD} STREQUAL "ST_STM32F429I_DISCOVERY" OR 
               ${CHIBIOS_BOARD} STREQUAL "ST_STM32F4_DISCOVERY" OR 
               ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL" OR 
               ${CHIBIOS_BOARD} STREQUAL "NETDUINO3_WIFI" OR
               ${CHIBIOS_BOARD} STREQUAL "I2M_ELECTRON_NF" OR
               ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF" OR
               ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F401RE_NF" OR
               ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F411RE_NF" OR
               ${CHIBIOS_BOARD} STREQUAL "GHI_FEZ_CERB40_NF")
                ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1
            else()
                ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2
            endif()
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/MACv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/OTGv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/RTCv2
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/SDIOv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/SPIv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/TIMv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/USARTv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/USBv1
            ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/xWDGv1

        CMAKE_FIND_ROOT_PATH_BOTH
    )
    # message("${SRC_FILE} >> ${CHIBIOS_F4_SRC_FILE}") # debug helper
    list(APPEND CHIBIOS_SOURCES ${CHIBIOS_F4_SRC_FILE})
endforeach()

list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/portability/GCC)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/startup/ARMCMx/compilers/GCC)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/startup/ARMCMx/devices/STM32F4xx)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/ext/ARM/CMSIS/Core/Include)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/common/ext/ST/STM32F4xx)

list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/ADCv2)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/CANv1)

list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DACv1)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv2)
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv2)
if(${CHIBIOS_BOARD} STREQUAL "ST_STM32F429I_DISCOVERY" OR 
   ${CHIBIOS_BOARD} STREQUAL "ST_STM32F4_DISCOVERY" OR 
   ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL" OR 
   ${CHIBIOS_BOARD} STREQUAL "NETDUINO3_WIFI" OR
   ${CHIBIOS_BOARD} STREQUAL "I2M_ELECTRON_NF" OR
   ${CHIBIOS_BOARD} STREQUAL "I2M_OXYGEN_NF" OR
   ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F401RE_NF" OR
   ${CHIBIOS_BOARD} STREQUAL "ST_NUCLEO64_F411RE_NF" OR
   ${CHIBIOS_BOARD} STREQUAL "GHI_FEZ_CERB40_NF")
    list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1)
else()
    list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2)
endif()
list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/MACv1)
{'fraction_non_alphanumeric': 0.13434334215569954, 'fraction_numerical': 0.02947887195400201, 'mean_word_length': 3.850818946436476, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '360923', 'n_tokens_mistral': 4962, 'n_tokens_neox': 4601, 'n_words': 449}