Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NXP] Initial support for K32W1 #28777

Merged
merged 30 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4180357
[NXP] Introducing Matter support for K32W1
doru91 Aug 1, 2023
94cb12a
[NXP] Add CI/CV support for K32W1
marius-alex-tache Aug 9, 2023
c45a2f5
[NXP] Bump ot-nxp submodule
marius-alex-tache Aug 21, 2023
789715d
[K32W] Add OPENTHREAD_PLATFORM_CORE_CONFIG_FILE define
marius-alex-tache Aug 21, 2023
522f5fb
[K32W1] Fix misspell
marius-alex-tache Aug 21, 2023
23bb566
Restyled by whitespace
restyled-commits Aug 21, 2023
996cbfe
Restyled by clang-format
restyled-commits Aug 21, 2023
0babb3c
Restyled by gn
restyled-commits Aug 21, 2023
38ff5f8
Restyled by prettier-markdown
restyled-commits Aug 21, 2023
75eb631
Restyled by autopep8
restyled-commits Aug 21, 2023
81f2d75
Restyled by isort
restyled-commits Aug 21, 2023
6e61b71
[K32W1] Fix lint errors
marius-alex-tache Aug 21, 2023
81460d7
[K32W1] Removed deprecated class
marius-alex-tache Aug 21, 2023
8f69b9d
Restyled by clang-format
restyled-commits Aug 21, 2023
3858b21
[test] Update testdata/all_targets_linux_x64 with K32W1 targets
marius-alex-tache Aug 21, 2023
4b8ba73
[K32W] Fix target names in workflow
marius-alex-tache Aug 22, 2023
40acfb9
[K32W1] Remove deprecated commented sections
marius-alex-tache Aug 23, 2023
96a9922
[K32W1] Add missing # to reference targets in README
marius-alex-tache Aug 23, 2023
16f994a
[K32W1] Fix spelling errors
marius-alex-tache Aug 25, 2023
0beb592
[K32W1] Update CSR crypto flag usage
marius-alex-tache Sep 6, 2023
5e56ee3
[K32W1] Remove ResetWatermarks empty implementation
marius-alex-tache Sep 7, 2023
93747bd
Fix typo in device.gni after fixing conflict
marius-alex-tache Sep 12, 2023
8d36b23
[K32W1] Remove anchors and backtick some words
marius-alex-tache Sep 13, 2023
2d8ddfe
[K32W] Fix confusing naming in K32W builder
marius-alex-tache Sep 20, 2023
255f476
[K32W] Remove commented option
marius-alex-tache Sep 20, 2023
cb6a55c
[K32W] Fix binary extension format
marius-alex-tache Sep 20, 2023
166e536
Restyled by autopep8
restyled-commits Sep 20, 2023
4349828
[K32W] Fix binary name when copying
marius-alex-tache Sep 21, 2023
6da082b
Restyled by clang-format
restyled-commits Oct 3, 2023
38b9a22
[K32W1] Fix ErrorStr header inclusion
marius-alex-tache Oct 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Restyled by gn
  • Loading branch information
restyled-commits authored and marius-alex-tache committed Oct 3, 2023
commit 0babb3c93d7817b0561a02f9da2f3c3c1329fe35
30 changes: 14 additions & 16 deletions examples/contact-sensor-app/nxp/k32w/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ k32w1_executable("contact_sensor_app") {
"main/main.cpp",
]

### if (chip_with_factory_data == 1 && use_custom_factory_provider == 1) {
### sources += [
### "${k32w1_platform_dir}/common/CustomFactoryDataProvider.h",
### "${k32w1_platform_dir}/common/CustomFactoryDataProvider.cpp",
### ]
###
### defines = [
### "CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER=1",
### "CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS=3"
### ]
### }
### if (chip_with_factory_data == 1 && use_custom_factory_provider == 1) {
### sources += [
### "${k32w1_platform_dir}/common/CustomFactoryDataProvider.h",
### "${k32w1_platform_dir}/common/CustomFactoryDataProvider.cpp",
### ]
###
### defines = [
### "CHIP_DEVICE_CONFIG_USE_CUSTOM_PROVIDER=1",
### "CHIP_DEVICE_CONFIG_CUSTOM_PROVIDER_NUMBER_IDS=3"
### ]
### }

