Skip to content

Commit fc81146

Browse files
authored
Merge branch 'master' into tizen-arm64-dockerfile
2 parents f8d28ac + ee95bd2 commit fc81146

File tree

247 files changed

+14216
-6060
lines changed

Some content is hidden

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

247 files changed

+14216
-6060
lines changed

.github/workflows/docker_img.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105
- "-nxp-zephyr"
106106
- "-nrf-platform"
107107
- "-telink"
108+
- "-telink-zephyr_3_3"
108109
- "-ti"
109110
- "-tizen"
110111
- "-openiotsdk"

.github/workflows/examples-linux-standalone.yaml

+11-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,17 @@ jobs:
238238
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
239239
linux debug camera-app \
240240
out/linux-x64-camera/chip-camera-app \
241-
/tmp/bloat_reports/
241+
/tmp/bloat_reports/
242+
- name: Build example Camera Controller App
243+
run: |
244+
./scripts/run_in_build_env.sh \
245+
"./scripts/build/build_examples.py \
246+
--target linux-x64-camera-controller \
247+
build"
248+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
249+
linux debug camera-controller \
250+
out/linux-x64-camera-controller/camera-controller \
251+
/tmp/bloat_reports/
242252
- name: Uploading Size Reports
243253
uses: ./.github/actions/upload-size-reports
244254
if: ${{ !env.ACT }}

.github/workflows/zap_regeneration.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
zap_regeneration:
2929
name: ZAP Regeneration
3030

31-
runs-on: ubuntu-20.04
31+
runs-on: ubuntu-latest
3232
container:
3333
image: ghcr.io/project-chip/chip-build:119
3434
defaults:

.github/workflows/zap_templates.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
zap_templates:
3434
name: ZAP templates generation
3535

36-
runs-on: ubuntu-20.04
36+
runs-on: ubuntu-latest
3737
container:
3838
image: ghcr.io/project-chip/chip-build:119
3939
defaults:

CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,6 @@ stm32/ @STYoannZamaron
6767

6868
telink/ @s07641069
6969
chip-build-telink/ @s07641069
70+
chip-build-telink-zephyr_3_3/ @s07641069
7071

7172
webos/ @joonhaengHeo

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ be useful for quick filtering like `[TC-ABC-1.2]` to tag test changes.
175175
Examples of descriptive titles:
176176

177177
- `[Silabs] Fix compile of SiWx917 if LED and BUTTON are disabled`
178-
- `[Telink] Update build Dockerfile with new Zeprhy SHA: c05c4.....`
178+
- `[Telink] Update build Dockerfile with new Zephyr SHA: c05c4.....`
179179
- `General Commissioning Cluster: use AttributeAccessInterface/CommandHandlerInterface for processing`
180180
- `Scenes Management/CopyScene: set access as manage instead of default to match the spec`
181181
- `Fix build errors due to ChipDeviceEvent default constructor not being available`

SECURITY.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Security Policy
2+
3+
Thank you for helping us keep the Matter SDK secure!
4+
5+
## Reporting a Vulnerability
6+
7+
To report a security vulnerability, please follow the instructions at
8+
[Report a Vulnerability | How to Report - CSA-IOT](https://csa-iot.org/vulnerability-reporting/).
9+
10+
We appreciate responsible disclosure and will work to address any issues
11+
promptly.

build/config/compiler/BUILD.gn

+7
Original file line numberDiff line numberDiff line change
@@ -671,3 +671,10 @@ config("specs_default") {
671671
ldflags = cflags
672672
}
673673
}
674+
675+
config("link_as_needed") {
676+
# ld64.lld on clang used by Apple does not have a --as-needed option
677+
if (current_os != "mac" && current_os != "ios") {
678+
ldflags = [ "-Wl,--as-needed" ]
679+
}
680+
}

