Skip to content

Commit 023171f

Browse files
[nrfconnect] Added port for lit-icd-app example.
Implemented nrfconnect port for the lit-icd-app example.
1 parent dbc6ed3 commit 023171f

27 files changed

+1816
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
cmake_minimum_required(VERSION 3.13.1)
17+
18+
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
19+
get_filename_component(NRFCONNECT_COMMON ${CHIP_ROOT}/examples/platform/nrfconnect REALPATH)
20+
get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH)
21+
22+
include(${CHIP_ROOT}/config/nrfconnect/app/check-nrfconnect-version.cmake)
23+
24+
# Set Kconfig root files that will be processed as a first Kconfig for used child images.
25+
set(mcuboot_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.mcuboot.root)
26+
set(multiprotocol_rpmsg_KCONFIG_ROOT ${CHIP_ROOT}/config/nrfconnect/chip-module/Kconfig.multiprotocol_rpmsg.root)
27+
28+
if(NOT CONF_FILE STREQUAL "prj_no_dfu.conf")
29+
set(PM_STATIC_YML_FILE ${CMAKE_CURRENT_SOURCE_DIR}/configuration/${BOARD}/pm_static_dfu.yml)
30+
endif()
31+
32+
list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nrfconnect/chip-module)
33+
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
34+
35+
# -Wmaybe-uninitialized has too many false positives, including on std::optional
36+
# and chip::Optional. Make it nonfatal.
37+
#
38+
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
39+
target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized)
40+
41+
project(chip-nrfconnect-lit-icd-app-example)
42+
43+
include(${CHIP_ROOT}/config/nrfconnect/app/enable-gnu-std.cmake)
44+
include(${CHIP_ROOT}/config/nrfconnect/app/flashing.cmake)
45+
include(${CHIP_ROOT}/src/app/chip_data_model.cmake)
46+
47+
target_include_directories(app PRIVATE
48+
main/include
49+
${GEN_DIR}/app-common
50+
${GEN_DIR}/lit-icd-app
51+
${NRFCONNECT_COMMON}/util/include
52+
${NRFCONNECT_COMMON}/app/include)
53+
54+
target_sources(app PRIVATE
55+
main/AppTask.cpp
56+
main/main.cpp
57+
${NRFCONNECT_COMMON}/util/LEDWidget.cpp)
58+
59+
chip_configure_data_model(app
60+
INCLUDE_SERVER
61+
ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lit-icd-common/lit-icd-server-app.zap
62+
)
63+
64+
if(CONFIG_CHIP_OTA_REQUESTOR)
65+
target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/OTAUtil.cpp)
66+
endif()
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
mainmenu "Matter nRF Connect LIT ICD Example Application"
17+
18+
config STATE_LEDS
19+
bool "Use LEDs to indicate the device state"
20+
default y
21+
help
22+
Use LEDs to render the current state of the device such as the progress of commissioning of
23+
the device into a network or the factory reset initiation. Note that setting this option to
24+
'n' does not disable the LED indicating the state of the simulated bolt.
25+
26+
# Sample configuration used for Thread networking
27+
if NET_L2_OPENTHREAD
28+
29+
choice OPENTHREAD_NORDIC_LIBRARY_CONFIGURATION
30+
default OPENTHREAD_NORDIC_LIBRARY_MTD
31+
endchoice
32+
33+
choice OPENTHREAD_DEVICE_TYPE
34+
default OPENTHREAD_MTD
35+
endchoice
36+
37+
endif # NET_L2_OPENTHREAD
38+
39+
rsource "../../../config/nrfconnect/chip-module/Kconfig.features"
40+
rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults"
41+
source "Kconfig.zephyr"

0 commit comments

Comments
 (0)