forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nxp fromtree][NXP] Initial enablement of NXP Matter over WiFi with Z…
…ephyr (project-chip#31648) * [zephyr] Update deprecated Kconfig CPLUSPLUS is deprecated and should be replaced with CPP LIB_CPLUSPLUS is deprecated and should be replaced with REQUIRES_FULL_LIBCPP Signed-off-by: Axel Le Bourhis <[email protected]> * [NXP] Initial enablement of NXP Matter over WiFi with Zephyr Features: * Matter over WiFi * BLE commissioning * Storage * Factory data * OTA * MbedTLS PSA API Signed-off-by: Axel Le Bourhis <[email protected]> * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * Fix misspell error Signed-off-by: Axel Le Bourhis <[email protected]> * Update copyrights to date contributed Signed-off-by: Axel Le Bourhis <[email protected]> --------- Signed-off-by: Axel Le Bourhis <[email protected]> Co-authored-by: Restyled.io <[email protected]> (cherry picked from commit 28676c8)
- Loading branch information
1 parent
0ff709f
commit 9df00a2
Showing
48 changed files
with
5,079 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# NXP Zephyr build and configuration files | ||
|
||
This directory contains build scripts and common configuration files used by | ||
CHIP NXP Zephyr applications. It is structured as follows: | ||
|
||
| File/Folder | Contents | | ||
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------- | | ||
| chip-gn | GN project used to build selected CHIP libraries with the _nxp_zephyr_ platform integration layer | | ||
| chip-module | CMake wrapper for the GN project defined in `chip-gn` directory, and other components that allow one to use CHIP as a Zephyr module | | ||
| app | Common and optional Kconfig configuration files that can be used in NXP Zephyr applications | |
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,25 @@ | ||
# | ||
# Copyright (c) 2024 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. | ||
# | ||
|
||
# Options to be used for MCUBOOT build are located on this file. | ||
|
||
# The default signature key used by MCUBOOT is located on their repository, | ||
# change this to the appropriate one. | ||
# NOTE: This option needs to contain a path to the same file used by | ||
# MCUBOOT_SIGNATURE_KEY_FILE. | ||
#CONFIG_BOOT_SIGNATURE_KEY_FILE="root-rsa-2048.pem" | ||
|
||
CONFIG_BOOT_MAX_IMG_SECTORS=2048 |
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,22 @@ | ||
# | ||
# Copyright (c) 2024 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. | ||
# | ||
|
||
add_library(gnu17 INTERFACE) | ||
target_compile_options(gnu17 | ||
INTERFACE | ||
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17> | ||
-D_SYS__PTHREADTYPES_H_) | ||
target_link_libraries(app PRIVATE gnu17) |
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,21 @@ | ||
# | ||
# Copyright (c) 2024 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. | ||
# | ||
|
||
# Automatically find overlays defined at platform level | ||
# Those are usually used to change FLASH and RAM layouts | ||
if (EXISTS ${CHIP_ROOT}/src/platform/nxp/zephyr/boards/${BOARD}/${BOARD}.overlay) | ||
list(APPEND EXTRA_DTC_OVERLAY_FILE ${CHIP_ROOT}/src/platform/nxp/zephyr/boards/${BOARD}/${BOARD}.overlay) | ||
endif() |
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) 2024 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. | ||
|
||
import("//build_overrides/build.gni") | ||
import("//build_overrides/chip.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 = "zephyr" | ||
|
||
import("${chip_root}/config/nxp/chip-gn/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,40 @@ | ||
# Copyright (c) 2024 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. | ||
|
||
import("//build_overrides/build.gni") | ||
import("//build_overrides/chip.gni") | ||
|
||
import("${chip_root}/build/chip/tests.gni") | ||
|
||
assert(current_os == "zephyr") | ||
|
||
declare_args() { | ||
chip_build_example_providers = false | ||
} | ||
|
||
group("nxp_zephyr") { | ||
deps = [ "${chip_root}/src/lib" ] | ||
|
||
if (chip_build_tests) { | ||
deps += [ "${chip_root}/src:tests" ] | ||
} | ||
|
||
if (chip_build_example_providers) { | ||
deps += [ "${chip_root}/examples/providers:device_info_provider" ] | ||
} | ||
} | ||
|
||
group("default") { | ||
deps = [ ":nxp_zephyr" ] | ||
} |
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,32 @@ | ||
# Copyright (c) 2024 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. | ||
|
||
import("//build_overrides/chip.gni") | ||
|
||
import("${chip_root}/src/crypto/crypto.gni") | ||
|
||
chip_device_platform = "nxp_zephyr" | ||
|
||
chip_build_tests = false | ||
|
||
chip_project_config_include = "" | ||
chip_system_project_config_include = "" | ||
chip_ble_project_config_include = "" | ||
|
||
chip_crypto = "mbedtls" | ||
chip_external_mbedtls = true | ||
|
||
custom_toolchain = "${chip_root}/config/nxp/chip-gn/toolchain:zephyr" | ||
|
||
pw_build_PIP_CONSTRAINTS = [ "${chip_root}/scripts/setup/constraints.txt" ] |
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,34 @@ | ||
# Copyright (c) 2024 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. | ||
|
||
import("//build_overrides/build.gni") | ||
|
||
import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni") | ||
|
||
declare_args() { | ||
zephyr_ar = "" | ||
zephyr_cc = "" | ||
zephyr_cxx = "" | ||
} | ||
|
||
gcc_toolchain("zephyr") { | ||
ar = zephyr_ar | ||
cc = zephyr_cc | ||
cxx = zephyr_cxx | ||
|
||
toolchain_args = { | ||
current_os = "zephyr" | ||
is_clang = false | ||
} | ||
} |
Oops, something went wrong.