# 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/lighting-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" ]

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

  sources = [
    "src/AppTask.cpp",
    "src/ColorFormat.cpp",
    "src/DimmableLEDWidget.cpp",
    "src/LEDWidget.cpp",
    "src/LightingManager.cpp",
    "src/ZclCallbacks.cpp",
    "src/main.cpp",
  ]

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

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