-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NXP] Initial support for K32W1 (#28777)
* [NXP] Introducing Matter support for K32W1 Additional information: * SDK: 2.12.5 K32W148-EVK, downloadable from https://mcuxpresso.nxp.com * MCU overview: https://www.nxp.com/products/wireless/multiprotocol-mcus/secure-and-ultra-low-power-mcu-for-matter-over-thread-and-bluetooth-le-5-3:K32W148 Signed-off-by: Doru Gucea <[email protected]> Signed-off-by: Marius Tache <[email protected]> * [NXP] Add CI/CV support for K32W1 Signed-off-by: Marius Tache <[email protected]> * [NXP] Bump ot-nxp submodule Signed-off-by: Marius Tache <[email protected]> * [K32W] Add OPENTHREAD_PLATFORM_CORE_CONFIG_FILE define Signed-off-by: Marius Tache <[email protected]> * [K32W1] Fix misspell Signed-off-by: Marius Tache <[email protected]> * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * Restyled by autopep8 * Restyled by isort * [K32W1] Fix lint errors Signed-off-by: Marius Tache <[email protected]> * [K32W1] Removed deprecated class Signed-off-by: Marius Tache <[email protected]> * Restyled by clang-format * [test] Update testdata/all_targets_linux_x64 with K32W1 targets Signed-off-by: Marius Tache <[email protected]> * [K32W] Fix target names in workflow Signed-off-by: Marius Tache <[email protected]> * [K32W1] Remove deprecated commented sections Signed-off-by: Marius Tache <[email protected]> * [K32W1] Add missing # to reference targets in README Signed-off-by: Marius Tache <[email protected]> * [K32W1] Fix spelling errors Signed-off-by: Marius Tache <[email protected]> * [K32W1] Update CSR crypto flag usage Signed-off-by: Marius Tache <[email protected]> * [K32W1] Remove ResetWatermarks empty implementation Signed-off-by: Marius Tache <[email protected]> * Fix typo in device.gni after fixing conflict Signed-off-by: marius-alex-tache <[email protected]> * [K32W1] Remove anchors and backtick some words Signed-off-by: marius-alex-tache <[email protected]> * [K32W] Fix confusing naming in K32W builder Signed-off-by: marius-alex-tache <[email protected]> * [K32W] Remove commented option Signed-off-by: marius-alex-tache <[email protected]> * [K32W] Fix binary extension format Signed-off-by: marius-alex-tache <[email protected]> * Restyled by autopep8 * [K32W] Fix binary name when copying Signed-off-by: marius-alex-tache <[email protected]> * Restyled by clang-format * [K32W1] Fix ErrorStr header inclusion Signed-off-by: marius-alex-tache <[email protected]> --------- Signed-off-by: Doru Gucea <[email protected]> Signed-off-by: Marius Tache <[email protected]> Signed-off-by: marius-alex-tache <[email protected]> Co-authored-by: Doru Gucea <[email protected]> Co-authored-by: Restyled.io <[email protected]>
- Loading branch information
1 parent
23ebaeb
commit 19771ed
Showing
118 changed files
with
12,615 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (c) 2020 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
declare_args() { | ||
# Root directory for K32W SDK build files. | ||
k32w1_sdk_build_root = "//third_party/nxp/k32w1_sdk" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright (c) 2020 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
declare_args() { | ||
# Root directory for k32w SDK. | ||
k32w1_sdk_build_root = | ||
"//third_party/connectedhomeip/third_party/nxp/k32w1_sdk" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) 2020-2023 Project CHIP Authors | ||
# Copyright (c) 2023 NXP | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import("//build_overrides/build.gni") | ||
|
||
# The location of the build configuration file. | ||
buildconfig = "${build_root}/config/BUILDCONFIG.gn" | ||
|
||
# CHIP uses angle bracket includes. | ||
check_system_includes = true | ||
|
||
default_args = { | ||
target_cpu = "arm" | ||
target_os = "freertos" | ||
|
||
import("//args.gni") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
# Copyright (c) 2021-2023 Project CHIP Authors | ||
# Copyright (c) 2023 NXP | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import("//build_overrides/chip.gni") | ||
import("//build_overrides/k32w1_sdk.gni") | ||
import("//build_overrides/openthread.gni") | ||
|
||
import("${k32w1_sdk_build_root}/k32w1_executable.gni") | ||
import("${k32w1_sdk_build_root}/k32w1_sdk.gni") | ||
|
||
import("${chip_root}/src/crypto/crypto.gni") | ||
import("${chip_root}/src/lib/core/core.gni") | ||
import("${chip_root}/src/platform/device.gni") | ||
|
||
declare_args() { | ||
chip_software_version = 0 | ||
} | ||
|
||
assert(current_os == "freertos") | ||
|
||
k32w1_platform_dir = "${chip_root}/examples/platform/nxp/k32w/k32w1" | ||
k32w1_sdk_root = getenv("NXP_K32W1_SDK_ROOT") | ||
|
||
k32w1_sdk("sdk") { | ||
sources = [ | ||
"${k32w1_platform_dir}/app/project_include/OpenThreadConfig.h", | ||
"include/CHIPProjectConfig.h", | ||
"include/FreeRTOSConfig.h", | ||
"main/include/app_config.h", | ||
] | ||
|
||
public_deps = | ||
[ "${chip_root}/third_party/openthread/platforms:libopenthread-platform" ] | ||
|
||
include_dirs = [ | ||
"main/include", | ||
"main", | ||
"include", | ||
"${k32w1_platform_dir}/app/project_include", | ||
"${k32w1_platform_dir}/app/support", | ||
"${k32w1_platform_dir}/util/include", | ||
] | ||
|
||
defines = [] | ||
if (is_debug) { | ||
defines += [ "BUILD_RELEASE=0" ] | ||
} else { | ||
defines += [ "BUILD_RELEASE=1" ] | ||
} | ||
|
||
if (chip_software_version != 0) { | ||
defines += [ | ||
"CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION=${chip_software_version}", | ||
] | ||
} | ||
} | ||
|
||
k32w1_executable("contact_sensor_app") { | ||
output_name = "chip-k32w1-contact-example" | ||
|
||
sources = [ | ||
"${k32w1_platform_dir}/util/LEDWidget.cpp", | ||
"${k32w1_platform_dir}/util/include/LEDWidget.h", | ||
"main/AppTask.cpp", | ||
"main/ContactSensorManager.cpp", | ||
"main/ZclCallbacks.cpp", | ||
"main/include/AppEvent.h", | ||
"main/include/AppTask.h", | ||
"main/include/ContactSensorManager.h", | ||
"main/main.cpp", | ||
] | ||
|
||
deps = [ | ||
":sdk", | ||
"${chip_root}/examples/common/QRCode", | ||
"${chip_root}/examples/contact-sensor-app/contact-sensor-common", | ||
"${chip_root}/examples/providers:device_info_provider", | ||
"${chip_root}/src/lib", | ||
"${chip_root}/src/platform:syscalls_stub", | ||
"${chip_root}/third_party/mbedtls:mbedtls", | ||
"${k32w1_platform_dir}/app/support:freertos_mbedtls_utils", | ||
] | ||
|
||
if (chip_openthread_ftd) { | ||
deps += [ | ||
"${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", | ||
"${chip_root}/third_party/openthread/repo:libopenthread-ftd", | ||
] | ||
} else { | ||
deps += [ | ||
"${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd", | ||
"${chip_root}/third_party/openthread/repo:libopenthread-mtd", | ||
] | ||
} | ||
|
||
cflags = [ "-Wconversion" ] | ||
|
||
output_dir = root_out_dir | ||
|
||
ldscript = "${k32w1_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc/connectivity.ld" | ||
|
||
inputs = [ ldscript ] | ||
|
||
ldflags = [ | ||
"-Wl,--defsym=__heap_size__=0", | ||
"-Wl,--defsym=__stack_size__=0x480", | ||
"-Wl,--defsym=gNvmSectors=8", | ||
"-Wl,--defsym=lp_ram_lower_limit=0x04000000", | ||
"-Wl,--defsym=lp_ram_upper_limit=0x2001C000", | ||
"-Wl,-print-memory-usage", | ||
"-Wl,--no-warn-rwx-segments", | ||
"-T" + rebase_path(ldscript, root_build_dir), | ||
] | ||
|
||
output_dir = root_out_dir | ||
} | ||
|
||
group("k32w1") { | ||
deps = [ ":contact_sensor_app" ] | ||
} | ||
|
||
group("default") { | ||
deps = [ ":k32w1" ] | ||
} |
Oops, something went wrong.