blob: a6a40f2d16b1bd44086dfacdba9ed66015ee71a4 [file] [log] [blame]
# Copyright 2022 The Pigweed Authors
#
# 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
#
# https://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.
import("//build_overrides/pigweed.gni")
import("$dir_pigweed/targets/arduino/target_toolchains.gni")
import("$dir_pigweed_experimental/targets/common_backends.gni")
import("$dir_pw_protobuf_compiler/proto.gni")
import("$dir_pw_third_party/nanopb/nanopb.gni")
target_toolchain_arduino = {
_excluded_members = [
"defaults",
"name",
]
arduino_debug = {
name = "arduino_debug"
_toolchain_base = pw_target_toolchain_arduino.debug
forward_variables_from(_toolchain_base, "*", _excluded_members)
defaults = {
forward_variables_from(_toolchain_base.defaults, "*")
forward_variables_from(toolchain_overrides, "*")
app_common_BACKEND =
"$dir_pigweed_experimental/applications/app_common_impl:arduino"
pw_app_common_DISPLAY_WIDTH = "320"
pw_app_common_DISPLAY_HEIGHT = "240"
pw_app_common_DISPLAY_CS_GPIO = "32"
pw_app_common_DISPLAY_DC_GPIO = "9"
pw_app_common_DISPLAY_RESET_GPIO = "3"
pw_display_DISPLAY_RESIZE = 1
# pw_spi_arduino currently uses the Arduino SPI API which uses hard
# coded (via the board config) SPI pin assignments. These are currently
# ignored.
pw_app_common_SPI_MISO_GPIO = "-1" # Pin 12 on Teensy 4.1
pw_app_common_SPI_MOSI_GPIO = "-1" # Pin 11 on Teensy 4.1
pw_app_common_SPI_CLOCK_GPIO = "-1" # Pin 13 on Teensy 4.1
# Configure backend for pw_board_led
pw_board_led_BACKEND = "$dir_pw_board_led_arduino"
# Configure backend for pw_spin_delay
pw_spin_delay_BACKEND = "$dir_pw_spin_delay_arduino"
# Configure backend for pw_touchscreen
pw_touchscreen_BACKEND = "$dir_pw_touchscreen_null"
# These backends are for Teensy core builds.
# pw_touchscreen_BACKEND = "$dir_pw_touchscreen_teensy_xpt2046"
# pw_touchscreen_BACKEND = "$dir_pw_touchscreen_teensy_stmpe610"
}
}
# Toolchain for tests only.
arduino_debug_tests = {
name = "arduino_debug_tests"
_toolchain_base = pw_target_toolchain_arduino.debug
forward_variables_from(_toolchain_base, "*", _excluded_members)
defaults = {
forward_variables_from(_toolchain_base.defaults, "*")
forward_variables_from(toolchain_overrides, "*")
# Force tests to use basic log backend to avoid generating and loading its
# own tokenized database.
pw_log_BACKEND = dir_pw_log_basic
}
}
}
toolchains_list = [
target_toolchain_arduino.arduino_debug,
target_toolchain_arduino.arduino_debug_tests,
]