# 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/lock-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 = 3940
}

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("lock_app") {
  output_name = "chip-mt793x-lock-app-example.out"
  include_dirs = [ "include" ]
  defines = []

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

  deps = [
    ":sdk",
    "${chip_root}/examples/common/QRCode",
    "${chip_root}/examples/lock-app/lock-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 = [ ":lock_app" ]
}

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