# Copyright 2023 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/pi_pico.gni")
import("//build_overrides/pigweed.gni")

import("$dir_pw_system/system_target.gni")

if (current_toolchain != default_toolchain) {
  config("config_includes") {
    include_dirs = [ "config" ]
  }

  pw_source_set("freertos_config") {
    public_configs = [ ":config_includes" ]
    public_deps = [ "$dir_pw_third_party/freertos:config_assert" ]
    public = [ "config/FreeRTOSConfig.h" ]
  }

  pw_source_set("pre_init") {
    deps = [
      "$PICO_ROOT/src/common/pico_base",
      "$PICO_ROOT/src/common/pico_stdlib",
      "$PICO_ROOT/src/rp2_common/pico_malloc",
      "$dir_pw_string",
      "$dir_pw_system",
      "$dir_pw_third_party/freertos",
      "//lib/rpc:kudzu_service",
    ]
    sources = [ "boot.cc" ]
  }
}

pw_system_target("rp2040") {
  cpu = PW_SYSTEM_CPU.CORTEX_M0PLUS
  scheduler = PW_SYSTEM_SCHEDULER.FREERTOS
  use_pw_malloc = false

  global_configs = [ "$dir_pigweed/targets/rp2040:rp2040_hal_config" ]

  build_args = {
    pw_build_EXECUTABLE_TARGET_TYPE = "pico_executable"
    pw_build_EXECUTABLE_TARGET_TYPE_FILE =
        get_path_info("$dir_pigweed/targets/rp2040/pico_executable.gni",
                      "abspath")

    pw_log_BACKEND = dir_pw_log_string
    pw_log_string_HANDLER_BACKEND = "$dir_pw_system:log_backend"

    pw_third_party_freertos_CONFIG = "//targets/rp2040:freertos_config"
    pw_third_party_freertos_PORT = "$dir_pw_third_party/freertos:arm_cm0"

    pw_sys_io_BACKEND = dir_pw_sys_io_rp2040

    pw_build_LINK_DEPS += [
      "//targets/rp2040:pre_init",
      "$dir_pw_assert:impl",
      "$dir_pw_log:impl",
      "$dir_pw_log_string:handler.impl",
    ]

    pw_sync_COUNTING_SEMAPHORE_BACKEND =
        "$dir_pw_sync_freertos:counting_semaphore"

    # Configure backend for pw_spin_delay
    # This is still used by pw_display_driver_st7789/display_driver.cc:
    # https://pigweed.googlesource.com/pigweed/experimental/+/refs/heads/main/pw_display_driver_st7789/display_driver.cc#115
    pw_spin_delay_BACKEND = "$dir_pw_spin_delay_rp2040"

    app_common_BACKEND = "//applications/app_common_impl:pico_st7789_pio"

    pw_app_common_DISPLAY_WIDTH = "320"
    pw_app_common_DISPLAY_HEIGHT = "240"

    # Kudzu pin assignments.
    pw_app_common_BACKLIGHT_GPIO = "15"
    pw_app_common_DISPLAY_TE_GPIO = "16"
    pw_app_common_DISPLAY_CS_GPIO = "17"
    pw_app_common_DISPLAY_DC_GPIO = "20"
    pw_app_common_SPI_MOSI_GPIO = "19"
    pw_app_common_SPI_CLOCK_GPIO = "18"

    # Data from the display is unused.
    pw_app_common_SPI_MISO_GPIO = "-1"

    # Display reset pin is on the Kudzu GPIO expander
    pw_app_common_DISPLAY_RESET_GPIO = "-1"

    # Pico display pack 2 pin assignments.
    # pw_app_common_BACKLIGHT_GPIO = "20"
    # pw_app_common_DISPLAY_TE_GPIO = "21"
    # pw_app_common_DISPLAY_CS_GPIO = "17"
    # pw_app_common_DISPLAY_DC_GPIO = "16"
    # pw_app_common_SPI_MOSI_GPIO = "19"
    # pw_app_common_SPI_CLOCK_GPIO = "18"
  }
}
