Skip to content

Commit

Permalink
Integrate Tizen OS into chip build system
Browse files Browse the repository at this point in the history
  • Loading branch information
wootak-jung committed Aug 21, 2021
1 parent df18cdb commit 6095509
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}
}
Expand Down Expand Up @@ -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",
Expand Down
15 changes: 13 additions & 2 deletions src/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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}" ]
}

Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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") {
Expand Down
13 changes: 9 additions & 4 deletions src/platform/device.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""

Expand All @@ -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"
}
Expand All @@ -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") {
Expand All @@ -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"
Expand All @@ -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") {
Expand Down Expand Up @@ -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" ||
Expand Down

0 comments on commit 6095509

Please sign in to comment.