#
# Copyright 2010-2018 JetBrains s.r.o.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Zephyr RTOS. 
# STM32 F4 Discovery

quadruple.zephyr_stm32f4_disco = armv7m-none-eabi
targetSysRoot.zephyr_stm32f4_disco = target-sysroot-4-embedded

boardSpecificClangFlags.zephyr_stm32f4_disco = -mthumb
targetCpu.zephyr_stm32f4_disco = cortex-m4
targetAbi.zephyr_stm32f4_disco = aapcs
clangFlags = -Os
runtimeDefinitions.zephyr_stm32f4_disco = KONAN_ZEPHYR=1 KONAN_NO_FFI=1 \
  KONAN_NO_THREADS=1 KONAN_NO_EXCEPTIONS=1 KONAN_NO_MATH=1 \
  KONAN_INTERNAL_SNPRINTF=1 KONAN_INTERNAL_NOW=1 KONAN_NO_MEMMEM=1 \
  KONAN_NO_CTORS_SECTION=1 KONAN_NO_UNALIGNED_ACCESS=1

targetToolchain.linux_x64-zephyr_stm32f4_disco = gcc-arm-none-eabi-7-2017-q4-major-linux/arm-none-eabi
dependencies.linux_x64-zephyr_stm32f4_disco = \
    libffi-3.2.1-2-linux-x86-64 \
    clang-llvm-8.0.0-linux-x86-64 \
    gcc-arm-none-eabi-7-2017-q4-major-linux \
    target-sysroot-4-embedded

targetToolchain.macos_x64-zephyr_stm32f4_disco = gcc-arm-none-eabi-7-2017-q4-major-mac/arm-none-eabi
dependencies.macos_x64-zephyr_stm32f4_disco = \
    gcc-arm-none-eabi-7-2017-q4-major-mac \
    libffi-3.2.1-3-darwin-macos \
    clang-llvm-apple-8.0.0-darwin-macos \
    target-sysroot-4-embedded

targetToolchain.mingw_x64-zephyr_stm32f4_disco = gcc-arm-none-eabi-7-2017-q4-major-win32/arm-none-eabi
dependencies.mingw_x64-zephyr_stm32f4_disco = \
    libffi-3.2.1-mingw-w64-x86-64 \
    msys2-mingw-w64-x86_64-clang-llvm-lld-compiler_rt-8.0.1 \
    gcc-arm-none-eabi-7-2017-q4-major-win32 \
    target-sysroot-4-embedded
