diff --git a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn index 400f68580a4f58..4c0ccba283249b 100644 --- a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn @@ -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", ] } @@ -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) { diff --git a/examples/platform/nxp/common/app/support/BUILD.gn b/examples/platform/nxp/common/app/support/BUILD.gn index 1347ec443f3d87..c4ff97f4ee3d0c 100644 --- a/examples/platform/nxp/common/app/support/BUILD.gn +++ b/examples/platform/nxp/common/app/support/BUILD.gn @@ -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" ] } diff --git a/examples/platform/nxp/rt/rw61x/BUILD.gn b/examples/platform/nxp/rt/rw61x/BUILD.gn index 2e946a385aecc5..cb797b30e5c75f 100644 --- a/examples/platform/nxp/rt/rw61x/BUILD.gn +++ b/examples/platform/nxp/rt/rw61x/BUILD.gn @@ -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", + ] } diff --git a/examples/thermostat/nxp/zap/BUILD.gn b/examples/thermostat/nxp/zap/BUILD.gn index 0ecbd30a9aff96..976cd78f2e1a79 100644 --- a/examples/thermostat/nxp/zap/BUILD.gn +++ b/examples/thermostat/nxp/zap/BUILD.gn @@ -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" } diff --git a/src/crypto/tests/BUILD.gn b/src/crypto/tests/BUILD.gn index ee64fcf562c506..45024d801a32aa 100644 --- a/src/crypto/tests/BUILD.gn +++ b/src/crypto/tests/BUILD.gn @@ -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" ] } diff --git a/src/lwip/BUILD.gn b/src/lwip/BUILD.gn index a1c11e94b8cdb4..d6248cbfba01a3 100644 --- a/src/lwip/BUILD.gn +++ b/src/lwip/BUILD.gn @@ -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") { @@ -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") { diff --git a/src/platform/nxp/BUILD.gn b/src/platform/nxp/BUILD.gn index 7f62bb964077ac..b0bc61c43a960b 100644 --- a/src/platform/nxp/BUILD.gn +++ b/src/platform/nxp/BUILD.gn @@ -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" - ] -} \ No newline at end of file + public_deps = [ "${chip_root}/src/platform/nxp/${nxp_platform}:nxp_platform" ] +} diff --git a/src/platform/nxp/rt/rw61x/BUILD.gn b/src/platform/nxp/rt/rw61x/BUILD.gn index 6b92f8cf95dce4..d8a72d1e449718 100644 --- a/src/platform/nxp/rt/rw61x/BUILD.gn +++ b/src/platform/nxp/rt/rw61x/BUILD.gn @@ -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", ] } diff --git a/third_party/nxp/rt_sdk/bt_ble/bt_ble.gni b/third_party/nxp/rt_sdk/bt_ble/bt_ble.gni index fba6d09501152d..e039a6072d38f5 100644 --- a/third_party/nxp/rt_sdk/bt_ble/bt_ble.gni +++ b/third_party/nxp/rt_sdk/bt_ble/bt_ble.gni @@ -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", diff --git a/third_party/nxp/rt_sdk/lwip/lwip.gni b/third_party/nxp/rt_sdk/lwip/lwip.gni index 8319ad4afd73fd..22f9d64bb13f01 100644 --- a/third_party/nxp/rt_sdk/lwip/lwip.gni +++ b/third_party/nxp/rt_sdk/lwip/lwip.gni @@ -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" @@ -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) { @@ -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", @@ -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", @@ -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", @@ -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) { diff --git a/third_party/nxp/rt_sdk/mbedtls/mbedtls.gni b/third_party/nxp/rt_sdk/mbedtls/mbedtls.gni index a90a2b3b43ddc2..d5595ab2683f2b 100644 --- a/third_party/nxp/rt_sdk/mbedtls/mbedtls.gni +++ b/third_party/nxp/rt_sdk/mbedtls/mbedtls.gni @@ -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 = [ @@ -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) { @@ -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" ] } diff --git a/third_party/nxp/rt_sdk/nxp_arm.gni b/third_party/nxp/rt_sdk/nxp_arm.gni index ca379ae3f87d92..560b076ef57a0d 100644 --- a/third_party/nxp/rt_sdk/nxp_arm.gni +++ b/third_party/nxp/rt_sdk/nxp_arm.gni @@ -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") { diff --git a/third_party/nxp/rt_sdk/rw61x/rw61x.gni b/third_party/nxp/rt_sdk/rw61x/rw61x.gni index 6305b635884bc0..24251d3a6def36 100644 --- a/third_party/nxp/rt_sdk/rw61x/rw61x.gni +++ b/third_party/nxp/rt_sdk/rw61x/rw61x.gni @@ -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", @@ -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", @@ -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",