Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 1 | # Copyright (c) 2020 Project CHIP Authors |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 15 | import("//build_overrides/build.gni") |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 16 | import("//build_overrides/chip.gni") |
| 17 | import("//build_overrides/nlio.gni") |
rgoliver | bf60cc2 | 2021-01-26 21:15:59 -0500 | [diff] [blame] | 18 | import("//build_overrides/pigweed.gni") |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 19 | |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 20 | import("${build_root}/config/linux/pkg_config.gni") |
Michael Spang | 09611bf | 2021-03-02 16:31:57 -0500 | [diff] [blame] | 21 | import("${chip_root}/build/chip/buildconfig_header.gni") |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 22 | |
Michael Spang | 8d085b3 | 2020-07-10 10:26:23 -0400 | [diff] [blame] | 23 | import("device.gni") |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 24 | |
Michael Spang | c32dd2f | 2020-08-13 08:42:21 -0400 | [diff] [blame] | 25 | if (chip_enable_openthread) { |
| 26 | import("//build_overrides/openthread.gni") |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 27 | |
Boris Zbarsky | ec71346 | 2022-01-06 15:53:22 -0500 | [diff] [blame] | 28 | if (chip_device_platform == "linux" || chip_device_platform == "darwin") { |
Łukasz Duda | 4e1faf2 | 2021-01-27 17:47:25 +0100 | [diff] [blame] | 29 | import("//build_overrides/ot_br_posix.gni") |
| 30 | } |
Michael Spang | c32dd2f | 2020-08-13 08:42:21 -0400 | [diff] [blame] | 31 | } |
| 32 | |
Jiacheng Guo | d3dd5e0 | 2022-03-30 23:43:12 +0800 | [diff] [blame] | 33 | if (chip_device_platform != "none" && chip_device_platform != "external") { |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 34 | declare_args() { |
| 35 | # Extra header to include in CHIPDeviceConfig.h for project. |
| 36 | chip_device_project_config_include = "" |
Michael Spang | da4c125 | 2020-08-06 10:40:49 -0400 | [diff] [blame] | 37 | |
| 38 | # Date the firmware was built. |
| 39 | chip_device_config_firmware_build_date = "" |
| 40 | |
| 41 | # Time the firmware was built. |
| 42 | chip_device_config_firmware_build_time = "" |
Jiacheng Guo | e4ac46a | 2020-11-11 00:04:34 +0800 | [diff] [blame] | 43 | |
Jiacheng Guo | b7598a0 | 2021-12-09 23:44:38 +0800 | [diff] [blame] | 44 | # Use OpenThread ftd or mtd library |
| 45 | chip_device_config_thread_ftd = chip_openthread_ftd |
| 46 | |
hnnajh | 9661374 | 2021-01-06 08:05:28 -0800 | [diff] [blame] | 47 | # Enable including the additional data in the advertisement packets |
Shubham Patil | 175218b | 2022-01-04 21:31:30 +0530 | [diff] [blame] | 48 | chip_enable_additional_data_advertising = false |
hnnajh | 846f2f1 | 2021-02-18 05:45:15 -0800 | [diff] [blame] | 49 | |
Tennessee Carmel-Veilleux | 8f86c43 | 2022-03-11 15:49:56 -0500 | [diff] [blame] | 50 | # Enable default/generic test-mode CommissionableDataProvider in GenericConfigurationManagerImpl |
| 51 | # === FOR TRANSITION UNTIL ALL EXAMPLES PROVIDE THEIR OWN === |
| 52 | # Linux platform has already transitioned. |
| 53 | chip_use_transitional_commissionable_data_provider = |
Hui.Li-TCL | 48b48c2 | 2022-03-25 23:18:10 +0800 | [diff] [blame] | 54 | chip_device_platform != "linux" && chip_device_platform != "android" |
Tennessee Carmel-Veilleux | 8f86c43 | 2022-03-11 15:49:56 -0500 | [diff] [blame] | 55 | |
Andrei Litvin | 4ae09b3 | 2021-05-11 09:14:27 -0400 | [diff] [blame] | 56 | # lock tracking: none/log/fatal or auto for a platform-dependent choice |
| 57 | chip_stack_lock_tracking = "auto" |
Hui.Li-TCL | 924f36e | 2021-09-30 20:51:41 +0800 | [diff] [blame] | 58 | |
| 59 | # todo: below operates are not work without root permission |
| 60 | # pthread_attr_setschedpolicy in GenericPlatformManagerImpl_POSIX.cpp |
| 61 | chip_device_config_run_as_root = current_os != "android" |
Artur Tynecki | b4921fc | 2022-02-21 17:44:34 +0100 | [diff] [blame] | 62 | |
| 63 | # Indication that the CHIP data model is included |
| 64 | chip_enable_data_model = false |
MtTsai | 5809552 | 2022-06-23 02:34:17 +0800 | [diff] [blame] | 65 | |
| 66 | # The string of device software version was built. |
| 67 | chip_device_config_device_software_version_string = "" |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 68 | } |
| 69 | |
Michael Spang | 732e1c0 | 2021-06-14 10:21:18 -0400 | [diff] [blame] | 70 | if (chip_stack_lock_tracking == "auto") { |
Hui.Li-TCL | 924f36e | 2021-09-30 20:51:41 +0800 | [diff] [blame] | 71 | if (chip_device_platform == "linux" || chip_device_platform == "tizen" || |
sungmok shin | b3c3799 | 2022-03-02 02:55:12 +0900 | [diff] [blame] | 72 | chip_device_platform == "android" || current_os == "freertos" || |
Boris Zbarsky | c1d5431 | 2022-06-30 20:58:20 -0400 | [diff] [blame] | 73 | chip_device_platform == "webos" || chip_device_platform == "darwin") { |
Michael Spang | 732e1c0 | 2021-06-14 10:21:18 -0400 | [diff] [blame] | 74 | # TODO: should be fatal for development. Change once bugs are fixed |
Boris Zbarsky | 17dc4b0 | 2022-02-15 08:58:13 -0500 | [diff] [blame] | 75 | chip_stack_lock_tracking = "fatal" |
Michael Spang | 732e1c0 | 2021-06-14 10:21:18 -0400 | [diff] [blame] | 76 | } else { |
| 77 | # TODO: may want to enable at least logging for embedded to find bugs |
| 78 | # this needs tuning depending on how many resources various platforms have |
| 79 | # available (mainly flash size) |
| 80 | chip_stack_lock_tracking = "none" |
| 81 | } |
| 82 | } else { |
| 83 | assert( |
| 84 | chip_stack_lock_tracking == "none" || |
| 85 | chip_stack_lock_tracking == "log" || |
| 86 | chip_stack_lock_tracking == "fatal", |
| 87 | "Please select a valid value for chip_stack_lock_tracking: auto, none, log, fatal") |
| 88 | } |
| 89 | |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 90 | buildconfig_header("platform_buildconfig") { |
| 91 | header = "CHIPDeviceBuildConfig.h" |
| 92 | header_dir = "platform" |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 93 | |
Vivien Nicolas | 770a2e2 | 2022-07-05 18:21:02 +0200 | [diff] [blame] | 94 | chip_device_config_enable_wpa = |
| 95 | chip_enable_wifi && chip_device_platform != "darwin" |
Michael Spang | 732e1c0 | 2021-06-14 10:21:18 -0400 | [diff] [blame] | 96 | chip_stack_lock_tracking_log = chip_stack_lock_tracking != "none" |
| 97 | chip_stack_lock_tracking_fatal = chip_stack_lock_tracking == "fatal" |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 98 | defines = [ |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 99 | "CHIP_DEVICE_CONFIG_ENABLE_WPA=${chip_device_config_enable_wpa}", |
| 100 | "CHIP_ENABLE_OPENTHREAD=${chip_enable_openthread}", |
Jiacheng Guo | b7598a0 | 2021-12-09 23:44:38 +0800 | [diff] [blame] | 101 | "CHIP_DEVICE_CONFIG_THREAD_FTD=${chip_device_config_thread_ftd}", |
Michael Spang | 732e1c0 | 2021-06-14 10:21:18 -0400 | [diff] [blame] | 102 | "CHIP_STACK_LOCK_TRACKING_ENABLED=${chip_stack_lock_tracking_log}", |
| 103 | "CHIP_STACK_LOCK_TRACKING_ERROR_FATAL=${chip_stack_lock_tracking_fatal}", |
| 104 | "CHIP_ENABLE_ADDITIONAL_DATA_ADVERTISING=${chip_enable_additional_data_advertising}", |
Hui.Li-TCL | 924f36e | 2021-09-30 20:51:41 +0800 | [diff] [blame] | 105 | "CHIP_DEVICE_CONFIG_RUN_AS_ROOT=${chip_device_config_run_as_root}", |
Boris Zbarsky | 7666b04 | 2022-04-27 10:19:16 -0400 | [diff] [blame] | 106 | "CHIP_DISABLE_PLATFORM_KVS=${chip_disable_platform_kvs}", |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 107 | ] |
| 108 | |
Wootak Jung | e945d16 | 2021-09-13 10:39:32 +0900 | [diff] [blame] | 109 | if (chip_device_platform == "linux" || chip_device_platform == "darwin" || |
doru91 | ca807a2 | 2022-04-05 18:44:08 +0300 | [diff] [blame] | 110 | chip_device_platform == "tizen" || chip_device_platform == "android" || |
sungho1.shin | fda7854 | 2022-05-25 04:21:58 +0900 | [diff] [blame] | 111 | chip_device_platform == "k32w0" || chip_device_platform == "webos") { |
Michael Spang | e1aa7b1 | 2021-03-09 18:08:38 -0500 | [diff] [blame] | 112 | defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=${chip_enable_ble}" ] |
| 113 | } |
| 114 | |
Damian Królik | 5d00d1c | 2021-04-07 03:31:43 +0200 | [diff] [blame] | 115 | if (chip_enable_nfc) { |
doru91 | 01e54b2 | 2022-04-14 13:29:13 +0300 | [diff] [blame] | 116 | defines += [ |
| 117 | "CHIP_DEVICE_CONFIG_ENABLE_NFC=1", |
| 118 | "CONFIG_CHIP_NFC_COMMISSIONING=1", |
| 119 | ] |
Damian Królik | 5d00d1c | 2021-04-07 03:31:43 +0200 | [diff] [blame] | 120 | } |
| 121 | |
Damian Królik | 79fe72a | 2021-11-23 10:26:03 +0100 | [diff] [blame] | 122 | if (chip_enable_ota_requestor) { |
| 123 | defines += [ "CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR=1" ] |
| 124 | } |
| 125 | |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 126 | if (chip_device_project_config_include != "") { |
| 127 | defines += [ "CHIP_DEVICE_PROJECT_CONFIG_INCLUDE=${chip_device_project_config_include}" ] |
| 128 | } |
| 129 | if (chip_device_platform_config_include != "") { |
| 130 | defines += [ "CHIP_DEVICE_PLATFORM_CONFIG_INCLUDE=${chip_device_platform_config_include}" ] |
| 131 | } |
| 132 | |
Michael Spang | da4c125 | 2020-08-06 10:40:49 -0400 | [diff] [blame] | 133 | if (chip_device_config_firmware_build_date != "") { |
Michael Spang | 801349e | 2020-08-10 09:15:04 -0400 | [diff] [blame] | 134 | defines += [ "CHIP_DEVICE_CONFIG_FIRWMARE_BUILD_DATE=\"${chip_device_config_firmware_build_date}\"" ] |
Michael Spang | da4c125 | 2020-08-06 10:40:49 -0400 | [diff] [blame] | 135 | } |
| 136 | if (chip_device_config_firmware_build_time != "") { |
Michael Spang | 801349e | 2020-08-10 09:15:04 -0400 | [diff] [blame] | 137 | defines += [ "CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME=\"${chip_device_config_firmware_build_time}\"" ] |
Michael Spang | da4c125 | 2020-08-06 10:40:49 -0400 | [diff] [blame] | 138 | } |
| 139 | |
Tennessee Carmel-Veilleux | 8f86c43 | 2022-03-11 15:49:56 -0500 | [diff] [blame] | 140 | if (chip_use_transitional_commissionable_data_provider) { |
| 141 | defines += [ "CHIP_USE_TRANSITIONAL_COMMISSIONABLE_DATA_PROVIDER=1" ] |
| 142 | } else { |
| 143 | defines += [ "CHIP_USE_TRANSITIONAL_COMMISSIONABLE_DATA_PROVIDER=0" ] |
| 144 | } |
| 145 | |
Seth Rickard | 4f0521f | 2021-01-12 16:06:52 -0600 | [diff] [blame] | 146 | if (chip_device_platform == "cc13x2_26x2") { |
| 147 | defines += [ |
| 148 | "CHIP_DEVICE_LAYER_TARGET_CC13X2_26X2=1", |
| 149 | "CHIP_DEVICE_LAYER_TARGET=cc13x2_26x2", |
| 150 | ] |
abiradarti | f496784 | 2022-06-28 09:19:03 -0500 | [diff] [blame] | 151 | } else if (chip_device_platform == "cc32xx") { |
| 152 | defines += [ |
| 153 | "CHIP_DEVICE_LAYER_TARGET_CC32XX=1", |
| 154 | "CHIP_DEVICE_LAYER_TARGET=cc32xx", |
| 155 | ] |
Seth Rickard | 4f0521f | 2021-01-12 16:06:52 -0600 | [diff] [blame] | 156 | } else if (chip_device_platform == "darwin") { |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 157 | defines += [ |
| 158 | "CHIP_DEVICE_LAYER_TARGET_DARWIN=1", |
| 159 | "CHIP_DEVICE_LAYER_TARGET=Darwin", |
Vivien Nicolas | 770a2e2 | 2022-07-05 18:21:02 +0200 | [diff] [blame] | 160 | "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 161 | ] |
Rafał Kuźnia | 90bc94c | 2020-08-31 19:54:04 +0200 | [diff] [blame] | 162 | } else if (chip_device_platform == "efr32") { |
| 163 | defines += [ |
| 164 | "CHIP_DEVICE_LAYER_TARGET_EFR32=1", |
chirag-silabs | 64252c8 | 2022-11-24 19:53:53 +0530 | [diff] [blame] | 165 | "CHIP_DEVICE_LAYER_TARGET=silabs", |
Rafał Kuźnia | 90bc94c | 2020-08-31 19:54:04 +0200 | [diff] [blame] | 166 | ] |
| 167 | } else if (chip_device_platform == "esp32") { |
| 168 | defines += [ |
| 169 | "CHIP_DEVICE_LAYER_TARGET_ESP32=1", |
| 170 | "CHIP_DEVICE_LAYER_TARGET=ESP32", |
| 171 | ] |
Praveen Chandran | ab02839 | 2022-08-18 07:39:28 -0700 | [diff] [blame] | 172 | } else if (chip_device_platform == "psoc6") { |
Praveen Chandran | 080ae57 | 2021-08-12 07:58:27 -0700 | [diff] [blame] | 173 | defines += [ |
Praveen Chandran | ab02839 | 2022-08-18 07:39:28 -0700 | [diff] [blame] | 174 | "CHIP_DEVICE_LAYER_TARGET_PSOC6=1", |
| 175 | "CHIP_DEVICE_LAYER_TARGET=Infineon/PSOC6", |
Praveen Chandran | 080ae57 | 2021-08-12 07:58:27 -0700 | [diff] [blame] | 176 | ] |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 177 | } else if (chip_device_platform == "linux") { |
| 178 | defines += [ |
| 179 | "CHIP_DEVICE_LAYER_TARGET_LINUX=1", |
| 180 | "CHIP_DEVICE_LAYER_TARGET=Linux", |
Yufeng Wang | c23becb | 2021-09-30 11:18:04 -0700 | [diff] [blame] | 181 | "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 182 | ] |
Wootak Jung | e945d16 | 2021-09-13 10:39:32 +0900 | [diff] [blame] | 183 | } else if (chip_device_platform == "tizen") { |
| 184 | defines += [ |
| 185 | "CHIP_DEVICE_LAYER_TARGET_TIZEN=1", |
| 186 | "CHIP_DEVICE_LAYER_TARGET=Tizen", |
| 187 | "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", |
| 188 | ] |
| 189 | defines -= |
| 190 | [ "CHIP_DEVICE_CONFIG_ENABLE_WPA=${chip_device_config_enable_wpa}" ] |
Rafał Kuźnia | 90bc94c | 2020-08-31 19:54:04 +0200 | [diff] [blame] | 191 | } else if (chip_device_platform == "nrfconnect") { |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 192 | defines += [ |
Rafał Kuźnia | 90bc94c | 2020-08-31 19:54:04 +0200 | [diff] [blame] | 193 | "CHIP_DEVICE_LAYER_TARGET_NRFCONNECT=1", |
| 194 | "CHIP_DEVICE_LAYER_TARGET=nrfconnect", |
Kedar Sovani | 8617e2a | 2020-08-30 02:33:21 +0530 | [diff] [blame] | 195 | ] |
Timothy Maes | 2478e02 | 2021-07-02 04:03:46 +0200 | [diff] [blame] | 196 | } else if (chip_device_platform == "qpg") { |
Timothy Maes | b5b3d38 | 2020-10-05 16:59:21 +0200 | [diff] [blame] | 197 | defines += [ |
Timothy Maes | 2478e02 | 2021-07-02 04:03:46 +0200 | [diff] [blame] | 198 | "CHIP_DEVICE_LAYER_TARGET_QPG=1", |
| 199 | "CHIP_DEVICE_LAYER_TARGET=qpg", |
Timothy Maes | b5b3d38 | 2020-10-05 16:59:21 +0200 | [diff] [blame] | 200 | ] |
PetruSicoe | 0aac8fd | 2021-10-07 15:52:08 +0300 | [diff] [blame] | 201 | } else if (chip_device_platform == "k32w0") { |
doru91 | 04ac26b | 2020-10-13 18:23:28 +0300 | [diff] [blame] | 202 | defines += [ |
| 203 | "CHIP_DEVICE_LAYER_TARGET_K32W=1", |
PetruSicoe | 0aac8fd | 2021-10-07 15:52:08 +0300 | [diff] [blame] | 204 | "CHIP_DEVICE_LAYER_TARGET=nxp/k32w/k32w0", |
doru91 | 04ac26b | 2020-10-13 18:23:28 +0300 | [diff] [blame] | 205 | ] |
Alexandr Kolosov | fc7146c | 2021-06-09 20:57:36 +0300 | [diff] [blame] | 206 | } else if (chip_device_platform == "telink") { |
| 207 | defines += [ |
| 208 | "CHIP_DEVICE_LAYER_TARGET_TELINK=1", |
| 209 | "CHIP_DEVICE_LAYER_TARGET=telink", |
| 210 | ] |
Vincent Coubard | cc13560 | 2021-06-29 16:58:47 +0100 | [diff] [blame] | 211 | } else if (chip_device_platform == "mbed") { |
| 212 | defines += [ |
| 213 | "CHIP_DEVICE_LAYER_TARGET_MBED=1", |
| 214 | "CHIP_DEVICE_LAYER_TARGET=mbed", |
Artur Tynecki | b4921fc | 2022-02-21 17:44:34 +0100 | [diff] [blame] | 215 | "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", |
| 216 | "CHIP_DEVICE_ENABLE_DATA_MODEL=${chip_enable_data_model}", |
Vincent Coubard | cc13560 | 2021-06-29 16:58:47 +0100 | [diff] [blame] | 217 | ] |
jczhang777 | 3666138 | 2022-04-04 21:33:18 +0800 | [diff] [blame] | 218 | } else if (chip_device_platform == "bl602") { |
| 219 | defines += [ |
| 220 | "CHIP_DEVICE_LAYER_TARGET_BL602=1", |
| 221 | "CHIP_DEVICE_LAYER_TARGET=bouffalolab/BL602", |
wyhong | 3bd8337 | 2022-11-09 17:41:06 +0800 | [diff] [blame] | 222 | "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", |
jczhang777 | 3666138 | 2022-04-04 21:33:18 +0800 | [diff] [blame] | 223 | ] |
wyhong | 0ca9aa4 | 2022-09-12 23:24:16 +0800 | [diff] [blame] | 224 | } else if (chip_device_platform == "bl702") { |
| 225 | defines += [ |
| 226 | "CHIP_DEVICE_LAYER_TARGET_BL702=1", |
| 227 | "CHIP_DEVICE_LAYER_TARGET=bouffalolab/BL702", |
wyhong | 3bd8337 | 2022-11-09 17:41:06 +0800 | [diff] [blame] | 228 | "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", |
wyhong | 0ca9aa4 | 2022-09-12 23:24:16 +0800 | [diff] [blame] | 229 | ] |
C Freeman | 79c9315 | 2021-08-18 00:20:05 -0400 | [diff] [blame] | 230 | } else if (chip_device_platform == "fake") { |
| 231 | defines += [ |
| 232 | "CHIP_DEVICE_LAYER_TARGET_FAKE=1", |
| 233 | "CHIP_DEVICE_LAYER_TARGET=fake", |
| 234 | ] |
Hui.Li-TCL | 924f36e | 2021-09-30 20:51:41 +0800 | [diff] [blame] | 235 | } else if (chip_device_platform == "android") { |
| 236 | defines += [ |
| 237 | "CHIP_DEVICE_LAYER_TARGET_ANDROID=1", |
| 238 | "CHIP_DEVICE_LAYER_TARGET=android", |
| 239 | ] |
pankore | 544da73c | 2021-10-19 02:51:16 +0800 | [diff] [blame] | 240 | } else if (chip_device_platform == "ameba") { |
| 241 | defines += [ |
| 242 | "CHIP_DEVICE_LAYER_TARGET_AMEBA=1", |
| 243 | "CHIP_DEVICE_LAYER_TARGET=Ameba", |
pankore | e6dab371 | 2021-11-10 01:52:01 +0800 | [diff] [blame] | 244 | "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", |
pankore | 544da73c | 2021-10-19 02:51:16 +0800 | [diff] [blame] | 245 | ] |
Todd Chou | 1af90eb | 2022-01-21 12:29:29 +0800 | [diff] [blame] | 246 | } else if (chip_device_platform == "cyw30739") { |
| 247 | defines += [ |
| 248 | "CHIP_DEVICE_LAYER_TARGET_CYW30739=1", |
Praveen Chandran | ab02839 | 2022-08-18 07:39:28 -0700 | [diff] [blame] | 249 | "CHIP_DEVICE_LAYER_TARGET=Infineon/CYW30739", |
Todd Chou | 1af90eb | 2022-01-21 12:29:29 +0800 | [diff] [blame] | 250 | ] |
sungmok shin | b3c3799 | 2022-03-02 02:55:12 +0900 | [diff] [blame] | 251 | } else if (chip_device_platform == "webos") { |
| 252 | defines += [ |
| 253 | "CHIP_DEVICE_LAYER_TARGET_WEBOS=1", |
sungho1.shin | fda7854 | 2022-05-25 04:21:58 +0900 | [diff] [blame] | 254 | "CHIP_DEVICE_LAYER_TARGET=webos", |
sungmok shin | b3c3799 | 2022-03-02 02:55:12 +0900 | [diff] [blame] | 255 | "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", |
| 256 | ] |
| 257 | defines -= |
| 258 | [ "CHIP_DEVICE_CONFIG_ENABLE_WPA=${chip_device_config_enable_wpa}" ] |
nxptest | 2d0c529 | 2022-06-24 19:04:49 +0800 | [diff] [blame] | 259 | } else if (chip_device_platform == "mw320") { |
| 260 | defines += [ |
| 261 | "CHIP_DEVICE_LAYER_TARGET_MW320=1", |
| 262 | "CHIP_DEVICE_LAYER_TARGET=nxp/mw320", |
| 263 | ] |
Jandy Gou | 3ffd066 | 2022-06-14 22:02:05 +0800 | [diff] [blame] | 264 | } else if (chip_device_platform == "zephyr") { |
| 265 | defines += [ |
| 266 | "CHIP_DEVICE_LAYER_TARGET_ZEPHYR=1", |
| 267 | "CHIP_DEVICE_LAYER_TARGET=Zephyr", |
| 268 | ] |
zhengyaohan | 0528a42 | 2022-08-16 06:52:33 +0800 | [diff] [blame] | 269 | } else if (chip_device_platform == "beken") { |
| 270 | defines += [ |
| 271 | "CHIP_DEVICE_LAYER_TARGET_BEKEN=1", |
| 272 | "CHIP_DEVICE_LAYER_TARGET=Beken", |
gugugu | 3a3b1db | 2022-09-15 02:31:13 +0800 | [diff] [blame] | 273 | "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", |
pakls | 0168a57 | 2022-09-14 03:05:11 +0800 | [diff] [blame] | 274 | ] |
| 275 | } else if (chip_device_platform == "mt793x") { |
| 276 | defines += [ |
| 277 | "CHIP_DEVICE_LAYER_TARGET_MT793X=1", |
| 278 | "CHIP_DEVICE_LAYER_TARGET=mt793x", |
zhengyaohan | 0528a42 | 2022-08-16 06:52:33 +0800 | [diff] [blame] | 279 | "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", |
| 280 | ] |
Kedar Sovani | 8617e2a | 2020-08-30 02:33:21 +0530 | [diff] [blame] | 281 | } |
MtTsai | 5809552 | 2022-06-23 02:34:17 +0800 | [diff] [blame] | 282 | |
| 283 | if (chip_device_config_device_software_version_string != "") { |
| 284 | defines += [ "CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING=\"${chip_device_config_device_software_version_string}\"" ] |
| 285 | } |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 286 | } |
Jiacheng Guo | d3dd5e0 | 2022-03-30 23:43:12 +0800 | [diff] [blame] | 287 | } else if (chip_device_platform == "none") { |
Jiacheng Guo | e4ac46a | 2020-11-11 00:04:34 +0800 | [diff] [blame] | 288 | buildconfig_header("platform_buildconfig") { |
| 289 | header = "CHIPDeviceBuildConfig.h" |
| 290 | header_dir = "platform" |
| 291 | |
| 292 | defines = [ |
| 293 | "CHIP_DEVICE_LAYER_NONE=1", |
| 294 | "CHIP_DEVICE_LAYER_TARGET=NONE", |
| 295 | ] |
Andrei Litvin | 1274bcf | 2021-04-09 14:13:37 -0400 | [diff] [blame] | 296 | |
| 297 | if (current_os == "android") { |
Andrei Litvin | b792463 | 2022-03-03 15:29:54 -0500 | [diff] [blame] | 298 | defines += [ "EXTERNAL_KEYVALUESTOREMANAGERIMPL_HEADER=\"controller/java/AndroidKeyValueStoreManagerImpl.h\"" ] |
Andrei Litvin | 1274bcf | 2021-04-09 14:13:37 -0400 | [diff] [blame] | 299 | } |
Jiacheng Guo | e4ac46a | 2020-11-11 00:04:34 +0800 | [diff] [blame] | 300 | } |
Jiacheng Guo | d3dd5e0 | 2022-03-30 23:43:12 +0800 | [diff] [blame] | 301 | } else { |
| 302 | group("platform_buildconfig") { |
| 303 | public_deps = [ "${chip_platform_target}:platform_buildconfig" ] |
| 304 | } |
Jiacheng Guo | 57945c2 | 2020-08-29 03:56:59 +0800 | [diff] [blame] | 305 | } |
Michael Spang | 1fcb6dd | 2020-08-24 11:19:04 -0400 | [diff] [blame] | 306 | |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 307 | if (chip_device_platform != "none") { |
| 308 | group("platform_base") { |
| 309 | public_deps = [ |
| 310 | ":platform_buildconfig", |
| 311 | "${chip_root}/src/ble", |
| 312 | "${chip_root}/src/inet", |
| 313 | "${chip_root}/src/lib/core", |
| 314 | "${chip_root}/src/lib/support", |
Kamil Kasperczyk | 838e489 | 2022-02-25 15:43:35 +0100 | [diff] [blame] | 315 | "${chip_root}/src/setup_payload:additional_data_payload", |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 316 | "${chip_root}/src/system", |
| 317 | ] |
| 318 | |
| 319 | public_configs = [ "${chip_root}/src:includes" ] |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 320 | } |
| 321 | |
| 322 | static_library("platform") { |
| 323 | output_name = "libDeviceLayer" |
| 324 | |
| 325 | sources = [ |
Michael Sandstedt | 8cc291d | 2022-06-07 10:02:58 -0500 | [diff] [blame] | 326 | "../include/platform/BuildTime.h", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 327 | "../include/platform/CHIPDeviceConfig.h", |
| 328 | "../include/platform/CHIPDeviceError.h", |
| 329 | "../include/platform/CHIPDeviceEvent.h", |
| 330 | "../include/platform/CHIPDeviceLayer.h", |
Tennessee Carmel-Veilleux | 8f86c43 | 2022-03-11 15:49:56 -0500 | [diff] [blame] | 331 | "../include/platform/CommissionableDataProvider.h", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 332 | "../include/platform/ConfigurationManager.h", |
| 333 | "../include/platform/ConnectivityManager.h", |
Yufeng Wang | 89aff25 | 2021-12-15 11:28:14 -0800 | [diff] [blame] | 334 | "../include/platform/DeviceControlServer.h", |
Arkadiusz Bałys | e023667 | 2022-05-27 11:19:32 +0200 | [diff] [blame] | 335 | "../include/platform/DeviceInstanceInfoProvider.h", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 336 | "../include/platform/GeneralUtils.h", |
rgoliver | bf60cc2 | 2021-01-26 21:15:59 -0500 | [diff] [blame] | 337 | "../include/platform/KeyValueStoreManager.h", |
Tennessee Carmel-Veilleux | def1881 | 2022-04-04 13:12:25 -0400 | [diff] [blame] | 338 | "../include/platform/KvsPersistentStorageDelegate.h", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 339 | "../include/platform/PersistedStorage.h", |
| 340 | "../include/platform/PlatformManager.h", |
Tennessee Carmel-Veilleux | 8f86c43 | 2022-03-11 15:49:56 -0500 | [diff] [blame] | 341 | "../include/platform/TestOnlyCommissionableDataProvider.h", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 342 | "../include/platform/ThreadStackManager.h", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 343 | "../include/platform/internal/BLEManager.h", |
| 344 | "../include/platform/internal/CHIPDeviceLayerInternal.h", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 345 | "../include/platform/internal/DeviceNetworkInfo.h", |
| 346 | "../include/platform/internal/EventLogging.h", |
| 347 | "../include/platform/internal/GenericConfigurationManagerImpl.h", |
Michael Spang | feb81b6 | 2022-03-22 14:34:32 -0400 | [diff] [blame] | 348 | "../include/platform/internal/GenericConfigurationManagerImpl.ipp", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 349 | "../include/platform/internal/GenericConnectivityManagerImpl.h", |
| 350 | "../include/platform/internal/GenericConnectivityManagerImpl_BLE.h", |
Michael Spang | feb81b6 | 2022-03-22 14:34:32 -0400 | [diff] [blame] | 351 | "../include/platform/internal/GenericConnectivityManagerImpl_BLE.ipp", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 352 | "../include/platform/internal/GenericConnectivityManagerImpl_NoBLE.h", |
| 353 | "../include/platform/internal/GenericConnectivityManagerImpl_NoThread.h", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 354 | "../include/platform/internal/GenericConnectivityManagerImpl_NoWiFi.h", |
Michael Spang | 65bea66 | 2022-06-21 17:33:51 -0400 | [diff] [blame] | 355 | "../include/platform/internal/GenericConnectivityManagerImpl_TCP.h", |
| 356 | "../include/platform/internal/GenericConnectivityManagerImpl_TCP.ipp", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 357 | "../include/platform/internal/GenericConnectivityManagerImpl_Thread.h", |
Michael Spang | feb81b6 | 2022-03-22 14:34:32 -0400 | [diff] [blame] | 358 | "../include/platform/internal/GenericConnectivityManagerImpl_Thread.ipp", |
Michael Spang | 65bea66 | 2022-06-21 17:33:51 -0400 | [diff] [blame] | 359 | "../include/platform/internal/GenericConnectivityManagerImpl_UDP.h", |
| 360 | "../include/platform/internal/GenericConnectivityManagerImpl_UDP.ipp", |
Yufeng Wang | 2a1e8bc | 2020-09-27 23:27:02 -0700 | [diff] [blame] | 361 | "../include/platform/internal/GenericConnectivityManagerImpl_WiFi.h", |
Michael Spang | feb81b6 | 2022-03-22 14:34:32 -0400 | [diff] [blame] | 362 | "../include/platform/internal/GenericConnectivityManagerImpl_WiFi.ipp", |
Kamil Kasperczyk | 09f3e4a | 2022-06-15 10:27:34 +0200 | [diff] [blame] | 363 | "../include/platform/internal/GenericDeviceInstanceInfoProvider.h", |
| 364 | "../include/platform/internal/GenericDeviceInstanceInfoProvider.ipp", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 365 | "../include/platform/internal/GenericPlatformManagerImpl.h", |
Michael Spang | feb81b6 | 2022-03-22 14:34:32 -0400 | [diff] [blame] | 366 | "../include/platform/internal/GenericPlatformManagerImpl.ipp", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 367 | "../include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.h", |
Michael Spang | feb81b6 | 2022-03-22 14:34:32 -0400 | [diff] [blame] | 368 | "../include/platform/internal/GenericPlatformManagerImpl_FreeRTOS.ipp", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 369 | "../include/platform/internal/GenericPlatformManagerImpl_POSIX.h", |
Michael Spang | feb81b6 | 2022-03-22 14:34:32 -0400 | [diff] [blame] | 370 | "../include/platform/internal/GenericPlatformManagerImpl_POSIX.ipp", |
| 371 | "../include/platform/internal/GenericPlatformManagerImpl_Zephyr.ipp", |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 372 | "../include/platform/internal/testing/ConfigUnitTest.h", |
Tennessee Carmel-Veilleux | 8f86c43 | 2022-03-11 15:49:56 -0500 | [diff] [blame] | 373 | "CommissionableDataProvider.cpp", |
Yufeng Wang | 17be4af | 2021-05-03 21:46:33 -0700 | [diff] [blame] | 374 | "DeviceControlServer.cpp", |
Yufeng Wang | 6a55194 | 2022-03-30 23:37:40 -0700 | [diff] [blame] | 375 | "DeviceInfoProvider.cpp", |
Arkadiusz Bałys | e023667 | 2022-05-27 11:19:32 +0200 | [diff] [blame] | 376 | "DeviceInstanceInfoProvider.cpp", |
Yufeng Wang | 3e863a9 | 2021-11-22 11:41:21 -0800 | [diff] [blame] | 377 | "DiagnosticDataProvider.cpp", |
Zang MingJie | 659848c | 2021-09-03 23:13:45 +0800 | [diff] [blame] | 378 | "Entropy.cpp", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 379 | "GeneralUtils.cpp", |
| 380 | "Globals.cpp", |
Andrei Litvin | 4ae09b3 | 2021-05-11 09:14:27 -0400 | [diff] [blame] | 381 | "LockTracker.cpp", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 382 | "PersistedStorage.cpp", |
Zang MingJie | 39ff9bf | 2021-11-05 12:29:08 +0800 | [diff] [blame] | 383 | "PlatformEventSupport.cpp", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 384 | ] |
| 385 | |
jmartinez-silabs | a92d1a8 | 2022-02-07 12:50:17 -0500 | [diff] [blame] | 386 | # Linux has its own NetworkCommissioningThreadDriver |
Abhay Agarwal | df5d0ee | 2022-05-02 20:00:25 +0530 | [diff] [blame] | 387 | if (chip_enable_openthread && chip_device_platform != "linux" && |
sungho1.shin | fda7854 | 2022-05-25 04:21:58 +0900 | [diff] [blame] | 388 | chip_device_platform != "tizen" && chip_device_platform != "webos") { |
jmartinez-silabs | a92d1a8 | 2022-02-07 12:50:17 -0500 | [diff] [blame] | 389 | sources += [ |
| 390 | "OpenThread/GenericNetworkCommissioningThreadDriver.cpp", |
| 391 | "OpenThread/GenericNetworkCommissioningThreadDriver.h", |
| 392 | ] |
| 393 | } |
| 394 | |
Boris Zbarsky | 444b50b | 2020-09-23 19:53:06 -0400 | [diff] [blame] | 395 | cflags = [ "-Wconversion" ] |
| 396 | |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 397 | public_deps = [ |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 398 | ":platform_base", |
Daniel Nicoara | 641e3ad | 2022-07-25 15:32:03 -0400 | [diff] [blame] | 399 | "${chip_root}/src/app:app_config", |
Yufeng Wang | 551e53f | 2021-10-26 13:41:18 -0700 | [diff] [blame] | 400 | "${chip_root}/src/app/common:cluster-objects", |
Zang MingJie | 659848c | 2021-09-03 23:13:45 +0800 | [diff] [blame] | 401 | "${chip_root}/src/crypto", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 402 | "${chip_root}/src/lib/support", |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 403 | ] |
| 404 | |
Seth Rickard | 4f0521f | 2021-01-12 16:06:52 -0600 | [diff] [blame] | 405 | if (chip_device_platform == "cc13x2_26x2") { |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 406 | _platform_target = "cc13x2_26x2" |
abiradarti | f496784 | 2022-06-28 09:19:03 -0500 | [diff] [blame] | 407 | } else if (chip_device_platform == "cc32xx") { |
| 408 | _platform_target = "cc32xx" |
Seth Rickard | 4f0521f | 2021-01-12 16:06:52 -0600 | [diff] [blame] | 409 | } else if (chip_device_platform == "darwin") { |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 410 | _platform_target = "Darwin" |
Rafał Kuźnia | 90bc94c | 2020-08-31 19:54:04 +0200 | [diff] [blame] | 411 | } else if (chip_device_platform == "efr32") { |
chirag-silabs | 64252c8 | 2022-11-24 19:53:53 +0530 | [diff] [blame] | 412 | _platform_target = "silabs/EFR32" |
Rafał Kuźnia | 90bc94c | 2020-08-31 19:54:04 +0200 | [diff] [blame] | 413 | } else if (chip_device_platform == "esp32") { |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 414 | _platform_target = "ESP32" |
PetruSicoe | 0aac8fd | 2021-10-07 15:52:08 +0300 | [diff] [blame] | 415 | } else if (chip_device_platform == "k32w0") { |
| 416 | _platform_target = "nxp/k32w/k32w0" |
Michael Spang | 4314d81 | 2020-08-07 10:17:09 -0400 | [diff] [blame] | 417 | } else if (chip_device_platform == "linux") { |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 418 | _platform_target = "Linux" |
Rafał Kuźnia | 90bc94c | 2020-08-31 19:54:04 +0200 | [diff] [blame] | 419 | } else if (chip_device_platform == "nrfconnect") { |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 420 | _platform_target = "nrfconnect" |
Timothy Maes | 2478e02 | 2021-07-02 04:03:46 +0200 | [diff] [blame] | 421 | } else if (chip_device_platform == "qpg") { |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 422 | _platform_target = "qpg" |
Alexandr Kolosov | fc7146c | 2021-06-09 20:57:36 +0300 | [diff] [blame] | 423 | } else if (chip_device_platform == "telink") { |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 424 | _platform_target = "telink" |
Vincent Coubard | cc13560 | 2021-06-29 16:58:47 +0100 | [diff] [blame] | 425 | } else if (chip_device_platform == "mbed") { |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 426 | _platform_target = "mbed" |
Wootak Jung | e945d16 | 2021-09-13 10:39:32 +0900 | [diff] [blame] | 427 | } else if (chip_device_platform == "tizen") { |
| 428 | _platform_target = "Tizen" |
Hui.Li-TCL | 924f36e | 2021-09-30 20:51:41 +0800 | [diff] [blame] | 429 | } else if (chip_device_platform == "android") { |
| 430 | _platform_target = "android" |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 431 | } else if (chip_device_platform == "external") { |
| 432 | _platform_target = chip_platform_target |
Praveen Chandran | ab02839 | 2022-08-18 07:39:28 -0700 | [diff] [blame] | 433 | } else if (chip_device_platform == "psoc6") { |
| 434 | _platform_target = "Infineon/PSOC6" |
pankore | 544da73c | 2021-10-19 02:51:16 +0800 | [diff] [blame] | 435 | } else if (chip_device_platform == "ameba") { |
| 436 | _platform_target = "Ameba" |
sungmok shin | b3c3799 | 2022-03-02 02:55:12 +0900 | [diff] [blame] | 437 | } else if (chip_device_platform == "webos") { |
| 438 | _platform_target = "webos" |
jczhang777 | 3666138 | 2022-04-04 21:33:18 +0800 | [diff] [blame] | 439 | } else if (chip_device_platform == "bl602") { |
| 440 | _platform_target = "bouffalolab/BL602" |
wyhong | 0ca9aa4 | 2022-09-12 23:24:16 +0800 | [diff] [blame] | 441 | } else if (chip_device_platform == "bl702") { |
| 442 | _platform_target = "bouffalolab/BL702" |
C Freeman | 79c9315 | 2021-08-18 00:20:05 -0400 | [diff] [blame] | 443 | } else if (chip_device_platform == "fake") { |
| 444 | _platform_target = "fake" |
Todd Chou | 1af90eb | 2022-01-21 12:29:29 +0800 | [diff] [blame] | 445 | } else if (chip_device_platform == "cyw30739") { |
Praveen Chandran | ab02839 | 2022-08-18 07:39:28 -0700 | [diff] [blame] | 446 | _platform_target = "Infineon/CYW30739" |
nxptest | 2d0c529 | 2022-06-24 19:04:49 +0800 | [diff] [blame] | 447 | } else if (chip_device_platform == "mw320") { |
| 448 | _platform_target = "nxp/mw320" |
Jandy Gou | 3ffd066 | 2022-06-14 22:02:05 +0800 | [diff] [blame] | 449 | } else if (chip_device_platform == "zephyr") { |
| 450 | _platform_target = "Zephyr" |
zhengyaohan | 0528a42 | 2022-08-16 06:52:33 +0800 | [diff] [blame] | 451 | } else if (chip_device_platform == "beken") { |
| 452 | _platform_target = "Beken" |
pakls | 0168a57 | 2022-09-14 03:05:11 +0800 | [diff] [blame] | 453 | } else if (chip_device_platform == "mt793x") { |
| 454 | _platform_target = "mt793x" |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 455 | } else { |
| 456 | assert(false, "Unknown chip_device_platform: ${chip_device_platform}") |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 457 | } |
Michael Spang | db9b861 | 2020-07-13 09:43:13 -0400 | [diff] [blame] | 458 | |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 459 | public_deps += [ _platform_target ] |
Kamil Kasperczyk | 4401402 | 2021-03-12 21:18:45 +0100 | [diff] [blame] | 460 | |
Michael Spang | 68fcef6 | 2021-07-05 21:50:23 -0400 | [diff] [blame] | 461 | # The platform target needs to include the headers, so allow that here. |
| 462 | # It should be considered logically part of this target. |
| 463 | allow_circular_includes_from = [ |
| 464 | _platform_target, |
| 465 | "${chip_root}/src/lib/support", |
| 466 | ] |
Jiacheng Guo | d8f58a0 | 2020-08-19 00:23:40 +0800 | [diff] [blame] | 467 | } |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 468 | } else { |
| 469 | group("platform") { |
Jiacheng Guo | e4ac46a | 2020-11-11 00:04:34 +0800 | [diff] [blame] | 470 | public_deps = [ ":platform_buildconfig" ] |
Michael Spang | efa630b | 2020-07-08 22:23:08 -0400 | [diff] [blame] | 471 | } |
| 472 | } |