# Copyright (c) 2022 Project CHIP 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
#
# 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.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/mt793x_sdk.gni")
import("//build_overrides/pigweed.gni")

import("${build_root}/config/defaults.gni")
import("${mt793x_sdk_build_root}/mt793x_executable.gni")
import("${mt793x_sdk_build_root}/mt793x_sdk.gni")

import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni")
import("${chip_root}/src/platform/device.gni")

if (chip_enable_pw_rpc) {
  import("//build_overrides/pigweed.gni")
  import("$dir_pw_build/target_types.gni")
}

assert(current_os == "freertos")

mt793x_project_dir = "${chip_root}/examples/light-switch-app/genio"
mt793x_examples_plat_dir = "${chip_root}/examples/platform/mt793x"

declare_args() {
  # Dump memory usage at link time.
  chip_print_memory_usage = true

  # PIN code for PASE session establishment.
  setupPinCode = 20202021
  setupDiscriminator = 3840
}

mt793x_sdk("sdk") {
  sources = [
    "${mt793x_project_dir}/include/CHIPProjectConfig.h",
    "${mt793x_project_dir}/include/FreeRTOSConfig.h",
  ]

  include_dirs = [
    "${chip_root}/src/platform/mt793x",
    "${mt793x_project_dir}/include",
    "${mt793x_examples_plat_dir}",
    "${chip_root}/src/lib",
  ]

  defines = [ "OPENTHREAD_CONFIG_CLI_TRANSPORT=OT_CLI_TRANSPORT_CONSOLE" ]

  defines += [
    "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE=${setupPinCode}",
    "CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setupDiscriminator}",
  ]
}

mt793x_executable("light_switch_app") {
  output_name = "chip-mt793x-light-switch-app-example.out"
  include_dirs = [ "include" ]
  defines = []

  sources = [
    "src/AppTask.cpp",
    "src/BindingHandler.cpp",
    "src/LEDWidget.cpp",
    "src/ZclCallbacks.cpp",
    "src/main.cpp",
  ]

  deps = [
    ":sdk",
    "${chip_root}/examples/common/QRCode",
    "${chip_root}/examples/light-switch-app/light-switch-common",
    "${chip_root}/examples/providers:device_info_provider",
    "${chip_root}/src/lib",
    "${chip_root}/src/platform/logging:default",
    "${chip_root}/src/setup_payload",
    "${mt793x_examples_plat_dir}:genio-matter-shell",
  ]

  if (chip_enable_ota_requestor) {
    defines += [ "MT793X_OTA_ENABLED" ]
    sources += [ "${examples_plat_dir}/OTAConfig.cpp" ]
  }

  ldscript = "mt793x_xip.ld"

  inputs = [ ldscript ]

  ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ]

  if (chip_print_memory_usage) {
    ldflags += [
      "-Wl,--print-memory-usage",
      "-fstack-usage",
    ]
  }

  output_dir = root_out_dir
}

group("mt793x") {
  deps = [ ":light_switch_app" ]
}

group("default") {
  deps = [ ":mt793x" ]
}
