Skip to content

Commit

Permalink
Merge branch 'master' into feature/app-install-flow-public
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov authored Jul 2, 2024
2 parents a26bf1d + 005f1b4 commit 1e8b685
Show file tree
Hide file tree
Showing 120 changed files with 7,070 additions and 476 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/examples-cc13xx_26xx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ name: Build example - TI CC13XX_26XX
on:
push:
branches-ignore:
- 'dependabot/**'
- "dependabot/**"
pull_request:
merge_group:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
group:
${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name ==
'pull_request' && github.event.number) || (github.event_name ==
'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true
env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:
cc13xx_26xx:
name: cc13xx_26xx
Expand All @@ -47,13 +50,14 @@ jobs:
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: cc13xx_26xx
platform: cc13xx_26xx
extra-submodule-parameters: " --recursive"
- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
if: ${{ !env.ACT }}
with:
gh-context: ${{ toJson(github) }}
gh-context: ${{ toJson(github) }}

- name: Build examples
run: |
scripts/run_in_build_env.sh "\
Expand Down Expand Up @@ -103,4 +107,4 @@ jobs:
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
with:
platform-name: cc13x4_26x4
platform-name: cc13x4_26x4
9 changes: 8 additions & 1 deletion .github/workflows/examples-rw61x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ jobs:
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: rw61x
platform: nxp
extra-submodule-parameters: --recursive

- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
Expand All @@ -61,6 +62,8 @@ jobs:
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target rw61x-all-clusters-app-wifi \
--target rw61x-all-clusters-app-thread \
--target rw61x-all-clusters-app-thread-wifi \
build \
--copy-artifacts-to out/artifacts \
"
Expand All @@ -70,6 +73,8 @@ jobs:
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target rw61x-thermostat-wifi \
--target rw61x-thermostat-thread \
--target rw61x-thermostat-thread-wifi \
build \
--copy-artifacts-to out/artifacts \
"
Expand All @@ -79,6 +84,8 @@ jobs:
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target rw61x-laundry-washer-wifi \
--target rw61x-laundry-washer-thread \
--target rw61x-laundry-washer-thread-wifi \
build \
--copy-artifacts-to out/artifacts \
"
Expand Down
6 changes: 5 additions & 1 deletion config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ chip_gn_arg_append("chip_config_network_layer_ble" "false")
endif()

if(CONFIG_DISABLE_IPV4)
chip_gn_arg_append("chip_inet_config_enable_ipv4" "false")
if(NOT CONFIG_LWIP_IPV4)
chip_gn_arg_append("chip_inet_config_enable_ipv4" "false")
else()
message(FATAL_ERROR "Please also disable config option CONFIG_LWIP_IPV4")
endif()
endif()

if(CONFIG_DISABLE_READ_CLIENT)
Expand Down
4 changes: 2 additions & 2 deletions config/zephyr/app/enable-gnu-std.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ 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)
-D_DEFAULT_SOURCE)
target_link_libraries(app PRIVATE gnu17)
68 changes: 48 additions & 20 deletions config/zephyr/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,27 @@ endif()
get_filename_component(GN_ROOT_TARGET ${CHIP_ROOT}/config/zephyr/chip-gn REALPATH)
get_filename_component(COMMON_CMAKE_SOURCE_DIR ${CHIP_ROOT}/config/common/cmake REALPATH)

# Additional configuration
if (CONFIG_CHIP_PW_RPC)
set(CONFIG_CHIP_LIB_PW_RPC YES)
endif()

# Get common Cmake sources
include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn_args.cmake)
include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn.cmake)

# Prepare compiler flags
matter_add_flags(-isystem${ZEPHYR_BASE}/../modules/crypto/mbedtls/include/)

if (CONFIG_POSIX_API)
matter_add_flags(-D_SYS__PTHREADTYPES_H_)
matter_add_flags(-D_DEFAULT_SOURCE)
matter_add_flags(-isystem${ZEPHYR_BASE}/include/zephyr/posix)
endif()

if(CONFIG_MBEDTLS)
zephyr_include_directories($<TARGET_PROPERTY:mbedTLS,INTERFACE_INCLUDE_DIRECTORIES>)
zephyr_compile_definitions($<TARGET_PROPERTY:mbedTLS,INTERFACE_COMPILE_DEFINITIONS>)
endif()

zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C)
matter_add_cflags(${ZEPHYR_CFLAGS_C})
matter_add_cflags("${ZEPHYR_CFLAGS_C}")
zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX)
matter_add_cxxflags(${ZEPHYR_CFLAGS_CC})
matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}")
zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD)
matter_add_cxxflags(${ZEPHYR_GNU_CPP_STD})
matter_add_cxxflags("${ZEPHYR_GNU_CPP_STD}")

# Set up custom OpenThread configuration

Expand All @@ -81,29 +79,59 @@ matter_common_gn_args(
DEBUG CONFIG_DEBUG
LIB_SHELL CONFIG_CHIP_LIB_SHELL
LIB_TESTS CONFIG_CHIP_BUILD_TESTS
LIB_PW_RPC CONFIG_CHIP_PW_RPC
PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG}
)
matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR})
matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER})
matter_add_gn_arg_string("zephyr_cxx" ${CMAKE_CXX_COMPILER})
matter_add_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_OPENTHREAD)
matter_add_gn_arg_bool ("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD)
matter_add_gn_arg_bool ("chip_inet_config_enable_ipv4" CONFIG_NET_IPV4)
matter_add_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS)

matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR})
matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER})
matter_add_gn_arg_string("zephyr_cxx" ${CMAKE_CXX_COMPILER})
matter_add_gn_arg_bool ("chip_logging" CONFIG_LOG)
matter_add_gn_arg_bool ("chip_error_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 1)
matter_add_gn_arg_bool ("chip_progress_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 3)
matter_add_gn_arg_bool ("chip_detail_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 4)
matter_add_gn_arg_bool ("chip_automation_logging" FALSE)
matter_add_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_OPENTHREAD)
matter_add_gn_arg_bool ("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD)
matter_add_gn_arg_bool ("chip_inet_config_enable_ipv4" CONFIG_CHIP_IPV4)
matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_WIFI)
matter_add_gn_arg_bool ("chip_config_network_layer_ble" CONFIG_BT)
matter_add_gn_arg_bool ("chip_mdns_minimal" CONFIG_WIFI)
matter_add_gn_arg_bool ("chip_mdns_minimal" CONFIG_NET_L2_ETHERNET)
matter_add_gn_arg_bool ("chip_mdns_platform" CONFIG_NET_L2_OPENTHREAD)
matter_add_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS)
matter_add_gn_arg_bool ("chip_inet_config_enable_udp_endpoint" CONFIG_NET_UDP)
matter_add_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_NET_TCP)
matter_add_gn_arg_bool ("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP)


if (CONFIG_CHIP_ENABLE_DNSSD_SRP)
matter_add_gn_arg_string("chip_mdns" "platform")
endif()

if(CONFIG_WIFI)
matter_add_gn_arg_string("chip_mdns" "minimal")
elseif (CONFIG_NET_L2_ETHERNET)
matter_add_gn_arg_string("chip_mdns" "minimal")
elseif (CONFIG_NET_L2_OPENTHREAD)
matter_add_gn_arg_string("chip_mdns" "platform")
else()
matter_add_gn_arg_string("chip_mdns" "none")
endif()

if (CONFIG_CHIP_PW_RPC)
set(PIGWEED_DIR "//third_party/pigweed/repo")
matter_add_gn_arg_string("pw_assert_BACKEND" ${PIGWEED_DIR}/pw_assert_log:check_backend)
matter_add_gn_arg_string("pw_log_BACKEND" ${PIGWEED_DIR}/pw_log_basic)
matter_add_gn_arg("pw_build_LINK_DEPS" [\"${PIGWEED_DIR}/pw_assert:impl\",\ \"${PIGWEED_DIR}/pw_log:impl\"])
endif()

matter_generate_args_tmp_file()

# ==============================================================================
# Build chip library
# ==============================================================================
matter_build(chip
LIB_SHELL ${CONFIG_CHIP_LIB_SHELL}
LIB_PW_RPC ${CONFIG_CHIP_PW_RPC}
LIB_TESTS ${CONFIG_CHIP_BUILD_TESTS}
GN_DEPENDENCIES kernel
)
Expand Down
68 changes: 68 additions & 0 deletions config/zephyr/chip-module/Kconfig.bt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#
# Copyright (c) 2021 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.
#

# Bluetooth Low Energy configs
config BT
bool
default y

config BT_PERIPHERAL
bool
default y

config BT_PERIPHERAL_PREF_MIN_INT
int
default 36

config BT_PERIPHERAL_PREF_MAX_INT
int
default 36

config BT_GAP_AUTO_UPDATE_CONN_PARAMS
bool
default y

config BT_GATT_DYNAMIC_DB
bool
default y

config BT_DEVICE_NAME_DYNAMIC
bool
default y

config BT_DEVICE_NAME_MAX
int
default 15

config BT_MAX_CONN
int
default 1

config BT_L2CAP_TX_MTU
int
default 247

config BT_BUF_ACL_RX_SIZE
int
default 251

config BT_BUF_ACL_TX_SIZE
int
default 251

config BT_RX_STACK_SIZE
int
default 1200
71 changes: 0 additions & 71 deletions config/zephyr/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,6 @@

if CHIP

config LOG
bool
default y

if LOG

choice LOG_MODE
default LOG_MODE_MINIMAL
endchoice

choice MATTER_LOG_LEVEL_CHOICE
default MATTER_LOG_LEVEL_DBG
endchoice

config LOG_DEFAULT_LEVEL
int
default 2

endif

# disable synchronous printk to avoid blocking IRQs which
# may affect time sensitive components
config PRINTK_SYNC
Expand Down Expand Up @@ -119,58 +99,7 @@ config NET_BUF_TX_COUNT
int
default 80

# Bluetooth Low Energy configs
config BT
bool
default y

config BT_PERIPHERAL
bool
default y

config BT_PERIPHERAL_PREF_MIN_INT
int
default 36

config BT_PERIPHERAL_PREF_MAX_INT
int
default 36

config BT_GAP_AUTO_UPDATE_CONN_PARAMS
bool
default y

config BT_GATT_DYNAMIC_DB
bool
default y

config BT_DEVICE_NAME_DYNAMIC
bool
default y

config BT_DEVICE_NAME_MAX
int
default 15

config BT_MAX_CONN
int
default 1

config BT_L2CAP_TX_MTU
int
default 247

config BT_BUF_ACL_RX_SIZE
int
default 251

config BT_BUF_ACL_TX_SIZE
int
default 251

config BT_RX_STACK_SIZE
int
default 1200

config CHIP_OTA_REQUESTOR
bool
Expand Down
Loading

0 comments on commit 1e8b685

Please sign in to comment.