deps = [
":sdk",
Expand Down Expand Up @@ -128,7 +128,6 @@ k32w1_executable("contact_sensor_app") {

ldscript = "${k32w1_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc/connectivity.ld"


inputs = [ ldscript ]

ldflags = [
Expand All @@ -154,12 +153,11 @@ k32w1_executable("contact_sensor_app") {
### }
### }


group("k32w1") {
deps = [ ":contact_sensor_app" ]
### if (chip_pw_tokenizer_logging) {
### deps += [ ":contact_sensor_app.database" ]
### }
### if (chip_pw_tokenizer_logging) {
### deps += [ ":contact_sensor_app.database" ]
### }
}

group("default") {
Expand Down
12 changes: 6 additions & 6 deletions src/lwip/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ if (lwip_platform == "") {
assert(lwip_platform == "external" || lwip_platform == "standalone" ||
lwip_platform == "cc13xx_26xx" || lwip_platform == "cc32xx" ||
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 == "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
12 changes: 12 additions & 0 deletions src/platform/device.gni
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ assert(
chip_device_platform == "tizen" ||
chip_device_platform == "nrfconnect" ||
chip_device_platform == "k32w0" || chip_device_platform == "k32w1" ||
<<<<<<< HEAD
chip_device_platform == "qpg" ||
chip_device_platform == "telink" || chip_device_platform == "mbed" ||
chip_device_platform == "psoc6" || chip_device_platform == "android" ||
Expand All @@ -249,4 +250,15 @@ assert(
chip_device_platform == "SiWx917" ||
chip_device_platform == "openiotsdk" || chip_device_platform == "asr" ||
chip_device_platform == "stm32",
=======
chip_device_platform == "qpg" || chip_device_platform == "telink" ||
chip_device_platform == "mbed" || chip_device_platform == "psoc6" ||
chip_device_platform == "android" || chip_device_platform == "ameba" ||
chip_device_platform == "cyw30739" || chip_device_platform == "webos" ||
chip_device_platform == "mw320" || chip_device_platform == "zephyr" ||
chip_device_platform == "beken" || chip_device_platform == "bl602" ||
chip_device_platform == "bl702" || chip_device_platform == "bl702l" ||
chip_device_platform == "mt793x" || chip_device_platform == "SiWx917" ||
chip_device_platform == "openiotsdk" || chip_device_platform == "asr",
>>>>>>> c8ec13dc8a (Restyled by gn)
"Please select a valid value for chip_device_platform")
23 changes: 9 additions & 14 deletions src/platform/nxp/k32w/k32w1/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ if (chip_crypto == "platform") {
static_library("k32w1") {
sources = [
"../../../SingletonConfigurationManager.cpp",
"BLEManagerImpl.cpp",
"BLEManagerImpl.h",
"../common/BLEManagerCommon.cpp",
"../common/BLEManagerCommon.h",
"BLEManagerImpl.cpp",
"BLEManagerImpl.h",
"CHIPDevicePlatformConfig.h",
"CHIPDevicePlatformEvent.h",
"ConfigurationManagerImpl.cpp",
Expand All @@ -47,27 +47,24 @@ static_library("k32w1") {
"DiagnosticDataProviderImpl.h",
"K32W1Config.cpp",
"K32W1Config.h",
"ram_storage.c",
"ram_storage.h",
"KeyValueStoreManagerImpl.cpp",
"KeyValueStoreManagerImpl.h",
"Logging.cpp",
"PlatformManagerImpl.cpp",
"PlatformManagerImpl.h",
"SystemTimeSupport.cpp",
"ble_function_mux.c",
"ram_storage.c",
"ram_storage.h",
]

public_deps = [ "${chip_root}/src/platform:platform_base" ]

if (chip_with_low_power != 0) {
sources += [
"LowPowerHooks.cpp",
]
sources += [ "LowPowerHooks.cpp" ]
}

if (chip_enable_ota_requestor) {

if (chip_enable_ota_requestor) {
sources += [
"../common/OTAImageProcessorImpl.cpp",
"../common/OTAImageProcessorImpl.h",
Expand All @@ -78,17 +75,15 @@ static_library("k32w1") {
"OTAHooks.cpp",
]
}

if (chip_crypto == "platform") {
sources += [
"CHIPCryptoPalK32W1.cpp",
"K32W1PersistentStorageOpKeystore.cpp",
"K32W1PersistentStorageOpKeystore.h",
"CHIPCryptoPalK32W1.cpp",
]

public_deps += [
"${mbedtls_root}:mbedtls",
]
public_deps += [ "${mbedtls_root}:mbedtls" ]
}

deps = []
Expand Down
4 changes: 2 additions & 2 deletions src/platform/nxp/k32w/k32w1/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ mbedtls_target = "${chip_root}/third_party/nxp/k32w1_sdk:mbedtls"
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_config_platform_check_file =
"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"
16 changes: 8 additions & 8 deletions third_party/nxp/k32w1_sdk/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,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",
]
Expand All @@ -63,18 +63,18 @@ config("mbedtls_k32w1_config") {
]
}
if (chip_crypto == "platform") {
defines += [
# "MBEDTLS_CCM_ALT",
]
defines += [
# "MBEDTLS_CCM_ALT",
]
}

include_dirs = [ chip_root ]
}

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" ]
Expand Down
Loading