Skip to content

Commit

Permalink
Restyled by gn
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and dinabenamar committed Oct 19, 2023
1 parent 19de935 commit 4259860
Show file tree
Hide file tree
Showing 13 changed files with 45 additions and 48 deletions.
3 changes: 1 addition & 2 deletions examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ rt_executable("all_cluster_app") {
defines += [ "DEVICE_TYPE_ALL_CLUSTERS" ]
sources += [
"${chip_root}/examples/${app_common_folder}/src/bridged-actions-stub.cpp",
"${chip_root}/examples/${app_common_folder}/src/static-supported-modes-manager.cpp",
"${chip_root}/examples/${app_common_folder}/src/smco-stub.cpp",
"${chip_root}/examples/${app_common_folder}/src/static-supported-modes-manager.cpp",
]
}

Expand All @@ -139,7 +139,6 @@ rt_executable("all_cluster_app") {
include_dirs += [ "${chip_root}/examples/platform/nxp/common" ]
}


# In case a dedicated assert function needs to be supported the flag sdk_fsl_assert_support should be set to false
# The would add to the build a dedicated application assert implementation.
if (!sdk_fsl_assert_support) {
Expand Down
6 changes: 2 additions & 4 deletions examples/platform/nxp/common/app/support/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ config("support_config") {
}

source_set("freertos_memory_utils") {
sources = [
"Memconfig.cpp",
]
sources = [ "Memconfig.cpp" ]
cflags = [ "-Wconversion" ]

deps = ["${nxp_sdk_build_root}:nxp_sdk"]
deps = [ "${nxp_sdk_build_root}:nxp_sdk" ]

public_configs = [ ":support_config" ]
}
6 changes: 5 additions & 1 deletion examples/platform/nxp/rt/rw61x/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@ import("//build_overrides/chip.gni")
import("//build_overrides/nxp_sdk.gni")

config("chip_app_project_config") {
include_dirs = [ "app/project_include", "../../common/util/include", "../../common/mbedtls" ]
include_dirs = [
"app/project_include",
"../../common/util/include",
"../../common/mbedtls",
]
}
4 changes: 1 addition & 3 deletions examples/thermostat/nxp/zap/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ import("${chip_root}/src/app/chip_data_model.gni")
import("${chip_root}/src/platform/device.gni")

chip_data_model("zap") {

if (chip_enable_wifi) {
# zap config for matter-over-wifi
zap_file = "thermostat_matter_wifi.zap"
}
else {
} else {
# zap config for matter-over-thread
zap_file = "thermostat_matter_thread.zap"
}
Expand Down
3 changes: 2 additions & 1 deletion src/crypto/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ chip_test_suite_using_nltest("tests") {
}

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

Expand Down
20 changes: 11 additions & 9 deletions src/lwip/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ if (lwip_platform == "") {

assert(lwip_platform == "external" || lwip_platform == "standalone" ||
lwip_platform == "cc13xx_26xx" || lwip_platform == "cc32xx" ||
lwip_platform == "nxp" ||
lwip_platform == "silabs" || lwip_platform == "k32w0" ||
lwip_platform == "k32w1" || lwip_platform == "qpg" ||
lwip_platform == "mbed" || lwip_platform == "psoc6" ||
lwip_platform == "cyw30739" || lwip_platform == "bl602" ||
lwip_platform == "mw320" || lwip_platform == "bl702" ||
lwip_platform == "bl702l" || lwip_platform == "mt793x" ||
lwip_platform == "asr",
lwip_platform == "nxp" || lwip_platform == "silabs" ||
lwip_platform == "k32w0" || lwip_platform == "k32w1" ||
lwip_platform == "qpg" || lwip_platform == "mbed" ||
lwip_platform == "psoc6" || lwip_platform == "cyw30739" ||
lwip_platform == "bl602" || lwip_platform == "mw320" ||
lwip_platform == "bl702" || lwip_platform == "bl702l" ||
lwip_platform == "mt793x" || lwip_platform == "asr",
"Unsupported lwIP platform: ${lwip_platform}")

if (lwip_platform != "external") {
Expand Down Expand Up @@ -171,7 +170,10 @@ if (current_os == "zephyr" || current_os == "mbed") {
}
} else if (lwip_platform == "nxp") {
group("lwip") {
public_deps = [ ":lwip_buildconfig", "${nxp_sdk_build_root}:nxp_lwip" ]
public_deps = [
":lwip_buildconfig",
"${nxp_sdk_build_root}:nxp_lwip",
]
}
} else {
config("lwip_config") {
Expand Down
6 changes: 2 additions & 4 deletions src/platform/nxp/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,5 @@ import("//build_overrides/nxp_sdk.gni")
import("${nxp_sdk_build_root}/nxp_sdk.gni")

group("nxp") {
public_deps = [
"${chip_root}/src/platform/nxp/${nxp_platform}:nxp_platform"
]
}
public_deps = [ "${chip_root}/src/platform/nxp/${nxp_platform}:nxp_platform" ]
}
4 changes: 2 additions & 2 deletions src/platform/nxp/rt/rw61x/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ static_library("nxp_platform") {

if (chip_enable_ble) {
sources += [
# Adding rand32 file which defines the function sys_csrand_get which is called by BLEManagerImpl from Zephyr
"${nxp_sdk_build_root}/${nxp_sdk_name}/sdk_hook/zephyr/random/rand32.cpp",
"../../../Zephyr/BLEAdvertisingArbiter.cpp",
"../../../Zephyr/BLEManagerImpl.cpp",
"../../common/ble_zephyr/BLEManagerImpl.h",
# Adding rand32 file which defines the function sys_csrand_get which is called by BLEManagerImpl from Zephyr
"${nxp_sdk_build_root}/${nxp_sdk_name}/sdk_hook/zephyr/random/rand32.cpp",
]
}

Expand Down
1 change: 0 additions & 1 deletion third_party/nxp/rt_sdk/bt_ble/bt_ble.gni
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ template("bt_ble_target") {
#"${nxp_sdk_build_root}/${nxp_sdk_name}/sdk_hook/btsnoop_pl.c",
#edgefast_bluetooth
"${nxp_sdk_build_root}/${nxp_sdk_name}/sdk_hook/littlefs_pl.c",

"${rt_sdk_root}/middleware/edgefast_bluetooth/source/impl/ethermind/bt_db_gen.c",
"${rt_sdk_root}/middleware/edgefast_bluetooth/source/impl/ethermind/common/addr.c",
"${rt_sdk_root}/middleware/edgefast_bluetooth/source/impl/ethermind/host/bt_pal_addr.c",
Expand Down
24 changes: 10 additions & 14 deletions third_party/nxp/rt_sdk/lwip/lwip.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.


# Defines a lwIP build target.
#
# lwIP depends on external header files to compile. This template defines
# a combined build of the lwIP sources plus target configuration.
template("lwip_target") {

lwip_sdk_root = invoker.rt_sdk_root

_lwip_root = "${lwip_sdk_root}/middleware/lwip"
Expand Down Expand Up @@ -57,9 +55,7 @@ template("lwip_target") {
}

config("${lwip_target_name}_base_config") {
include_dirs = [
"${lwip_sdk_root}/middleware/lwip/src/include",
]
include_dirs = [ "${lwip_sdk_root}/middleware/lwip/src/include" ]
}

source_set(lwip_target_name) {
Expand All @@ -74,16 +70,16 @@ template("lwip_target") {
# lwIP headers become empty if the relevant feature is disabled, so the
# whole interface can be public regardless of build options.
public += [
"${_lwip_root}/src/include/lwip/apps/mdns.h",
"${_lwip_root}/src/include/lwip/apps/mdns_domain.h",
"${_lwip_root}/src/include/lwip/apps/mdns_out.h",
"${_lwip_root}/src/include/lwip/apps/mdns_priv.h",
"${_lwip_root}/src/include/lwip/apps/mdns_opts.h",
"${_lwip_root}/src/include/lwip/acd.h",
"${_lwip_root}/src/include/lwip/altcp.h",
"${_lwip_root}/src/include/lwip/altcp_tcp.h",
"${_lwip_root}/src/include/lwip/altcp_tls.h",
"${_lwip_root}/src/include/lwip/api.h",
"${_lwip_root}/src/include/lwip/apps/mdns.h",
"${_lwip_root}/src/include/lwip/apps/mdns_domain.h",
"${_lwip_root}/src/include/lwip/apps/mdns_opts.h",
"${_lwip_root}/src/include/lwip/apps/mdns_out.h",
"${_lwip_root}/src/include/lwip/apps/mdns_priv.h",
"${_lwip_root}/src/include/lwip/arch.h",
"${_lwip_root}/src/include/lwip/autoip.h",
"${_lwip_root}/src/include/lwip/debug.h",
Expand Down Expand Up @@ -133,8 +129,8 @@ template("lwip_target") {
"${_lwip_root}/src/include/lwip/prot/iana.h",
"${_lwip_root}/src/include/lwip/prot/icmp.h",
"${_lwip_root}/src/include/lwip/prot/icmp6.h",
"${_lwip_root}/src/include/lwip/prot/igmp.h",
"${_lwip_root}/src/include/lwip/prot/ieee.h",
"${_lwip_root}/src/include/lwip/prot/igmp.h",
"${_lwip_root}/src/include/lwip/prot/ip.h",
"${_lwip_root}/src/include/lwip/prot/ip4.h",
"${_lwip_root}/src/include/lwip/prot/ip6.h",
Expand All @@ -161,7 +157,7 @@ template("lwip_target") {
"${_lwip_root}/src/apps/mdns/mdns_out.c",
"${_lwip_root}/src/core/altcp.c",
"${_lwip_root}/src/core/altcp_alloc.c",
"${_lwip_root}/src/core/altcp_tcp.c",
"${_lwip_root}/src/core/altcp_tcp.c",
"${_lwip_root}/src/core/def.c",
"${_lwip_root}/src/core/dns.c",
"${_lwip_root}/src/core/inet_chksum.c",
Expand All @@ -181,13 +177,13 @@ template("lwip_target") {
"${_lwip_root}/src/core/udp.c",
"${_lwip_root}/src/include/lwip/priv/altcp_priv.h",
"${_lwip_root}/src/include/lwip/priv/api_msg.h",
"${_lwip_root}/src/include/lwip/priv/memp_priv.h",
"${_lwip_root}/src/include/lwip/priv/api_msg.h",
"${_lwip_root}/src/include/lwip/priv/mem_priv.h",
"${_lwip_root}/src/include/lwip/priv/memp_priv.h",
"${_lwip_root}/src/include/lwip/priv/memp_std.h",
"${_lwip_root}/src/include/lwip/priv/nd6_priv.h",
"${_lwip_root}/src/include/lwip/priv/raw_priv.h",
"${_lwip_root}/src/include/lwip/priv/sockets_priv.h",
"${_lwip_root}/src/include/lwip/priv/api_msg.h",
]

if (lwip_ipv4) {
Expand Down
8 changes: 4 additions & 4 deletions third_party/nxp/rt_sdk/mbedtls/mbedtls.gni
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ template("mbedtls_target") {
assert(rt_sdk_root != "", "rt_sdk_root must be specified")
mbedtls_sdk_root = rt_sdk_root
mbedtls_target_name = target_name
_mbedtls_root = "${mbedtls_sdk_root}/middleware/mbedtls"
_mbedtls_root = "${mbedtls_sdk_root}/middleware/mbedtls"

config("${mbedtls_target_name}_warnings") {
cflags = [
Expand All @@ -31,10 +31,10 @@ template("mbedtls_target") {
}

config("${mbedtls_target_name}_config") {
include_dirs = [
include_dirs = [
"${_mbedtls_root}/include",
"${rt_sdk_root}/middleware/mbedtls/library",
]
]
}

static_library(mbedtls_target_name) {
Expand Down Expand Up @@ -114,7 +114,7 @@ template("mbedtls_target") {
"${_mbedtls_root}/library/x509write_csr.c",
"${_mbedtls_root}/library/xtea.c",
]

if (current_os != "freertos") {
sources += [ "${_mbedtls_root}/library/timing.c" ]
}
Expand Down
3 changes: 2 additions & 1 deletion third_party/nxp/rt_sdk/nxp_arm.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
import("//build_overrides/nxp_sdk.gni")
import("${nxp_sdk_build_root}/nxp_sdk.gni")

assert(nxp_platform == "rt/rt1060" || nxp_platform == "rt/rt1170" || nxp_platform == "rt/rw61x",
assert(nxp_platform == "rt/rt1060" || nxp_platform == "rt/rt1170" ||
nxp_platform == "rt/rw61x",
"${nxp_platform} must be one of: rt/rt1060, rt/rt1170, rt/rw61x.")

if (nxp_platform == "rt/rt1060" || nxp_platform == "rt/rt1170") {
Expand Down
5 changes: 3 additions & 2 deletions third_party/nxp/rt_sdk/rw61x/rw61x.gni
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ template("rw61x_sdk_drivers") {
"${ELS_PKC_CL_PATH}/src/comps/mcuxClEls/src/mcuxClEls_Cipher.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClEls/src/mcuxClEls_Cmac.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClEls/src/mcuxClEls_Common.c",

#"${ELS_PKC_CL_PATH}/src/comps/mcuxClEls/src/mcuxClEls_Crc.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClEls/src/mcuxClEls_Ecc.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClEls/src/mcuxClEls_Hash.c",
Expand All @@ -550,8 +551,8 @@ template("rw61x_sdk_drivers") {
"${ELS_PKC_CL_PATH}/src/comps/mcuxClMacModes/src/mcuxClMacModes.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClMacModes/src/mcuxClMacModes_ELS_CBCMAC.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClMacModes/src/mcuxClMacModes_ELS_CMAC.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClMacModes/src/mcuxClMacModes_ELS_HMAC.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClMacModes/src/mcuxClMacModes_ELS_Functions.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClMacModes/src/mcuxClMacModes_ELS_HMAC.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClMacModes/src/mcuxClMacModes_Helper.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClMacModes/src/mcuxClMacModes_Modes.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClMath/src/mcuxClMath_ExactDivide.c",
Expand Down Expand Up @@ -615,8 +616,8 @@ template("rw61x_sdk_drivers") {
"${ELS_PKC_CL_PATH}/src/comps/mcuxClRsa/src/mcuxClRsa_TestPrimeCandidate_FUP.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClRsa/src/mcuxClRsa_Verify.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClRsa/src/mcuxClRsa_VerifyE.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClTrng/src/mcuxClTrng_RNG4.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClSession/src/mcuxClSession.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxClTrng/src/mcuxClTrng_RNG4.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxCsslMemory/src/mcuxCsslMemory_Clear.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxCsslMemory/src/mcuxCsslMemory_Compare.c",
"${ELS_PKC_CL_PATH}/src/comps/mcuxCsslMemory/src/mcuxCsslMemory_Copy.c",
Expand Down

0 comments on commit 4259860

Please sign in to comment.