build/config/defaults.gni

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ declare_args() {
6161
# Defaults configs for pie.
6262
default_configs_pie = [ "${build_root}/config/compiler:pie_default" ]
6363

64+
# Default configs for GNU ld --as-needed
65+
default_configs_link_as_needed =
66+
[ "${build_root}/config/compiler:link_as_needed" ]
67+
6468
# Defaults configs for warnings.
6569
default_configs_warnings =
6670
[ "${build_root}/config/compiler:warnings_default" ]
@@ -124,3 +128,4 @@ default_configs += default_configs_extra
124128

125129
executable_default_configs = []
126130
executable_default_configs += default_configs_pie
131+
executable_default_configs += default_configs_link_as_needed

config/common/cmake/chip_gn.cmake

+5-1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ if (NOT CHIP_ROOT)
3636
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../.. REALPATH)
3737
endif()
3838

39+
if (NOT CHIP_APP_ZAP_DIR)
40+
get_filename_component(CHIP_APP_ZAP_DIR ${CHIP_ROOT}/zzz_generated/app-common REALPATH)
41+
endif()
42+
3943
# ==============================================================================
4044
# Find required programs
4145
# ==============================================================================
@@ -165,7 +169,7 @@ macro(matter_build target)
165169
${CHIP_ROOT}/third_party/nlassert/repo/include
166170
${CHIP_ROOT}/third_party/nlio/repo/include
167171
${CHIP_ROOT}/third_party/nlfaultinjection/include
168-
${CHIP_ROOT}/zzz_generated/app-common
172+
${CHIP_APP_ZAP_DIR}
169173
${CMAKE_CURRENT_BINARY_DIR}/gen/include
170174
)
171175

config/esp32/args.gni

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ lwip_platform = "external"
2929
chip_inet_config_enable_tcp_endpoint = false
3030
chip_inet_config_enable_udp_endpoint = true
3131

32+
chip_config_memory_management = "platform"
33+
3234
custom_toolchain = "//third_party/connectedhomeip/config/esp32/toolchain:esp32"
3335

3436
# Avoid constraint forcing for ESP32:

config/esp32/components/chip/CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ if(CONFIG_ENABLE_ICD_SERVER)
149149
endif()
150150
endif()
151151

152+
if(CONFIG_CHIP_MEM_ALLOC_MODE_INTERNAL)
153+
chip_gn_arg_append("chip_memory_alloc_mode" "\"internal\"")
154+
elseif(CONFIG_CHIP_MEM_ALLOC_MODE_EXTERNAL)
155+
chip_gn_arg_append("chip_memory_alloc_mode" "\"external\"")
156+
elseif(CONFIG_CHIP_MEM_ALLOC_MODE_DEFAULT)
157+
chip_gn_arg_append("chip_memory_alloc_mode" "\"default\"")
158+
endif()
159+
152160
if(CONFIG_ENABLE_PW_RPC)
153161
string(APPEND chip_gn_args "import(\"//build_overrides/pigweed.gni\")\n")
154162
chip_gn_arg_append("remove_default_configs" "[\"//third_party/connectedhomeip/third_party/pigweed/repo/pw_build:toolchain_cpp_standard\"]")

config/esp32/components/chip/Kconfig

+21
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,27 @@ menu "CHIP Core"
191191
Enable dynamic server to handle a different interaction model dispatch.
192192
Can be implied when users do not want to use the same server clusters.
193193

194+
choice CHIP_MEM_ALLOC_MODE
195+
prompt "Memory allocation strategy"
196+
default CHIP_MEM_ALLOC_MODE_DEFAULT
197+
help
198+
Strategy for Matter memory management
199+
- Internal DRAM memory only
200+
- External SPIRAM memory only
201+
- Either internal or external memory based on default malloc() behavior in ESP-IDF
202+
203+
config CHIP_MEM_ALLOC_MODE_INTERNAL
204+
bool "Internal memory"
205+
206+
config CHIP_MEM_ALLOC_MODE_EXTERNAL
207+
bool "External SPIRAM"
208+
depends on SPIRAM_USE_CAPS_ALLOC || SPIRAM_USE_MALLOC
209+
210+
config CHIP_MEM_ALLOC_MODE_DEFAULT
211+
bool "Default alloc mode"
212+
213+
endchoice # CHIP_MEM_ALLOC_MODE
214+
194215
endmenu # "General Options"
195216

