Skip to content

Commit 856f906

Browse files
committed
Merge branch 'master' into remove_depricated_RVC_items
2 parents 2f26b66 + f8083ee commit 856f906

File tree

91 files changed

+5043
-15496
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+5043
-15496
lines changed

config/nxp/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# NXP Zephyr build and configuration files
2+
3+
This directory contains build scripts and common configuration files used by
4+
CHIP NXP Zephyr applications. It is structured as follows:
5+
6+
| File/Folder | Contents |
7+
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------- |
8+
| chip-gn | GN project used to build selected CHIP libraries with the _nxp_zephyr_ platform integration layer |
9+
| 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 |
10+
| app | Common and optional Kconfig configuration files that can be used in NXP Zephyr applications |

config/nxp/app/bootloader.conf

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# Options to be used for MCUBOOT build are located on this file.
18+
19+
# The default signature key used by MCUBOOT is located on their repository,
20+
# change this to the appropriate one.
21+
# NOTE: This option needs to contain a path to the same file used by
22+
# MCUBOOT_SIGNATURE_KEY_FILE.
23+
#CONFIG_BOOT_SIGNATURE_KEY_FILE="root-rsa-2048.pem"
24+
25+
CONFIG_BOOT_MAX_IMG_SECTORS=2048

config/nxp/app/enable-gnu-std.cmake

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
add_library(gnu17 INTERFACE)
18+
target_compile_options(gnu17
19+
INTERFACE
20+
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>
21+
-D_SYS__PTHREADTYPES_H_)
22+
target_link_libraries(app PRIVATE gnu17)

config/nxp/app/pre-zephyr.cmake

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
# Automatically find overlays defined at platform level
18+
# Those are usually used to change FLASH and RAM layouts
19+
if (EXISTS ${CHIP_ROOT}/src/platform/nxp/zephyr/boards/${BOARD}/${BOARD}.overlay)
20+
list(APPEND EXTRA_DTC_OVERLAY_FILE ${CHIP_ROOT}/src/platform/nxp/zephyr/boards/${BOARD}/${BOARD}.overlay)
21+
endif()

config/nxp/chip-gn/.gn

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright (c) 2024 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/build.gni")
16+
import("//build_overrides/chip.gni")
17+
18+
# The location of the build configuration file.
19+
buildconfig = "${build_root}/config/BUILDCONFIG.gn"
20+
21+
# CHIP uses angle bracket includes.
22+
check_system_includes = true
23+
24+
default_args = {
25+
target_cpu = "arm"
26+
target_os = "zephyr"
27+
28+
import("${chip_root}/config/nxp/chip-gn/args.gni")
29+
}

config/nxp/chip-gn/BUILD.gn

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright (c) 2024 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/build.gni")
16+
import("//build_overrides/chip.gni")
17+
18+
import("${chip_root}/build/chip/tests.gni")
19+
20+
assert(current_os == "zephyr")
21+
22+
declare_args() {
23+
chip_build_example_providers = false
24+
}
25+
26+
group("nxp_zephyr") {
27+
deps = [ "${chip_root}/src/lib" ]
28+
29+
if (chip_build_tests) {
30+
deps += [ "${chip_root}/src:tests" ]
31+
}
32+
33+
if (chip_build_example_providers) {
34+
deps += [ "${chip_root}/examples/providers:device_info_provider" ]
35+
}
36+
}
37+
38+
group("default") {
39+
deps = [ ":nxp_zephyr" ]
40+
}

config/nxp/chip-gn/args.gni

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright (c) 2024 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/chip.gni")
16+
17+
import("${chip_root}/src/crypto/crypto.gni")
18+
19+
chip_device_platform = "nxp_zephyr"
20+
21+
chip_build_tests = false
22+
23+
chip_project_config_include = ""
24+
chip_system_project_config_include = ""
25+
chip_ble_project_config_include = ""
26+
27+
chip_crypto = "mbedtls"
28+
chip_external_mbedtls = true
29+
30+
custom_toolchain = "${chip_root}/config/nxp/chip-gn/toolchain:zephyr"
31+
32+
pw_build_PIP_CONSTRAINTS = [ "${chip_root}/scripts/setup/constraints.txt" ]

config/nxp/chip-gn/toolchain/BUILD.gn

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright (c) 2024 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/build.gni")
16+
17+
import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni")
18+
19+
declare_args() {
20+
zephyr_ar = ""
21+
zephyr_cc = ""
22+
zephyr_cxx = ""
23+
}
24+
25+
gcc_toolchain("zephyr") {
26+
ar = zephyr_ar
27+
cc = zephyr_cc
28+
cxx = zephyr_cxx
29+
30+
toolchain_args = {
31+
current_os = "zephyr"
32+
is_clang = false
33+
}
34+
}

0 commit comments

Comments
 (0)