diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index d6a1377159a8ab..d440608b122403 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -175,7 +175,7 @@ config("warnings_common") { } if (current_os != "mac" && current_os != "ios" && current_os != "linux" && - current_os != "win") { + current_os != "win" && current_os != "tizen") { cflags += [ "-Wstack-usage=8192" ] } } @@ -251,7 +251,7 @@ config("runtime_default") { "$dir_pw_toolchain/host_clang:xcode_sysroot", ] } - if (current_os == "linux") { + if (current_os == "linux" || current_os == "tizen") { libs = [ "dl", "pthread", diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index aaafe34a5772cb..66672a032680e8 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -61,7 +61,7 @@ if (chip_device_platform != "none") { } if (chip_stack_lock_tracking == "auto") { - if (chip_device_platform == "linux") { + if (chip_device_platform == "linux" || chip_device_platform == "tizen") { # TODO: should be fatal for development. Change once bugs are fixed chip_stack_lock_tracking = "log" } else { @@ -102,7 +102,7 @@ if (chip_device_platform != "none") { "CHIP_ENABLE_ROTATING_DEVICE_ID=${chip_enable_rotating_device_id}", ] - if (chip_device_platform == "linux" || chip_device_platform == "darwin") { + if (chip_device_platform == "linux" || chip_device_platform == "darwin" || chip_device_platform == "tizen") { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=${chip_enable_ble}" ] } @@ -154,6 +154,15 @@ if (chip_device_platform != "none") { "CHIP_DEVICE_LAYER_TARGET_LINUX=1", "CHIP_DEVICE_LAYER_TARGET=Linux", ] + } else if (chip_device_platform == "tizen") { + defines += [ + "CHIP_DEVICE_LAYER_TARGET_TIZEN=1", + "CHIP_DEVICE_LAYER_TARGET=Tizen", + "CHIP_DEVICE_CONFIG_ENABLE_WIFI=${chip_enable_wifi}", + ] + defines -= [ + "CHIP_DEVICE_CONFIG_ENABLE_WPA=${chip_device_config_enable_wpa}" + ] } else if (chip_device_platform == "nrfconnect") { defines += [ "CHIP_DEVICE_LAYER_TARGET_NRFCONNECT=1", @@ -293,6 +302,8 @@ if (chip_device_platform != "none") { _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 == "external") { _platform_target = chip_platform_target } else if (chip_device_platform == "p6") { diff --git a/src/platform/device.gni b/src/platform/device.gni index cf10cbd4f3d2b4..b4b0758c27e069 100644 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -16,7 +16,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/ble/ble.gni") declare_args() { - # Device platform layer: cc13x2_26x2, darwin, efr32, esp32, external, freertos, linux, nrfconnect, k32w, qpg, none. + # Device platform layer: cc13x2_26x2, darwin, efr32, esp32, external, freertos, linux, nrfconnect, k32w, qpg, tizen, none. chip_device_platform = "auto" chip_platform_target = "" @@ -31,6 +31,8 @@ if (chip_device_platform == "auto") { chip_device_platform = "darwin" } else if (current_os == "linux") { chip_device_platform = "linux" + } else if (current_os == "tizen") { + chip_device_platform = "tizen" } else { chip_device_platform = "none" } @@ -45,7 +47,7 @@ declare_args() { # Enable wifi support. chip_enable_wifi = chip_device_platform == "linux" || chip_device_platform == "esp32" || - chip_device_platform == "mbed" + chip_device_platform == "mbed" || chip_device_platform == "tizen" # Enable ble support. if (chip_device_platform == "fake") { @@ -63,7 +65,8 @@ declare_args() { chip_mdns = "minimal" } else if (chip_device_platform == "darwin" || chip_device_platform == "cc13x2_26x2" || current_os == "android" || - chip_device_platform == "fake") { + chip_device_platform == "fake" || + chip_device_platform == "tizen") { chip_mdns = "platform" } else { chip_mdns = "none" @@ -84,6 +87,8 @@ if (chip_device_platform == "cc13x2_26x2") { _chip_device_layer = "ESP32" } else if (chip_device_platform == "linux") { _chip_device_layer = "Linux" +} else if (chip_device_platform == "tizen") { + _chip_device_layer = "Tizen" } else if (chip_device_platform == "nrfconnect") { _chip_device_layer = "nrfconnect" } else if (chip_device_platform == "qpg") { @@ -133,7 +138,7 @@ assert( chip_device_platform == "cc13x2_26x2" || chip_device_platform == "darwin" || chip_device_platform == "efr32" || chip_device_platform == "esp32" || chip_device_platform == "external" || - chip_device_platform == "linux" || + chip_device_platform == "linux" || chip_device_platform == "tizen" || chip_device_platform == "nrfconnect" || chip_device_platform == "k32w" || chip_device_platform == "qpg" || chip_device_platform == "telink" || chip_device_platform == "mbed" ||