196217
menu "Networking Options"

config/nrfconnect/chip-module/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ include(generate_factory_data.cmake)
4141
if (NOT CHIP_ROOT)
4242
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH)
4343
endif()
44+
45+
if (NOT CHIP_APP_ZAP_DIR)
46+
get_filename_component(CHIP_APP_ZAP_DIR ${CHIP_ROOT}/zzz_generated/app-common REALPATH)
47+
endif()
48+
4449
get_filename_component(GN_ROOT_TARGET ${CHIP_ROOT}/config/nrfconnect/chip-gn REALPATH)
4550
get_filename_component(COMMON_CMAKE_SOURCE_DIR ${CHIP_ROOT}/config/common/cmake REALPATH)
4651

@@ -132,6 +137,7 @@ matter_common_gn_args(
132137
matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR})
133138
matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER})
134139
matter_add_gn_arg_string("zephyr_cxx" ${CMAKE_CXX_COMPILER})
140+
matter_add_gn_arg_string("chip_app_zap_dir" ${CHIP_APP_ZAP_DIR})
135141
matter_add_gn_arg_bool ("chip_logging" CONFIG_LOG)
136142
matter_add_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_OPENTHREAD)
137143
matter_add_gn_arg_bool ("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD)

config/telink/chip-module/Kconfig.defaults

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ config HEAP_MEM_POOL_SIZE
9090
config COMMON_LIBC_MALLOC_ARENA_SIZE
9191
default 20716 if SOC_SERIES_RISCV_TELINK_B9X_RETENTION || (SOC_RISCV_TELINK_TL321X && ZEPHYR_VERSION_3_3)
9292
default 16384 if SOC_RISCV_TELINK_TL721X || (SOC_RISCV_TELINK_TL321X && !ZEPHYR_VERSION_3_3)
93+
default 13568 if SOC_RISCV_TELINK_W91
9394
default 12288
9495

9596
config NET_IPV6_MLD

docs/examples/camera_controller.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Camera
2+
3+
```{toctree}
4+
:glob:
5+
:maxdepth: 1
6+
7+
camera-controller/README
8+
```

docs/ids_and_codes/ERROR_CODES.md

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ This file was **AUTOMATICALLY** generated by
5555
| 37 | 0x25 | `CHIP_ERROR_UNKNOWN_IMPLICIT_TLV_TAG` |
5656
| 38 | 0x26 | `CHIP_ERROR_WRONG_TLV_TYPE` |
5757
| 39 | 0x27 | `CHIP_ERROR_TLV_CONTAINER_OPEN` |
58+
| 40 | 0x28 | `CHIP_ERROR_IN_USE` |
5859
| 42 | 0x2A | `CHIP_ERROR_INVALID_MESSAGE_TYPE` |
5960
| 43 | 0x2B | `CHIP_ERROR_UNEXPECTED_TLV_ELEMENT` |
6061
| 45 | 0x2D | `CHIP_ERROR_NOT_IMPLEMENTED` |

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+3-3
Original file line numberDiff line numberDiff line change
@@ -3648,7 +3648,7 @@ cluster SmokeCoAlarm = 92 {
36483648

36493649
/** Attributes and commands for configuring the Dishwasher alarm. */
36503650
cluster DishwasherAlarm = 93 {
3651-
revision 1; // NOTE: Default/not specifically set
3651+
revision 1;
36523652

36533653
bitmap AlarmBitmap : bitmap32 {
36543654
kInflowError = 0x1;
@@ -3689,9 +3689,9 @@ cluster DishwasherAlarm = 93 {
36893689
AlarmBitmap mask = 0;
36903690
}
36913691

3692-
/** Reset alarm */
3692+
/** This command resets active and latched alarms (if possible). */
36933693
command Reset(ResetRequest): DefaultSuccess = 0;
3694-
/** Modify enabled alarms */
3694+
/** This command allows a client to request that an alarm be enabled or suppressed at the server. */
36953695
command ModifyEnabledAlarms(ModifyEnabledAlarmsRequest): DefaultSuccess = 1;
36963696
}
36973697

examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp

+19
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ using namespace chip::app::Clusters::Actions;
2424
using namespace chip::app::Clusters::Actions::Attributes;
2525
using namespace chip::Protocols::InteractionModel;
2626

27+
namespace {
28+
std::unique_ptr<Clusters::Actions::ActionsDelegateImpl> sActionsDelegateImpl;
29+
std::unique_ptr<Clusters::Actions::ActionsServer> sActionsServer;
30+
} // namespace
31+
2732
CHIP_ERROR ActionsDelegateImpl::ReadActionAtIndex(uint16_t index, ActionStructStorage & action)
2833
{
2934
if (index >= kActionList.size())
@@ -129,3 +134,17 @@ Status ActionsDelegateImpl::HandleDisableActionWithDuration(uint16_t actionId, u
129134
// Not implemented
130135
return Status::NotFound;
131136
}
137+
138+
void emberAfActionsClusterInitCallback(EndpointId endpoint)
139+
{
140+
VerifyOrReturn(endpoint == 1,
141+
ChipLogError(Zcl, "Actions cluster delegate is not implemented for endpoint with id %d.", endpoint));
142+
VerifyOrReturn(emberAfContainsServer(endpoint, Actions::Id) == true,
143+
ChipLogError(Zcl, "Endpoint %d does not support Actions cluster.", endpoint));
144+
VerifyOrReturn(!sActionsDelegateImpl && !sActionsServer);
145+
146+
sActionsDelegateImpl = std::make_unique<Actions::ActionsDelegateImpl>();
147+
sActionsServer = std::make_unique<Actions::ActionsServer>(endpoint, *sActionsDelegateImpl.get());
148+
149+
sActionsServer->Init();
150+
}

examples/all-clusters-app/linux/main-common.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
#include <app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.h>
5555
#include <app/server/Server.h>
5656
#include <app/util/attribute-storage.h>
57-
#include <bridged-actions-stub.h>
5857
#include <lib/support/CHIPMem.h>
5958
#include <platform/DeviceInstanceInfoProvider.h>
6059
#include <platform/DiagnosticDataProvider.h>
@@ -87,7 +86,6 @@ Clusters::TemperatureControl::AppSupportedTemperatureLevelsDelegate sAppSupporte
8786
Clusters::ModeSelect::StaticSupportedModesManager sStaticSupportedModesManager;
8887
Clusters::ValveConfigurationAndControl::ValveControlDelegate sValveDelegate;
8988
Clusters::TimeSynchronization::ExtendedTimeSyncDelegate sTimeSyncDelegate;
90-
Clusters::Actions::ActionsDelegateImpl sActionsDelegateImpl;
9189

9290
// Please refer to https://github.com/CHIP-Specifications/connectedhomeip-spec/blob/master/src/namespaces
9391
constexpr const uint8_t kNamespaceCommon = 7;
@@ -342,12 +340,6 @@ void emberAfThermostatClusterInitCallback(EndpointId endpoint)
342340
SetDefaultDelegate(endpoint, &delegate);
343341
}
344342

345-
void emberAfActionsClusterInitCallback(EndpointId endpoint)
346-
{
347-
VerifyOrReturn(endpoint == 1);
348-
Clusters::Actions::ActionsServer::Instance().SetDefaultDelegate(endpoint, &sActionsDelegateImpl);
349-
}
350-
351343
Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
352344
const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
353345
uint16_t maxReadLength)

examples/camera-controller/.gn

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright (c) 2025 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+
# The location of the build configuration file.
18+
buildconfig = "${build_root}/config/BUILDCONFIG.gn"
19+
20+
# CHIP uses angle bracket includes.
21+
check_system_includes = true
22+
23+
default_args = {
24+
import("//args.gni")
25+
}

0 commit comments

Comments
 (0)