Skip to content

Commit

Permalink
[OIS] Add Open IoT SDK platform to common GN build settings
Browse files Browse the repository at this point in the history
Propagate Open IoT SDK platform settings in build system
of Matter components.

Signed-off-by: ATmobica <[email protected]>
  • Loading branch information
ATmobica committed Nov 18, 2022
1 parent ca2f463 commit 2249713
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion build/chip/tools.gni
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ declare_args() {
(chip_crypto == "" &&
(current_os != "android" && current_os != "freertos" &&
current_os != "zephyr" && current_os != "mbed" &&
current_os != "webos"))
current_os != "webos" && current_os != "cmsis-rtos"))
}
3 changes: 2 additions & 1 deletion build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ config("warnings_common") {
}

if (current_os != "mac" && current_os != "ios" && current_os != "linux" &&
current_os != "win" && current_os != "tizen" && current_os != "webos") {
current_os != "win" && current_os != "tizen" && current_os != "webos" &&
current_os != "cmsis-rtos") {
cflags += [ "-Wstack-usage=8192" ]
}
}
Expand Down
4 changes: 2 additions & 2 deletions build/config/compiler/compiler.gni
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ declare_args() {
optimize_for_size = true

# Optimize debug builds with -Og.
optimize_debug =
current_os == "freertos" || current_os == "zephyr" || current_os == "mbed"
optimize_debug = current_os == "freertos" || current_os == "zephyr" ||
current_os == "mbed" || current_os == "cmsis-rtos"

# Optimization level for debug. Only has an effect if optimize_debug is true.
optimize_debug_level = "g"
Expand Down
5 changes: 3 additions & 2 deletions src/credentials/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ static_library("credentials") {
# For mbed and nrfconnect test builds, which are bilding monolithic test library these files are not needed.
import("${chip_root}/build/chip/tests.gni")
if (!(chip_build_tests && (chip_device_platform == "mbed" ||
chip_device_platform == "openiotsdk" ||
chip_device_platform == "nrfconnect"))) {
sources += [
"tests/CHIPAttCert_test_vectors.cpp",
Expand All @@ -70,7 +71,7 @@ static_library("credentials") {
}

if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect" ||
chip_device_platform == "efr32") {
chip_device_platform == "efr32" || chip_device_platform == "openiotsdk") {
defines = [ "CURRENT_TIME_NOT_IMPLEMENTED=1" ]
}

Expand Down Expand Up @@ -98,7 +99,7 @@ static_library("default_attestation_verifier") {
]

if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect" ||
chip_device_platform == "efr32") {
chip_device_platform == "efr32" || chip_device_platform == "openiotsdk") {
defines = [ "CURRENT_TIME_NOT_IMPLEMENTED=1" ]
}

Expand Down
5 changes: 3 additions & 2 deletions src/crypto/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import("crypto.gni")

if (chip_crypto == "") {
if (current_os == "android" || current_os == "freertos" ||
current_os == "zephyr" || current_os == "mbed" || current_os == "webos") {
current_os == "zephyr" || current_os == "mbed" || current_os == "webos" ||
current_os == "cmsis-rtos") {
chip_crypto = "mbedtls"
} else {
chip_crypto = "openssl"
Expand Down Expand Up @@ -107,7 +108,7 @@ if (chip_crypto == "openssl") {
sources = [ "CHIPCryptoPALmbedTLS.cpp" ]
public_deps = [ ":public_headers" ]

external_mbedtls = current_os == "zephyr"
external_mbedtls = current_os == "zephyr" || current_os == "cmsis-rtos"

if (!external_mbedtls) {
public_deps += [ "${mbedtls_root}:mbedtls" ]
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ chip_test_suite("tests") {
]

if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect" ||
chip_device_platform == "efr32") {
chip_device_platform == "efr32" || chip_device_platform == "openiotsdk") {
defines = [ "CURRENT_TIME_NOT_IMPLEMENTED=1" ]
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/core.gni
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ declare_args() {

if (chip_target_style == "") {
if (current_os != "freertos" && current_os != "zephyr" &&
current_os != "mbed") {
current_os != "mbed" && current_os != "cmsis-rtos") {
chip_target_style = "unix"
} else {
chip_target_style = "embedded"
Expand Down

0 comments on commit 2249713

Please sign in to comment.