# Copyright (c) 2020 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/pigweed.gni")

import("${build_root}/config/linux/pkg_config.gni")
import("${chip_root}/build/chip/buildconfig_header.gni")

import("device.gni")

if (chip_enable_openthread) {
  import("//build_overrides/openthread.gni")

  if (chip_device_platform == "linux" || chip_device_platform == "darwin") {
    import("//build_overrides/ot_br_posix.gni")
  }
}

if (chip_device_platform != "none" && chip_device_platform != "external") {
  declare_args() {
    # Extra header to include in CHIPDeviceConfig.h for project.
    chip_device_project_config_include = ""

    # Date the firmware was built.
    chip_device_config_firmware_build_date = ""

    # Time the firmware was built.
    chip_device_config_firmware_build_time = ""

    # Use OpenThread ftd or mtd library
    chip_device_config_thread_ftd = chip_openthread_ftd

    # Enable including the additional data in the advertisement packets
    chip_enable_additional_data_advertising = false

    # Enable default/generic test-mode CommissionableDataProvider in GenericConfigurationManagerImpl
    # === FOR TRANSITION UNTIL ALL EXAMPLES PROVIDE THEIR OWN ===
    # Linux platform has already transitioned.
    chip_use_transitional_commissionable_data_provider =
        chip_device_platform != "linux" && chip_device_platform != "android"

    # Enable default/generic test-mode DeviceInstanceInfoProvider in GenericConfigurationManagerImpl
    # === FOR TRANSITION UNTIL ALL EXAMPLES PROVIDE THEIR OWN ===
    chip_use_transitional_device_instance_info_provider = true

    # lock tracking: none/log/fatal or auto for a platform-dependent choice
    chip_stack_lock_tracking = "auto"

    # todo: below operates are not work without root permission
    # pthread_attr_setschedpolicy in GenericPlatformManagerImpl_POSIX.cpp
    chip_device_config_run_as_root = current_os != "android"

    # Indication that the CHIP data model is included
    chip_enable_data_model = false

    # Device software version as an integer.  e.g. chip_device_config_device_software_version=7
    chip_device_config_device_software_version = ""

    # Device software version string as a string having the format "x.y"  e.g. chip_device_config_device_software_version="7.0" (but make sure to escape it from the shell!)
    chip_device_config_device_software_version_string = ""

    # Device vendor id as a decimal integer. Configurable vendor ids allowed are 65521 (0xFFF1), 65522 (0xFFF2), 655223 (0xFFF3).
    chip_device_config_device_vendor_id = ""

    # Device product id as a decimal integer. Configurable product ids allowed are in the range 32768 (0x8000) - 32867 (0x8063)
    chip_device_config_device_product_id = ""

    # Define the default number of ip addresses to discover
    chip_max_discovered_ip_addresses = 5

    # Allows enabling dynamic setting of the local MRP configuration, for
    # devices with multiple radios that have different sleep behavior for
    # different radios.
    chip_device_config_enable_dynamic_mrp_config = false

    # Define the default endpoint id for the generic Thread network commissioning instance
    chip_device_config_thread_network_endpoint_id = 0
  }

  if (chip_stack_lock_tracking == "auto") {
    if (chip_device_platform == "linux" || chip_device_platform == "tizen" ||
        chip_device_platform == "android" || current_os == "freertos" ||
        chip_device_platform == "webos" || chip_device_platform == "darwin") {
      # TODO: should be fatal for development. Change once bugs are fixed
      chip_stack_lock_tracking = "fatal"
    } else {
      # TODO: may want to enable at least logging for embedded to find bugs
      # this needs tuning depending on how many resources various platforms have
      # available (mainly flash size)
      chip_stack_lock_tracking = "none"
    }
  } else {
    assert(
        chip_stack_lock_tracking == "none" ||
            chip_stack_lock_tracking == "log" ||
            chip_stack_lock_tracking == "fatal",
        "Please select a valid value for chip_stack_lock_tracking: auto, none, log, fatal")
  }

  buildconfig_header("platform_buildconfig") {
    header = "CHIPDeviceBuildConfig.h"
    header_dir = "platform"

    chip_device_config_enable_wpa =
        chip_enable_wifi && chip_device_platform != "darwin"
    chip_stack_lock_tracking_log = chip_stack_lock_tracking != "none"
    chip_stack_lock_tracking_fatal = chip_stack_lock_tracking == "fatal"

    # This is used to identify which platforms implement their ThreadStackManager
    # with the otbr posix dbus api.
    chip_device_uses_otbr_posix_dbus =
        chip_enable_openthread &&
        (chip_device_platform == "linux" || chip_device_platform == "tizen" ||
         chip_device_platform == "webos")

    defines = [
      "CHIP_DEVICE_CONFIG_ENABLE_WPA=${chip_device_config_enable_wpa}",
      "CHIP_ENABLE_OPENTHREAD=${chip_enable_openthread}",
      "CHIP_DEVICE_CONFIG_THREAD_FTD=${chip_device_config_thread_ftd}",
      "CHIP_DEVICE_CONFIG_THREAD_BORDER_ROUTER=${chip_openthread_border_router}",
      "CHIP_DEVICE_CONFIG_USES_OTBR_POSIX_DBUS_STACK=${chip_device_uses_otbr_posix_dbus}",
      "CHIP_STACK_LOCK_TRACKING_ENABLED=${chip_stack_lock_tracking_log}",
      "CHIP_STACK_LOCK_TRACKING_ERROR_FATAL=${chip_stack_lock_tracking_fatal}",
      "CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING=${chip_enable_additional_data_advertising}",
      "CHIP_DEVICE_CONFIG_RUN_AS_ROOT=${chip_device_config_run_as_root}",
      "CHIP_DISABLE_PLATFORM_KVS=${chip_disable_platform_kvs}",
      "CHIP_USE_TRANSITIONAL_COMMISSIONABLE_DATA_PROVIDER=${chip_use_transitional_commissionable_data_provider}",
      "CHIP_USE_TRANSITIONAL_DEVICE_INSTANCE_INFO_PROVIDER=${chip_use_transitional_device_instance_info_provider}",
      "CHIP_DEVICE_CONFIG_ENABLE_DYNAMIC_MRP_CONFIG=${chip_device_config_enable_dynamic_mrp_config}",
      "CHIP_DEVICE_CONFIG_ENABLE_WIFIPAF=${chip_device_config_enable_wifipaf}",
    ]

    if (chip_device_platform == "linux" || chip_device_platform == "darwin" ||
        chip_device_platform == "tizen" || chip_device_platform == "android" ||
        chip_device_platform == "webos" || chip_device_platform == "bl602" ||
        chip_device_platform == "bl702" || chip_device_platform == "bl702l") {
      defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=${chip_enable_ble}" ]
    }

    if (chip_enable_nfc) {
      defines += [
        "CHIP_DEVICE_CONFIG_ENABLE_NFC=1",
        "CONFIG_CHIP_NFC_COMMISSIONING=1",
      ]
    }

    defines += [
      "CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR=${chip_enable_ota_requestor}",
    ]

    if (chip_device_project_config_include != "") {
      defines += [ "CHIP_DEVICE_PROJECT_CONFIG_INCLUDE=${chip_device_project_config_include}" ]
    }
    if (chip_device_platform_config_include != "") {
      defines += [ "CHIP_DEVICE_PLATFORM_CONFIG_INCLUDE=${chip_device_platform_config_include}" ]
    }

    if (chip_device_config_firmware_build_date != "") {
      defines += [ "CHIP_DEVICE_CONFIG_FIRWMARE_BUILD_DATE=\"${chip_device_config_firmware_build_date}\"" ]
    }
    if (chip_device_config_firmware_build_time != "") {
      defines += [ "CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME=\"${chip_device_config_firmware_build_time}\"" ]
    }

    if (chip_device_platform == "cc13x4_26x4") {
      device_layer_target_define = "CC13X4_26X4"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=cc13xx_26xx/cc13x4_26x4" ]
    } else if (chip_device_platform == "cc32xx") {
      device_layer_target_define = "CC32XX"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=cc32xx" ]
    } else if (chip_device_platform == "darwin") {
      device_layer_target_define = "DARWIN"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=Darwin",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else if (chip_device_platform == "efr32") {
      device_layer_target_define = "EFR32"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=silabs" ]
    } else if (chip_device_platform == "SiWx917") {
      device_layer_target_define = "EFR32"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=silabs" ]
    } else if (chip_device_platform == "esp32") {
      device_layer_target_define = "ESP32"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=ESP32" ]
    } else if (chip_device_platform == "psoc6") {
      device_layer_target_define = "PSOC6"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=Infineon/PSOC6" ]
    } else if (chip_device_platform == "linux") {
      device_layer_target_define = "LINUX"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=Linux",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else if (chip_device_platform == "tizen") {
      device_layer_target_define = "TIZEN"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=Tizen",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else if (chip_device_platform == "nrfconnect") {
      device_layer_target_define = "NRFCONNECT"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=nrfconnect" ]
    } else if (chip_device_platform == "qpg") {
      device_layer_target_define = "QPG"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=qpg" ]
    } else if (chip_device_platform == "nxp") {
      import("//build_overrides/nxp_sdk.gni")
      import("${nxp_sdk_build_root}/nxp_sdk.gni")
      device_layer_target_define = "NXP"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=${nxp_device_layer}",
        "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=${chip_enable_ble}",
      ]
    } else if (chip_device_platform == "nxp_zephyr") {
      device_layer_target_define = "NXP_ZEPHYR"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET_NXP_ZEPHYR=1",
        "CHIP_DEVICE_LAYER_TARGET=nxp/zephyr",
      ]
    } else if (chip_device_platform == "telink") {
      device_layer_target_define = "TELINK"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=telink" ]
    } else if (chip_device_platform == "mbed") {
      device_layer_target_define = "MBED"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=mbed",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
        "CHIP_DEVICE_ENABLE_DATA_MODEL=${chip_enable_data_model}",
      ]
    } else if (chip_device_platform == "bl602") {
      device_layer_target_define = "BL602"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=bouffalolab/common",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else if (chip_device_platform == "bl702") {
      device_layer_target_define = "BL702"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=bouffalolab/common",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else if (chip_device_platform == "bl702l") {
      device_layer_target_define = "BL702L"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=bouffalolab/common",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else if (chip_device_platform == "fake") {
      device_layer_target_define = "FAKE"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=fake" ]
    } else if (chip_device_platform == "android") {
      device_layer_target_define = "ANDROID"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=android",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else if (chip_device_platform == "ameba") {
      device_layer_target_define = "AMEBA"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=Ameba",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else if (chip_device_platform == "cyw30739") {
      device_layer_target_define = "CYW30739"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=Infineon/CYW30739" ]
    } else if (chip_device_platform == "webos") {
      device_layer_target_define = "WEBOS"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=webos",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
      defines -=
          [ "CHIP_DEVICE_CONFIG_ENABLE_WPA=${chip_device_config_enable_wpa}" ]
    } else if (chip_device_platform == "mw320") {
      device_layer_target_define = "MW320"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=nxp/mw320" ]
    } else if (chip_device_platform == "zephyr") {
      device_layer_target_define = "ZEPHYR"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=Zephyr" ]
    } else if (chip_device_platform == "beken") {
      device_layer_target_define = "BEKEN"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=Beken",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else if (chip_device_platform == "mt793x") {
      device_layer_target_define = "MT793X"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=mt793x",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else if (chip_device_platform == "openiotsdk") {
      device_layer_target_define = "OPEN_IOT_SDK"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=openiotsdk" ]
    } else if (chip_device_platform == "asr") {
      device_layer_target_define = "ASR"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=ASR" ]
    } else if (chip_device_platform == "stm32") {
      device_layer_target_define = "STM32"
      defines += [ "CHIP_DEVICE_LAYER_TARGET=stm32" ]
    } else if (chip_device_platform == "nuttx") {
      device_layer_target_define = "NUTTX"
      defines += [
        "CHIP_DEVICE_LAYER_TARGET=NuttX",
        "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}",
      ]
    } else {
      device_layer_target_define = ""
    }

    assert(device_layer_target_define != "",
           "Unknown chip_device_platform value: '${chip_device_platform}'")

    found_device_layer_target_define = false
    possible_device_layer_target_defines = [
      "CC13X4_26X4",
      "CC32XX",
      "DARWIN",
      "EFR32",
      "ESP32",
      "PSOC6",
      "LINUX",
      "TIZEN",
      "NRFCONNECT",
      "QPG",
      "NXP",
      "NXP_ZEPHYR",
      "TELINK",
      "MBED",
      "BL602",
      "BL702",
      "BL702L",
      "FAKE",
      "ANDROID",
      "AMEBA",
      "CYW30739",
      "WEBOS",
      "MW320",
      "ZEPHYR",
      "BEKEN",
      "MT793X",
      "OPEN_IOT_SDK",
      "ASR",
      "STM32",
      "NUTTX",
    ]
    foreach(possible_device_layer_target_define,
            possible_device_layer_target_defines) {
      if (possible_device_layer_target_define == device_layer_target_define) {
        found_device_layer_target_define = true
        defines += [
          "CHIP_DEVICE_LAYER_TARGET_${possible_device_layer_target_define}=1",
        ]
      } else {
        defines += [
          "CHIP_DEVICE_LAYER_TARGET_${possible_device_layer_target_define}=0",
        ]
      }
    }
    assert(
        found_device_layer_target_define,
        "possible_device_layer_target_defines list missing '${device_layer_target_define}'")

    if (chip_device_config_device_software_version != "") {
      defines += [ "CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION=${chip_device_config_device_software_version}" ]
    }

    if (chip_device_config_device_software_version_string != "") {
      defines += [ "CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING=\"${chip_device_config_device_software_version_string}\"" ]
    }

    if (chip_device_config_device_vendor_id != "") {
      defines += [ "CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID=${chip_device_config_device_vendor_id}" ]
    }

    if (chip_device_config_device_product_id != "") {
      defines += [ "CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID=${chip_device_config_device_product_id}" ]
    }

    defines += [ "CHIP_DEVICE_CONFIG_MAX_DISCOVERED_IP_ADDRESSES=${chip_max_discovered_ip_addresses}" ]

    if (chip_enable_openthread && chip_device_platform != "linux" &&
        chip_device_platform != "tizen" && chip_device_platform != "webos") {
      defines += [ "CHIP_DEVICE_CONFIG_THREAD_NETWORK_ENDPOINT_ID=${chip_device_config_thread_network_endpoint_id}" ]
    }

    visibility = [
      ":platform_config_header",
      "${chip_root}/src/ble:ble_config_header",
      "${chip_root}/src/system:system_config_header",
    ]
  }
} else if (chip_device_platform == "none") {
  buildconfig_header("platform_buildconfig") {
    header = "CHIPDeviceBuildConfig.h"
    header_dir = "platform"

    defines = [
      "CHIP_DEVICE_LAYER_NONE=1",
      "CHIP_DEVICE_LAYER_TARGET=NONE",
    ]

    if (current_os == "android") {
      defines += [ "EXTERNAL_KEYVALUESTOREMANAGERIMPL_HEADER=\"controller/java/AndroidKeyValueStoreManagerImpl.h\"" ]
    }
  }
} else {
  group("platform_buildconfig") {
    public_deps = [ "${chip_platform_target}:platform_buildconfig" ]
  }
}

