From e7b33e6267e7c0557bac17ba13179d73a41ead3c Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Mon, 5 Feb 2024 15:54:48 +0000 Subject: [PATCH] Restyled by gn --- config/nxp/lib/pw_rpc/pw_rpc.gni | 3 +- .../contact-sensor-app/nxp/k32w/k32w1/.gn | 1 + .../nxp/k32w/k32w1/BUILD.gn | 5 +- examples/lighting-app/nxp/k32w/k32w1/.gn | 1 + examples/lighting-app/nxp/k32w/k32w1/BUILD.gn | 5 +- examples/platform/nxp/pw_rpc_server.gni | 2 +- examples/platform/nxp/pw_sys_io/BUILD.gn | 8 +- src/platform/device.gni | 3 +- src/platform/nxp/k32w/k32w1/BUILD.gn | 38 ++- src/platform/nxp/k32w/k32w1/args.gni | 5 +- third_party/nxp/k32w1_sdk/BUILD.gn | 16 +- third_party/nxp/k32w1_sdk/k32w1_sdk.gni | 260 +++++++++--------- .../platforms/nxp/k32w/k32w0/BUILD.gn | 2 +- .../platforms/nxp/k32w/k32w1/BUILD.gn | 17 +- 14 files changed, 172 insertions(+), 194 deletions(-) diff --git a/config/nxp/lib/pw_rpc/pw_rpc.gni b/config/nxp/lib/pw_rpc/pw_rpc.gni index 364c986d4e6f4a..68255db8bb96da 100644 --- a/config/nxp/lib/pw_rpc/pw_rpc.gni +++ b/config/nxp/lib/pw_rpc/pw_rpc.gni @@ -18,8 +18,7 @@ import("//build_overrides/pigweed.gni") pw_log_BACKEND = "$dir_pw_log_basic" pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" -pw_sys_io_BACKEND = - "${chip_root}/examples/platform/nxp/pw_sys_io:pw_sys_io_nxp" +pw_sys_io_BACKEND = "${chip_root}/examples/platform/nxp/pw_sys_io:pw_sys_io_nxp" pw_build_LINK_DEPS = [ "$dir_pw_assert:impl", diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/.gn b/examples/contact-sensor-app/nxp/k32w/k32w1/.gn index c1babac3499bd1..1e848295f6aa5b 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w1/.gn +++ b/examples/contact-sensor-app/nxp/k32w/k32w1/.gn @@ -26,6 +26,7 @@ default_args = { target_os = "freertos" import("//args.gni") + # Import default platform configs import("${chip_root}/src/platform/nxp/k32w/k32w1/args.gni") } diff --git a/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn b/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn index 945a4c9f78d775..ed49c7bdd4f7a3 100644 --- a/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn @@ -115,7 +115,6 @@ k32w1_executable("contact_sensor_app") { ldscript = "${k32w1_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc/connectivity.ld" - inputs = [ ldscript ] ldflags = [ @@ -129,9 +128,7 @@ k32w1_executable("contact_sensor_app") { ] if (chip_with_factory_data == 1) { - ldflags += [ - "-Wl,--defsym=gUseFactoryData_d=1" - ] + ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ] } output_dir = root_out_dir diff --git a/examples/lighting-app/nxp/k32w/k32w1/.gn b/examples/lighting-app/nxp/k32w/k32w1/.gn index 8911ba06040f44..a88f6f5aa7cb3f 100644 --- a/examples/lighting-app/nxp/k32w/k32w1/.gn +++ b/examples/lighting-app/nxp/k32w/k32w1/.gn @@ -25,6 +25,7 @@ default_args = { target_os = "freertos" import("//args.gni") + # Import default platform configs import("${chip_root}/src/platform/nxp/k32w/k32w1/args.gni") } diff --git a/examples/lighting-app/nxp/k32w/k32w1/BUILD.gn b/examples/lighting-app/nxp/k32w/k32w1/BUILD.gn index 67a9f9bc95fc05..2f327213533e94 100644 --- a/examples/lighting-app/nxp/k32w/k32w1/BUILD.gn +++ b/examples/lighting-app/nxp/k32w/k32w1/BUILD.gn @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - import("//build_overrides/chip.gni") import("//build_overrides/nxp_sdk.gni") import("//build_overrides/openthread.gni") @@ -156,9 +155,7 @@ k32w1_executable("light_app") { ] if (chip_with_factory_data == 1) { - ldflags += [ - "-Wl,--defsym=gUseFactoryData_d=1" - ] + ldflags += [ "-Wl,--defsym=gUseFactoryData_d=1" ] } if (use_smu2_static) { diff --git a/examples/platform/nxp/pw_rpc_server.gni b/examples/platform/nxp/pw_rpc_server.gni index 1be495a3965288..0ec2d3b121b2d5 100644 --- a/examples/platform/nxp/pw_rpc_server.gni +++ b/examples/platform/nxp/pw_rpc_server.gni @@ -31,7 +31,7 @@ pw_rpc_server = { "${nxp_platform_dir}/PigweedLogger.cpp", "${nxp_platform_dir}/Rpc.cpp", ] - + include_dirs = [ "${chip_root}/examples/common", "${chip_root}/examples/common/pigweed", diff --git a/examples/platform/nxp/pw_sys_io/BUILD.gn b/examples/platform/nxp/pw_sys_io/BUILD.gn index cb6413e9311896..ed3d35246093f1 100644 --- a/examples/platform/nxp/pw_sys_io/BUILD.gn +++ b/examples/platform/nxp/pw_sys_io/BUILD.gn @@ -13,8 +13,8 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("//build_overrides/pigweed.gni") import("//build_overrides/nxp_sdk.gni") +import("//build_overrides/pigweed.gni") import("$dir_pw_build/target_types.gni") import("${chip_root}/src/platform/device.gni") @@ -22,20 +22,20 @@ import("${chip_root}/src/platform/device.gni") config("default_config") { include_dirs = [ "public", - "${chip_root}/src/" + "${chip_root}/src/", ] } pw_source_set("pw_sys_io_nxp") { sources = [ + "${chip_root}/src/lib/shell/streamer_nxp.cpp", "sys_io_nxp.cc", - "${chip_root}/src/lib/shell/streamer_nxp.cpp" ] deps = [ "$dir_pw_sys_io:default_putget_bytes", "$dir_pw_sys_io:facade", - "${nxp_sdk_build_root}/${nxp_sdk_name}:nxp_sdk" + "${nxp_sdk_build_root}/${nxp_sdk_name}:nxp_sdk", ] public_configs = [ ":default_config" ] diff --git a/src/platform/device.gni b/src/platform/device.gni index eb9f5c5ea02c91..d3654dc170ca4f 100644 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -49,7 +49,8 @@ declare_args() { # Enable openthread support. chip_enable_openthread = chip_device_platform == "linux" || chip_device_platform == "qpg" || - chip_device_platform == "cc13x2_26x2" || chip_device_platform == "cc13x4_26x4" || + chip_device_platform == "cc13x2_26x2" || + chip_device_platform == "cc13x4_26x4" || chip_device_platform == "k32w0" || chip_device_platform == "tizen" || chip_device_platform == "stm32" || chip_device_platform == "webos" } diff --git a/src/platform/nxp/k32w/k32w1/BUILD.gn b/src/platform/nxp/k32w/k32w1/BUILD.gn index 68355e46fc4d3b..bb3e74dc034527 100644 --- a/src/platform/nxp/k32w/k32w1/BUILD.gn +++ b/src/platform/nxp/k32w/k32w1/BUILD.gn @@ -60,13 +60,13 @@ static_library("nxp_platform") { ] public = [ - "${chip_root}/src/platform/nxp/k32w/k32w1/BLEManagerImpl.h", "${chip_root}/src/credentials/DeviceAttestationCredsProvider.h", "${chip_root}/src/credentials/examples/DeviceAttestationCredsExample.h", "${chip_root}/src/credentials/examples/ExampleDACs.h", "${chip_root}/src/credentials/examples/ExamplePAI.h", "${chip_root}/src/platform/nxp/k32w/k32w1/BLEManagerImpl.h", - "${chip_root}/src/platform/nxp/k32w/k32w1/SMU2Manager.h" + "${chip_root}/src/platform/nxp/k32w/k32w1/BLEManagerImpl.h", + "${chip_root}/src/platform/nxp/k32w/k32w1/SMU2Manager.h", ] public_deps = [ "${chip_root}/src/platform:platform_base" ] @@ -76,9 +76,7 @@ static_library("nxp_platform") { } if (chip_enable_ota_requestor) { - public += [ - "../common/OTAImageProcessorImpl.h" - ] + public += [ "../common/OTAImageProcessorImpl.h" ] sources += [ "../common/OTAImageProcessorImpl.cpp", @@ -98,24 +96,22 @@ static_library("nxp_platform") { "K32W1PersistentStorageOpKeystore.h", ] - if (chip_with_factory_data == 1) { - sources += [ - "../common/FactoryDataProvider.cpp", - "FactoryDataProviderImpl.cpp", - ] - public += [ - "${chip_root}/src/credentials/CHIPCert.h", - "${chip_root}/src/credentials/CertificationDeclaration.h", - ] + if (chip_with_factory_data == 1) { + sources += [ + "../common/FactoryDataProvider.cpp", + "FactoryDataProviderImpl.cpp", + ] + public += [ + "${chip_root}/src/credentials/CHIPCert.h", + "${chip_root}/src/credentials/CertificationDeclaration.h", + ] - if (chip_convert_dac_private_key == 1) { - defines = [ "CHIP_DEVICE_CONFIG_SECURE_DAC_PRIVATE_KEY=1" ] + if (chip_convert_dac_private_key == 1) { + defines = [ "CHIP_DEVICE_CONFIG_SECURE_DAC_PRIVATE_KEY=1" ] + } } - } - public_deps += [ - "${mbedtls_root}:mbedtls", - ] + public_deps += [ "${mbedtls_root}:mbedtls" ] } deps = [] @@ -146,6 +142,6 @@ static_library("nxp_platform") { public_deps += [ "${chip_root}/src/crypto", - "${chip_root}/src/platform/logging:headers" + "${chip_root}/src/platform/logging:headers", ] } diff --git a/src/platform/nxp/k32w/k32w1/args.gni b/src/platform/nxp/k32w/k32w1/args.gni index f0380eefa60708..2de35770927a63 100644 --- a/src/platform/nxp/k32w/k32w1/args.gni +++ b/src/platform/nxp/k32w/k32w1/args.gni @@ -39,7 +39,8 @@ chip_project_config_include = "" chip_inet_project_config_include = "" chip_system_project_config_include = "" chip_ble_project_config_include = "" -chip_project_config_include_dirs = ["${chip_root}/examples/platform/${nxp_platform}/app/project_include"] +chip_project_config_include_dirs = + [ "${chip_root}/examples/platform/${nxp_platform}/app/project_include" ] chip_enable_openthread = true @@ -61,7 +62,7 @@ openthread_external_mbedtls = mbedtls_target openthread_project_core_config_file = "OpenThreadConfig.h" openthread_core_config_platform_check_file = - "openthread-core-k32w1-config-check.h" + "openthread-core-k32w1-config-check.h" openthread_core_config_deps = [ "${chip_root}/examples/platform/nxp/k32w/k32w1:openthread_core_config_k32w1_chip_examples" ] openthread_external_platform = "${chip_root}/third_party/openthread/platforms/nxp/k32w/k32w1:libopenthread-k32w1" diff --git a/third_party/nxp/k32w1_sdk/BUILD.gn b/third_party/nxp/k32w1_sdk/BUILD.gn index 3cddba18dbddcd..9a6cf009555de3 100644 --- a/third_party/nxp/k32w1_sdk/BUILD.gn +++ b/third_party/nxp/k32w1_sdk/BUILD.gn @@ -49,12 +49,12 @@ config("mbedtls_k32w1_config") { "MBEDTLS_ERROR_C", "MBEDTLS_PKCS5_C", - "MBEDTLS_ECP_FIXED_POINT_OPTIM=0", # To reduce peak memory usage + "MBEDTLS_ECP_FIXED_POINT_OPTIM=0", # To reduce peak memory usage "MBEDTLS_MPI_WINDOW_SIZE=1", "MBEDTLS_ECP_WINDOW_SIZE=2", - "MBEDTLS_MPI_MAX_SIZE=32", # Maximum number of bytes for usable MPIs. - "MBEDTLS_ECP_MAX_BITS=256", # Maximum bit size of groups */ - "MBEDTLS_ENTROPY_MAX_SOURCES=1", # Maximum number of sources supported + "MBEDTLS_MPI_MAX_SIZE=32", # Maximum number of bytes for usable MPIs. + "MBEDTLS_ECP_MAX_BITS=256", # Maximum bit size of groups */ + "MBEDTLS_ENTROPY_MAX_SOURCES=1", # Maximum number of sources supported "MBEDTLS_ENTROPY_HARDWARE_ALT", ] @@ -68,9 +68,9 @@ config("mbedtls_k32w1_config") { } if (chip_crypto == "platform") { - defines += [ - # "MBEDTLS_CCM_ALT", - ] + defines += [ + # "MBEDTLS_CCM_ALT", + ] } include_dirs = [ chip_root ] @@ -78,8 +78,8 @@ config("mbedtls_k32w1_config") { mbedtls_target("mbedtls") { sources = [ - "${k32w1_sdk_root}/middleware/mbedtls/port/sssapi/entropy_poll_alt.c", "${k32w1_sdk_root}/middleware/mbedtls/port/sssapi/ccm_alt.c", + "${k32w1_sdk_root}/middleware/mbedtls/port/sssapi/entropy_poll_alt.c", ] public_configs = [ ":mbedtls_k32w1_config" ] diff --git a/third_party/nxp/k32w1_sdk/k32w1_sdk.gni b/third_party/nxp/k32w1_sdk/k32w1_sdk.gni index 7433c4b2152ecf..7a8bf40afe7a04 100644 --- a/third_party/nxp/k32w1_sdk/k32w1_sdk.gni +++ b/third_party/nxp/k32w1_sdk/k32w1_sdk.gni @@ -38,12 +38,12 @@ declare_args() { use_hw_aes = false # ICD Matter Configuration flags - chip_ot_idle_interval_ms = 2000 # 2s Idle Intervals - chip_ot_active_interval_ms = 500 # 500ms Active Intervals + chip_ot_idle_interval_ms = 2000 # 2s Idle Intervals + chip_ot_active_interval_ms = 500 # 500ms Active Intervals - nxp_idle_mode_interval_s = 600 # 10min Idle Mode Interval - nxp_active_mode_interval_ms = 10000 # 10s Active Mode Interval - nxp_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold + nxp_idle_mode_interval_s = 600 # 10min Idle Mode Interval + nxp_active_mode_interval_ms = 10000 # 10s Active Mode Interval + nxp_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold nxp_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric } @@ -51,8 +51,9 @@ openthread_nxp_root = "${chip_root}/third_party/openthread/ot-nxp" assert(k32w1_sdk_root != "", "k32w1_sdk_root must be specified") -assert(!((use_smu2_static && !chip_openthread_ftd) || ((use_smu2_dynamic && !chip_openthread_ftd))), - "SMU2 can be used as system memory only with OT-FTD suppport") +assert(!((use_smu2_static && !chip_openthread_ftd) || + (use_smu2_dynamic && !chip_openthread_ftd)), + "SMU2 can be used as system memory only with OT-FTD suppport") # Defines an k32w1 SDK build target. # @@ -64,9 +65,9 @@ template("k32w1_sdk") { k32w1_sdk_root = invoker.k32w1_sdk_root } - assert( - chip_with_low_power == 0 || (chip_with_low_power == 1 && chip_with_ot_cli == 0), - "Please disable low power if openthread CLI is needed!") + assert(chip_with_low_power == 0 || + (chip_with_low_power == 1 && chip_with_ot_cli == 0), + "Please disable low power if openthread CLI is needed!") sdk_target_name = target_name @@ -167,13 +168,13 @@ template("k32w1_sdk") { if (sdk_release == 1) { _sdk_include_dirs += [ - "${k32w1_sdk_root}/middleware/wireless/bluetooth/application/common/matter", - "${k32w1_sdk_root}/devices/K32W1480/drivers", - "${k32w1_sdk_root}/devices/K32W1480/utilities", - "${k32w1_sdk_root}/devices/K32W1480/utilities/debug_console", - "${k32w1_sdk_root}/devices/K32W1480/utilities/str", - "${k32w1_sdk_root}/devices/K32W1480/utilities/format", - ] + "${k32w1_sdk_root}/middleware/wireless/bluetooth/application/common/matter", + "${k32w1_sdk_root}/devices/K32W1480/drivers", + "${k32w1_sdk_root}/devices/K32W1480/utilities", + "${k32w1_sdk_root}/devices/K32W1480/utilities/debug_console", + "${k32w1_sdk_root}/devices/K32W1480/utilities/str", + "${k32w1_sdk_root}/devices/K32W1480/utilities/format", + ] } else { _sdk_include_dirs += [ "${k32w1_sdk_root}/devices/KW45B41Z83/drivers", @@ -260,11 +261,14 @@ template("k32w1_sdk") { "gLoggingActive_d=0", "gLogRingPlacementOffset_c=0xF000", "CHIP_PLAT_NVM_SUPPORT=1", - "mAdvertisingDefaultTxPower_c=0", # default advertising TX power + "mAdvertisingDefaultTxPower_c=0", # default advertising TX power "mConnectionDefaultTxPower_c=0", # default connection TX power - "BLE_HIGH_TX_POWER=0", # when enabled overwrite default tx power with following values gAdvertisingPowerLeveldBm_c and gConnectPowerLeveldBm_c + "BLE_HIGH_TX_POWER=0", # when enabled overwrite default tx power with + # following values gAdvertisingPowerLeveldBm_c and + # gConnectPowerLeveldBm_c "gAdvertisingPowerLeveldBm_c=0", "gConnectPowerLeveldBm_c=0", + #move these platform specific defines to args.gni "NXP_OT_IDLE_INTERVAL=${chip_ot_idle_interval_ms}", "NXP_OT_ACTIVE_INTERVAL=${chip_ot_active_interval_ms}", @@ -276,17 +280,14 @@ template("k32w1_sdk") { ] if (chip_enable_pw_rpc) { - defines += [ - "SERIAL_PORT_TYPE_UART_DMA=1" - ] + defines += [ "SERIAL_PORT_TYPE_UART_DMA=1" ] } else { - defines += [ - "SERIAL_PORT_TYPE_UART=1" - ] + defines += [ "SERIAL_PORT_TYPE_UART=1" ] } if (chip_with_low_power == 1 && chip_logging == true) { - print("WARNING: enabling logs in low power might break the LP timings. Use at your own risk!") + print( + "WARNING: enabling logs in low power might break the LP timings. Use at your own risk!") print("WARNING: set chip_logging=false to disable logging.") } @@ -332,13 +333,13 @@ template("k32w1_sdk") { if (chip_logging == false) { defines += [ "K32W_LOG_ENABLED=0", - "gUartDebugConsole_d=0" + "gUartDebugConsole_d=0", ] } else { defines += [ "K32W_LOG_ENABLED=1", "OSA_USED=1", - "gUartDebugConsole_d=1" + "gUartDebugConsole_d=1", ] } } else { @@ -350,15 +351,11 @@ template("k32w1_sdk") { } if (use_hw_sha256) { - defines += [ - "USE_HW_SHA256", - ] + defines += [ "USE_HW_SHA256" ] } if (use_hw_aes) { - defines += [ - "USE_HW_AES", - ] + defines += [ "USE_HW_AES" ] } if (defined(invoker.defines)) { @@ -401,154 +398,149 @@ template("k32w1_sdk") { if (sdk_release == 1) { sources += [ - "${k32w1_sdk_root}/middleware/wireless/bluetooth/application/common/matter/ble_init.c", - "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_k4_flash.c", - "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_k4_controller.c", + "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_ccm32k.c", "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_clock.c", + "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_cmc.c", + "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_crc.c", + "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_elemu.c", "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_gpio.c", + "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_imu.c", + "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_k4_controller.c", + "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_k4_flash.c", + "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_lpspi.c", + "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_lptmr.c", "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_lpuart.c", "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_ltc.c", - "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_lptmr.c", - "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_lpspi.c", - "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_elemu.c", "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_spc.c", "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_wuu.c", - "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_imu.c", - "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_crc.c", - "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_cmc.c", - "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_ccm32k.c", - "${k32w1_sdk_root}/devices/K32W1480/utilities/fsl_assert.c", "${k32w1_sdk_root}/devices/K32W1480/utilities/debug_console/fsl_debug_console.c", + "${k32w1_sdk_root}/devices/K32W1480/utilities/fsl_assert.c", "${k32w1_sdk_root}/devices/K32W1480/utilities/str/fsl_str.c", + "${k32w1_sdk_root}/middleware/wireless/bluetooth/application/common/matter/ble_init.c", ] if (chip_enable_pw_rpc) { sources += [ "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_edma.c", - "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_lpuart_edma.c" + "${k32w1_sdk_root}/devices/K32W1480/drivers/fsl_lpuart_edma.c", ] } } else { sources += [ - "${k32w1_sdk_root}/middleware/wireless/bluetooth/application/common/ble_init.c", - "${k32w1_sdk_root}/platform/drivers/flash_k4/fsl_k4_flash.c", - "${k32w1_sdk_root}/platform/drivers/flash_k4/fsl_k4_controller.c", - "${k32w1_sdk_root}/devices/KW45B41Z83/drivers/fsl_clock.c", - "${k32w1_sdk_root}/platform/drivers/gpio/fsl_gpio.c", - "${k32w1_sdk_root}/platform/drivers/lpuart/fsl_lpuart.c", - "${k32w1_sdk_root}/platform/drivers/ltc/fsl_ltc.c", - "${k32w1_sdk_root}/platform/drivers/lptmr/fsl_lptmr.c", - "${k32w1_sdk_root}/platform/drivers/lpspi/fsl_lpspi.c", - "${k32w1_sdk_root}/platform/drivers/elemu/fsl_elemu.c", - "${k32w1_sdk_root}/platform/drivers/spc/fsl_spc.c", - "${k32w1_sdk_root}/platform/drivers/wuu/fsl_wuu.c", - "${k32w1_sdk_root}/platform/drivers/imu/fsl_imu.c", - "${k32w1_sdk_root}/platform/drivers/crc/fsl_crc.c", - "${k32w1_sdk_root}/platform/drivers/cmc/fsl_cmc.c", - "${k32w1_sdk_root}/platform/drivers/ccm32k/fsl_ccm32k.c", - "${k32w1_sdk_root}/platform/utilities/assert/fsl_assert.c", - "${k32w1_sdk_root}/platform/utilities/debug_console/fsl_debug_console.c", - "${k32w1_sdk_root}/platform/utilities/str/fsl_str.c", + "${k32w1_sdk_root}/devices/KW45B41Z83/drivers/fsl_clock.c", + "${k32w1_sdk_root}/middleware/wireless/bluetooth/application/common/ble_init.c", + "${k32w1_sdk_root}/platform/drivers/ccm32k/fsl_ccm32k.c", + "${k32w1_sdk_root}/platform/drivers/cmc/fsl_cmc.c", + "${k32w1_sdk_root}/platform/drivers/crc/fsl_crc.c", + "${k32w1_sdk_root}/platform/drivers/elemu/fsl_elemu.c", + "${k32w1_sdk_root}/platform/drivers/flash_k4/fsl_k4_controller.c", + "${k32w1_sdk_root}/platform/drivers/flash_k4/fsl_k4_flash.c", + "${k32w1_sdk_root}/platform/drivers/gpio/fsl_gpio.c", + "${k32w1_sdk_root}/platform/drivers/imu/fsl_imu.c", + "${k32w1_sdk_root}/platform/drivers/lpspi/fsl_lpspi.c", + "${k32w1_sdk_root}/platform/drivers/lptmr/fsl_lptmr.c", + "${k32w1_sdk_root}/platform/drivers/lpuart/fsl_lpuart.c", + "${k32w1_sdk_root}/platform/drivers/ltc/fsl_ltc.c", + "${k32w1_sdk_root}/platform/drivers/spc/fsl_spc.c", + "${k32w1_sdk_root}/platform/drivers/wuu/fsl_wuu.c", + "${k32w1_sdk_root}/platform/utilities/assert/fsl_assert.c", + "${k32w1_sdk_root}/platform/utilities/debug_console/fsl_debug_console.c", + "${k32w1_sdk_root}/platform/utilities/str/fsl_str.c", ] if (chip_enable_pw_rpc) { sources += [ "${k32w1_sdk_root}/platform/drivers/lpuart/fsl_edma.c", - "${k32w1_sdk_root}/platform/drivers/lpuart/fsl_lpuart_edma.c" + "${k32w1_sdk_root}/platform/drivers/lpuart/fsl_lpuart_edma.c", ] } } sources += [ - "${k32w1_sdk_root}/devices/K32W1480/gcc/startup_K32W1480.S", - "${k32w1_sdk_root}/devices/K32W1480/system_K32W1480.c", - "${k32w1_sdk_root}/components/rpmsg/fsl_adapter_rpmsg.c", - "${k32w1_sdk_root}/components/osa/fsl_os_abstraction_free_rtos.c", + "${k32w1_sdk_root}/components/button/fsl_component_button.c", + "${k32w1_sdk_root}/components/flash//nor/lpspi/fsl_lpspi_mem_adapter.c", + "${k32w1_sdk_root}/components/flash//nor/lpspi/fsl_lpspi_nor_flash.c", + "${k32w1_sdk_root}/components/gpio/fsl_adapter_gpio.c", + "${k32w1_sdk_root}/components/internal_flash/fsl_adapter_k4_flash.c", + "${k32w1_sdk_root}/components/led/fsl_component_led.c", "${k32w1_sdk_root}/components/lists/fsl_component_generic_list.c", - "${k32w1_sdk_root}/components/messaging/fsl_component_messaging.c", "${k32w1_sdk_root}/components/mem_manager/fsl_component_mem_manager_light.c", + "${k32w1_sdk_root}/components/messaging/fsl_component_messaging.c", + "${k32w1_sdk_root}/components/osa/fsl_os_abstraction_free_rtos.c", "${k32w1_sdk_root}/components/panic/fsl_component_panic.c", + "${k32w1_sdk_root}/components/power_manager/boards/K32W148-EVK/fsl_pm_board.c", + "${k32w1_sdk_root}/components/power_manager/core/fsl_pm_core.c", + "${k32w1_sdk_root}/components/reset/fsl_adapter_reset.c", + "${k32w1_sdk_root}/components/rpmsg/fsl_adapter_rpmsg.c", "${k32w1_sdk_root}/components/serial_manager/fsl_component_serial_manager.c", "${k32w1_sdk_root}/components/serial_manager/fsl_component_serial_port_uart.c", - "${k32w1_sdk_root}/components/uart/fsl_adapter_lpuart.c", - "${k32w1_sdk_root}/components/gpio/fsl_adapter_gpio.c", - "${k32w1_sdk_root}/components/led/fsl_component_led.c", - "${k32w1_sdk_root}/components/button/fsl_component_button.c", - "${k32w1_sdk_root}/components/timer_manager/fsl_component_timer_manager.c", - "${k32w1_sdk_root}/components/timer/fsl_adapter_lptmr.c", "${k32w1_sdk_root}/components/time_stamp/fsl_adapter_lptmr_time_stamp.c", - "${k32w1_sdk_root}/components/internal_flash/fsl_adapter_k4_flash.c", - "${k32w1_sdk_root}/components/reset/fsl_adapter_reset.c", - "${k32w1_sdk_root}/components/flash//nor/lpspi/fsl_lpspi_nor_flash.c", - "${k32w1_sdk_root}/components/flash//nor/lpspi/fsl_lpspi_mem_adapter.c", - "${k32w1_sdk_root}/components/power_manager/boards/K32W148-EVK/fsl_pm_board.c", - "${k32w1_sdk_root}/components/power_manager/core/fsl_pm_core.c", - + "${k32w1_sdk_root}/components/timer/fsl_adapter_lptmr.c", + "${k32w1_sdk_root}/components/timer_manager/fsl_component_timer_manager.c", + "${k32w1_sdk_root}/components/uart/fsl_adapter_lpuart.c", + "${k32w1_sdk_root}/devices/K32W1480/gcc/startup_K32W1480.S", + "${k32w1_sdk_root}/devices/K32W1480/system_K32W1480.c", + "${k32w1_sdk_root}/middleware/multicore/mcmgr/src/mcmgr.c", + "${k32w1_sdk_root}/middleware/multicore/mcmgr/src/mcmgr_imu_internal.c", + "${k32w1_sdk_root}/middleware/multicore/mcmgr/src/mcmgr_internal_core_api_k32w1.c", + "${k32w1_sdk_root}/middleware/multicore/rpmsg_lite/lib/common/llist.c", + "${k32w1_sdk_root}/middleware/multicore/rpmsg_lite/lib/rpmsg_lite/porting/environment/rpmsg_env_freertos.c", + "${k32w1_sdk_root}/middleware/multicore/rpmsg_lite/lib/rpmsg_lite/porting/platform/k32w1/rpmsg_platform.c", + "${k32w1_sdk_root}/middleware/multicore/rpmsg_lite/lib/rpmsg_lite/rpmsg_lite.c", + "${k32w1_sdk_root}/middleware/multicore/rpmsg_lite/lib/virtio/virtqueue.c", + "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_aes.c", + "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_aes_cmac.c", + "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_ccm.c", + "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_ecdh.c", + "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_hmac_sha256.c", + "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_init.c", + "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_sha256.c", + "${k32w1_sdk_root}/middleware/secure-subsystem/src/sscp/fsl_sscp_mu.c", + "${k32w1_sdk_root}/middleware/secure-subsystem/src/sscp/fsl_sss_mgmt.c", + "${k32w1_sdk_root}/middleware/secure-subsystem/src/sscp/fsl_sss_sscp.c", + "${k32w1_sdk_root}/middleware/wireless/ble_controller/src/controller_api.c", + "${k32w1_sdk_root}/middleware/wireless/bluetooth/application/common/ble_conn_manager.c", + "${k32w1_sdk_root}/middleware/wireless/bluetooth/application/common/gatt_db/gatt_database.c", + "${k32w1_sdk_root}/middleware/wireless/bluetooth/hci_transport/source/hcit_generic_adapter_interface.c", + "${k32w1_sdk_root}/middleware/wireless/bluetooth/host/config/ble_globals.c", + "${k32w1_sdk_root}/middleware/wireless/bluetooth/port/fwk_generic_list.c", + "${k32w1_sdk_root}/middleware/wireless/bluetooth/port/fwk_timer_manager.c", + "${k32w1_sdk_root}/middleware/wireless/framework/Common/rtos/freertos/heap_mem_manager.c", + "${k32w1_sdk_root}/middleware/wireless/framework/FunctionLib/FunctionLib.c", + "${k32w1_sdk_root}/middleware/wireless/framework/HWParameter/HWParameter.c", + "${k32w1_sdk_root}/middleware/wireless/framework/LowPower/PWR.c", + "${k32w1_sdk_root}/middleware/wireless/framework/LowPower/PWR_systicks.c", + "${k32w1_sdk_root}/middleware/wireless/framework/NVM/Source/NV_Flash.c", + "${k32w1_sdk_root}/middleware/wireless/framework/OtaSupport/Source/OtaExternalFlash.c", + "${k32w1_sdk_root}/middleware/wireless/framework/OtaSupport/Source/OtaSupport.c", + "${k32w1_sdk_root}/middleware/wireless/framework/RNG/RNG.c", + "${k32w1_sdk_root}/middleware/wireless/framework/SecLib/SecLib_sss.c", + "${k32w1_sdk_root}/middleware/wireless/framework/Sensors/sensors.c", "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/clock_config.c", "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/pin_mux.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_comp.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/app_services_init.c", + "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board.c", + "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_comp.c", "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_dcdc.c", "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", - "${k32w1_sdk_root}/middleware/wireless/framework/FunctionLib/FunctionLib.c", - "${k32w1_sdk_root}/middleware/wireless/framework/HWParameter/HWParameter.c", - "${k32w1_sdk_root}/middleware/wireless/framework/Sensors/sensors.c", + "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", + "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform.c", + "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform_ble.c", + "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform_extflash.c", + "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform_ics.c", "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform_lowpower.c", "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform_lowpower_timer.c", - "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform_ble.c", "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform_ot.c", - "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform_ics.c", "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform_ota.c", - "${k32w1_sdk_root}/middleware/wireless/framework/platform/kw45_k32w1/fwk_platform_extflash.c", - "${k32w1_sdk_root}/middleware/wireless/framework/RNG/RNG.c", - "${k32w1_sdk_root}/middleware/wireless/framework/LowPower/PWR.c", - "${k32w1_sdk_root}/middleware/wireless/framework/LowPower/PWR_systicks.c", - "${k32w1_sdk_root}/middleware/wireless/framework/NVM/Source/NV_Flash.c", - "${k32w1_sdk_root}/middleware/wireless/framework/SecLib/SecLib_sss.c", - "${k32w1_sdk_root}/middleware/wireless/framework/OtaSupport/Source/OtaSupport.c", - "${k32w1_sdk_root}/middleware/wireless/framework/OtaSupport/Source/OtaExternalFlash.c", - - "${k32w1_sdk_root}/middleware/multicore/rpmsg_lite/lib/rpmsg_lite/rpmsg_lite.c", - "${k32w1_sdk_root}/middleware/multicore/rpmsg_lite/lib/rpmsg_lite/porting/environment/rpmsg_env_freertos.c", - "${k32w1_sdk_root}/middleware/multicore/rpmsg_lite/lib/rpmsg_lite/porting/platform/k32w1/rpmsg_platform.c", - "${k32w1_sdk_root}/middleware/multicore/rpmsg_lite/lib/common/llist.c", - "${k32w1_sdk_root}/middleware/multicore/rpmsg_lite/lib/virtio/virtqueue.c", - "${k32w1_sdk_root}/middleware/multicore/mcmgr/src/mcmgr.c", - "${k32w1_sdk_root}/middleware/multicore/mcmgr/src/mcmgr_imu_internal.c", - "${k32w1_sdk_root}/middleware/multicore/mcmgr/src/mcmgr_internal_core_api_k32w1.c", - "${k32w1_sdk_root}/middleware/wireless/ble_controller/src/controller_api.c", - "${k32w1_sdk_root}/middleware/wireless/bluetooth/port/fwk_generic_list.c", - "${k32w1_sdk_root}/middleware/wireless/bluetooth/application/common/ble_conn_manager.c", - "${k32w1_sdk_root}/middleware/wireless/bluetooth/application/common/gatt_db/gatt_database.c", - "${k32w1_sdk_root}/middleware/wireless/bluetooth/hci_transport/source/hcit_generic_adapter_interface.c", - "${k32w1_sdk_root}/middleware/wireless/bluetooth/host/config/ble_globals.c", - "${k32w1_sdk_root}/middleware/wireless/bluetooth/port/fwk_timer_manager.c", - - "${k32w1_sdk_root}/middleware/secure-subsystem/src/sscp/fsl_sscp_mu.c", - "${k32w1_sdk_root}/middleware/secure-subsystem/src/sscp/fsl_sss_mgmt.c", - "${k32w1_sdk_root}/middleware/secure-subsystem/src/sscp/fsl_sss_sscp.c", - "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_init.c", - "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_aes.c", - "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_ccm.c", - "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_sha256.c", - "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_hmac_sha256.c", - "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_ecdh.c", - "${k32w1_sdk_root}/middleware/secure-subsystem/port/kw45_k4w1/sss_aes_cmac.c", - + "${k32w1_sdk_root}/middleware/wireless/ieee-802.15.4/ieee_802_15_4/phy/source/PhyTime.c", "${k32w1_sdk_root}/middleware/wireless/ieee-802.15.4/ieee_802_15_4/phy/source/SerialDevice/ASP.c", "${k32w1_sdk_root}/middleware/wireless/ieee-802.15.4/ieee_802_15_4/phy/source/SerialDevice/Phy.c", - "${k32w1_sdk_root}/middleware/wireless/ieee-802.15.4/ieee_802_15_4/phy/source/PhyTime.c", - - "${k32w1_sdk_root}/rtos/freertos/freertos_kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", - "${k32w1_sdk_root}/rtos/freertos/freertos_kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c", - "${k32w1_sdk_root}/middleware/wireless/framework/Common/rtos/freertos/heap_mem_manager.c", "${k32w1_sdk_root}/rtos/freertos/freertos_kernel/croutine.c", "${k32w1_sdk_root}/rtos/freertos/freertos_kernel/event_groups.c", "${k32w1_sdk_root}/rtos/freertos/freertos_kernel/list.c", + "${k32w1_sdk_root}/rtos/freertos/freertos_kernel/portable/GCC/ARM_CM33_NTZ/non_secure/port.c", + "${k32w1_sdk_root}/rtos/freertos/freertos_kernel/portable/GCC/ARM_CM33_NTZ/non_secure/portasm.c", "${k32w1_sdk_root}/rtos/freertos/freertos_kernel/queue.c", "${k32w1_sdk_root}/rtos/freertos/freertos_kernel/stream_buffer.c", "${k32w1_sdk_root}/rtos/freertos/freertos_kernel/tasks.c", diff --git a/third_party/openthread/platforms/nxp/k32w/k32w0/BUILD.gn b/third_party/openthread/platforms/nxp/k32w/k32w0/BUILD.gn index ae01592eb8eeaa..a67158170d0a18 100644 --- a/third_party/openthread/platforms/nxp/k32w/k32w0/BUILD.gn +++ b/third_party/openthread/platforms/nxp/k32w/k32w0/BUILD.gn @@ -38,7 +38,7 @@ config("openthread_k32w0_config") { "OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1", "OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1", "K32W0_RADIO_NUM_OF_RX_BUFS=16", - "OPENTHREAD_PLATFORM_CORE_CONFIG_FILE=\"app/project_include/OpenThreadConfig.h\"" + "OPENTHREAD_PLATFORM_CORE_CONFIG_FILE=\"app/project_include/OpenThreadConfig.h\"", ] } diff --git a/third_party/openthread/platforms/nxp/k32w/k32w1/BUILD.gn b/third_party/openthread/platforms/nxp/k32w/k32w1/BUILD.gn index b925d1a4a89ef5..446768b23b778c 100644 --- a/third_party/openthread/platforms/nxp/k32w/k32w1/BUILD.gn +++ b/third_party/openthread/platforms/nxp/k32w/k32w1/BUILD.gn @@ -32,7 +32,7 @@ config("openthread_k32w1_config") { "MBEDTLS_ENTROPY_HARDWARE_ALT=1", "OPENTHREAD_PLATFORM_CORE_CONFIG_FILE=\"app/project_include/OpenThreadConfig.h\"", "MBEDTLS_THREADING_C=1", - "MBEDTLS_THREADING_ALT=1" + "MBEDTLS_THREADING_ALT=1", ] if (use_smu2_dynamic) { @@ -53,8 +53,7 @@ source_set("openthread_core_config_k32w1") { } source_set("openthread_mbedtls_config_k32w1") { - sources = - [ "${openthread_nxp_root}/src/k32w1/k32w1/k32w1-mbedtls-config.h" ] + sources = [ "${openthread_nxp_root}/src/k32w1/k32w1/k32w1-mbedtls-config.h" ] } source_set("libopenthread-k32w1") { @@ -72,20 +71,14 @@ source_set("libopenthread-k32w1") { ] if (chip_crypto == "platform") { - sources += [ - "${openthread_nxp_root}/src/k32w1/k32w1/ecdsa_sss.cpp", - ] + sources += [ "${openthread_nxp_root}/src/k32w1/k32w1/ecdsa_sss.cpp" ] if (use_hw_sha256) { - sources += [ - "${openthread_nxp_root}/src/k32w1/k32w1/sha256_sss.cpp", - ] + sources += [ "${openthread_nxp_root}/src/k32w1/k32w1/sha256_sss.cpp" ] } if (use_hw_aes) { - sources += [ - "${openthread_nxp_root}/src/k32w1/k32w1/aes_sss.cpp", - ] + sources += [ "${openthread_nxp_root}/src/k32w1/k32w1/aes_sss.cpp" ] } }