source_set("platform_config_header") {
  sources = [ "../include/platform/CHIPDeviceConfig.h" ]

  deps = [ ":platform_buildconfig" ]
}

if (chip_device_platform != "none") {
  source_set("platform_base") {
    public_deps = [
      ":platform_config_header",
      "${chip_root}/src/app/icd/server:icd-server-config",
      "${chip_root}/src/ble",
      "${chip_root}/src/credentials:build_time_header",
      "${chip_root}/src/inet",
      "${chip_root}/src/lib/core",
      "${chip_root}/src/lib/support",
      "${chip_root}/src/setup_payload:additional_data_payload",
      "${chip_root}/src/system",
    ]

    public_configs = [ "${chip_root}/src:includes" ]
  }

  static_library("platform") {
    output_name = "libDeviceLayer"

    sources = [
      "../include/platform/BuildTime.h",
      "../include/platform/CHIPDeviceError.h",
      "../include/platform/CHIPDeviceEvent.h",
      "../include/platform/CHIPDeviceLayer.h",
      "../include/platform/CommissionableDataProvider.h",
      "../include/platform/ConfigurationManager.h",
      "../include/platform/ConnectivityManager.h",
      "../include/platform/DeviceControlServer.h",
      "../include/platform/DeviceInstanceInfoProvider.h",
      "../include/platform/GeneralUtils.h",
      "../include/platform/KeyValueStoreManager.h",
      "../include/platform/KvsPersistentStorageDelegate.h",
      "../include/platform/PersistedStorage.h",
      "../include/platform/PlatformManager.h",
      "../include/platform/RuntimeOptionsProvider.h",
      "../include/platform/TestOnlyCommissionableDataProvider.h",
      "../include/platform/ThreadStackManager.h",
      "../include/platform/internal/BLEManager.h",
      "../include/platform/internal/CHIPDeviceLayerInternal.h",
      "../include/platform/internal/DeviceNetworkInfo.h",
      "../include/platform/internal/EventLogging.h",
      "../include/platform/internal/GenericConfigurationManagerImpl.h",
      "../include/platform/internal/GenericConfigurationManagerImpl.ipp",
      "../include/platform/internal/GenericConnectivityManagerImpl.h",
      "../include/platform/internal/GenericConnectivityManagerImpl_BLE.h",
      "../include/platform/internal/GenericConnectivityManagerImpl_BLE.ipp",
      "../include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h",
      "../include/platform/internal/GenericConnectivityManagerImpl_NoThread.h",
      "../include/platform/internal/GenericConnectivityManagerImpl_NoWiFi.h",
      "../include/platform/internal/GenericConnectivityManagerImpl_TCP.h",
      "../include/platform/internal/GenericConnectivityManagerImpl_TCP.ipp",
      "../include/platform/internal/GenericConnectivityManagerImpl_Thread.h",
      "../include/platform/internal/GenericConnectivityManagerImpl_Thread.ipp",
      "../include/platform/internal/GenericConnectivityManagerImpl_UDP.h",
      "../include/platform/internal/GenericConnectivityManagerImpl_UDP.ipp",
      "../include/platform/internal/GenericConnectivityManagerImpl_WiFi.h",
      "../include/platform/internal/GenericConnectivityManagerImpl_WiFi.ipp",
      "../include/platform/internal/GenericDeviceInstanceInfoProvider.h",
      "../include/platform/internal/GenericDeviceInstanceInfoProvider.ipp",
      "../include/platform/internal/GenericPlatformManagerImpl.h",
      "../include/platform/internal/GenericPlatformManagerImpl.ipp",
      "../include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.h",
      "../include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.ipp",
      "../include/platform/internal/GenericPlatformManagerImpl_POSIX.h",
      "../include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp",
      "../include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp",
      "../include/platform/internal/testing/ConfigUnitTest.h",
      "CommissionableDataProvider.cpp",
      "DeviceControlServer.cpp",
      "DeviceInfoProvider.cpp",
      "DeviceInstanceInfoProvider.cpp",
      "DiagnosticDataProvider.cpp",
      "Entropy.cpp",
      "GeneralUtils.cpp",
      "Globals.cpp",
      "LockTracker.cpp",
      "PersistedStorage.cpp",
      "PlatformEventSupport.cpp",
      "RuntimeOptionsProvider.cpp",
    ]

    # Linux has its own NetworkCommissioningThreadDriver
    if (chip_enable_openthread && chip_device_platform != "linux" &&
        chip_device_platform != "tizen" && chip_device_platform != "webos") {
      sources += [
        "OpenThread/GenericNetworkCommissioningThreadDriver.cpp",
        "OpenThread/GenericNetworkCommissioningThreadDriver.h",
      ]
    }

    cflags = [ "-Wconversion" ]

    public_deps = [
      ":platform_base",
      "${chip_root}/src/app/common:cluster-objects",
      "${chip_root}/src/crypto",
      "${chip_root}/src/lib/support",
    ]

    if (chip_device_platform == "cc13x4_26x4") {
      _platform_target = "cc13xx_26xx/cc13x4_26x4"
    } else if (chip_device_platform == "cc32xx") {
      _platform_target = "cc32xx"
    } else if (chip_device_platform == "darwin") {
      _platform_target = "Darwin"
    } else if (chip_device_platform == "efr32") {
      _platform_target = "silabs/efr32"
    } else if (chip_device_platform == "SiWx917") {
      _platform_target = "silabs/SiWx917"
    } else if (chip_device_platform == "esp32") {
      _platform_target = "ESP32"
    } else if (chip_device_platform == "linux") {
      _platform_target = "Linux"
    } else if (chip_device_platform == "nrfconnect") {
      _platform_target = "nrfconnect"
    } else if (chip_device_platform == "qpg") {
      _platform_target = "qpg"
    } else if (chip_device_platform == "nxp") {
      _platform_target = "nxp/${nxp_platform}:nxp_platform"
    } else if (chip_device_platform == "nxp_zephyr") {
      _platform_target = "nxp/zephyr:nxp_zephyr"
    } else if (chip_device_platform == "telink") {
      _platform_target = "telink"
    } else if (chip_device_platform == "mbed") {
      _platform_target = "mbed"
    } else if (chip_device_platform == "tizen") {
      _platform_target = "Tizen"
    } else if (chip_device_platform == "android") {
      _platform_target = "android"
    } else if (chip_device_platform == "external") {
      _platform_target = chip_platform_target
    } else if (chip_device_platform == "psoc6") {
      _platform_target = "Infineon/PSOC6"
    } else if (chip_device_platform == "ameba") {
      _platform_target = "Ameba"
    } else if (chip_device_platform == "webos") {
      _platform_target = "webos"
    } else if (chip_device_platform == "bl602") {
      _platform_target = "bouffalolab/BL602"
    } else if (chip_device_platform == "bl702") {
      _platform_target = "bouffalolab/BL702"
    } else if (chip_device_platform == "bl702l") {
      _platform_target = "bouffalolab/BL702L"
    } else if (chip_device_platform == "fake") {
      _platform_target = "fake"
    } else if (chip_device_platform == "cyw30739") {
      _platform_target = "Infineon/CYW30739"
    } else if (chip_device_platform == "mw320") {
      _platform_target = "nxp/mw320"
    } else if (chip_device_platform == "zephyr") {
      _platform_target = "Zephyr"
    } else if (chip_device_platform == "beken") {
      _platform_target = "Beken"
    } else if (chip_device_platform == "mt793x") {
      _platform_target = "mt793x"
    } else if (chip_device_platform == "openiotsdk") {
      _platform_target = "openiotsdk"
    } else if (chip_device_platform == "asr") {
      _platform_target = "ASR"
    } else if (chip_device_platform == "stm32") {
      _platform_target = "stm32"
    } else if (chip_device_platform == "nuttx") {
      _platform_target = "NuttX"
    } else {
      assert(false, "Unknown chip_device_platform: ${chip_device_platform}")
    }

    public_deps += [ _platform_target ]

    # The platform target needs to include the headers, so allow that here.
    # It should be considered logically part of this target.
    allow_circular_includes_from = [
      _platform_target,
      "${chip_root}/src/lib/support",
    ]
  }
} else {
  group("platform") {
    public_deps = [ ":platform_buildconfig" ]
  }

  source_set("platform_base") {
  }
}

source_set("syscalls_stub") {
  sources = [ "SyscallStubs.cpp" ]
}
