Skip to content

Commit 8755436

Browse files
authored
Merge branch 'master' into master
2 parents 434491f + 514b9eb commit 8755436

File tree

312 files changed

+8547
-1819
lines changed

Some content is hidden

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

312 files changed

+8547
-1819
lines changed

.github/workflows/qemu.yaml

+2-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ concurrency:
2727

2828
env:
2929
CHIP_NO_LOG_TIMESTAMPS: true
30-
30+
3131
jobs:
3232

3333
qemu-esp32:
@@ -75,12 +75,7 @@ jobs:
7575
name: Tizen
7676

7777
runs-on: ubuntu-latest
78-
# NOTE: job temporarely disabled as it seems flaky. The flake does not result in usable
79-
# logs so the current theory is that we run out of space. This is unusual as
80-
# larger docker images succeed at bootstrap, however it needs more investigation
81-
# to detect an exact/real root cause.
82-
if: false
83-
# if: github.actor != 'restyled-io[bot]'
78+
if: github.actor != 'restyled-io[bot]'
8479

8580
container:
8681
image: ghcr.io/project-chip/chip-build-tizen-qemu:54

.github/workflows/tests.yaml

+2-106
Large diffs are not rendered by default.

.mergify.yml

+21-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
pull_request_rules:
2+
- name: Label conflicting pull requests
3+
description: Add a label to a pull request with conflict to spot it easily
4+
conditions:
5+
- conflict
6+
- '-closed'
7+
actions:
8+
label:
9+
toggle:
10+
- conflict
211
- name: Automatic merge on PullApprove
312
conditions:
413
- or:
5-
- "check-success=pullapprove"
6-
- label="fast track"
7-
- "#approved-reviews-by>=1"
8-
- "#review-threads-unresolved=0"
9-
- "-draft"
10-
- "label!=docker" # Don't auto merge docker images
11-
- "#check-failure=0" # Don't auto merge with a failure
12-
- "#check-pending=0" # Don't auto merge with anything pending
13-
- "check-success~=Build" # Don't auto merge unless a build has succeeded, needed because above is true on a fresh PR before builds
14+
- check-success=pullapprove
15+
- label="fast track"
16+
- '#approved-reviews-by>=1'
17+
- '#review-threads-unresolved=0'
18+
- '-draft'
19+
- label!=docker
20+
- '#check-failure=0'
21+
- '#check-pending=0'
22+
- check-success~=Build
1423
- or:
15-
- "check-success=pullapprove"
16-
- "check-skipped=pullapprove"
17-
- "check-neutral=pullapprove"
24+
- check-success=pullapprove
25+
- check-skipped=pullapprove
26+
- check-neutral=pullapprove
1827
actions:
1928
merge:
2029
method: squash

build/config/compiler/BUILD.gn

+5-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,11 @@ config("warnings_third_party") {
334334
}
335335

336336
config("symbols_default") {
337-
cflags = [ "-g${symbol_level}" ]
337+
if (strip_symbols) {
338+
cflags = [ "-s" ]
339+
} else {
340+
cflags = [ "-g${symbol_level}" ]
341+
}
338342
}
339343

340344
config("std_default") {

build/config/compiler/compiler.gni

+6-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ declare_args() {
3030
symbol_level = 2
3131

3232
# Enable position independent code (-fPIC).
33-
enable_pic =
34-
current_os == "linux" || current_os == "mac" || current_os == "android"
33+
enable_pic = current_os == "linux" || current_os == "mac" ||
34+
current_os == "android" || current_os == "tizen"
3535

3636
# Enable position independent executables (-pie).
37-
enable_pie = current_os == "linux"
37+
enable_pie = current_os == "linux" || current_os == "tizen"
3838

3939
# Remove unwind tables from the binary to save space.
4040
exclude_unwind_tables = current_os != "android"
@@ -48,6 +48,9 @@ declare_args() {
4848
# enable libfuzzer
4949
is_libfuzzer = false
5050

51+
# Remove all symbol table and relocation information from the binary.
52+
strip_symbols = false
53+
5154
# Generate code coverage analysis artifacts when enabled.
5255
use_coverage = false
5356

config/beken/BUILD.gn

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ import("//build_overrides/chip.gni")
2121
#import("${chip_root}/build/chip/tests.gni")
2222

2323
group("beken") {
24-
deps = [
25-
"${chip_root}/examples/lighting-app/beken:MatterApp",
26-
"${chip_root}/src/lib",
27-
]
24+
deps = [ "${chip_root}/src/lib" ]
2825
}
2926
group("default") {
3027
deps = [ ":beken" ]

config/telink/chip-module/CMakeLists.txt

+48-27
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ if (CONFIG_CHIP_ROTATING_DEVICE_ID)
125125
matter_add_gn_arg_bool("chip_enable_additional_data_advertising" TRUE)
126126
endif()
127127

128-
if(CONFIG_WIFI_W91)
128+
if (CONFIG_WIFI_W91)
129129
matter_add_gn_arg_string("chip_mdns" "minimal")
130130
elseif (CONFIG_NET_L2_OPENTHREAD)
131131
matter_add_gn_arg_string("chip_mdns" "platform")
@@ -160,12 +160,11 @@ include(${TELINK_COMMON}/common.cmake)
160160

161161
set(BLOCK_SIZE "1024")
162162

163-
# get code-partition mcuboot_partition size
164-
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
165-
dt_reg_size(mcuboot_size PATH ${dts_partition_path})
166-
math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)
167-
168163
if (CONFIG_BOOTLOADER_MCUBOOT)
164+
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
165+
dt_reg_size(mcuboot_size PATH ${dts_partition_path})
166+
math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)
167+
169168
add_custom_target(build_mcuboot ALL
170169
COMMAND
171170
west build -b ${BASE_BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr
@@ -183,31 +182,30 @@ if (CONFIG_BOOTLOADER_MCUBOOT)
183182

184183
add_dependencies(merge_mcuboot ${ZEPHYR_FINAL_EXECUTABLE})
185184

186-
if (CONFIG_CHIP_OTA_IMAGE_BUILD)
187-
chip_ota_image(chip-ota-image
188-
INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin
189-
OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin
190-
)
185+
if (CONFIG_CHIP_OTA_IMAGE_BUILD)
186+
chip_ota_image(chip-ota-image
187+
INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin
188+
OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin
189+
)
191190

192-
add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE})
193-
endif()
191+
add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE})
192+
endif()
194193
endif()
195194

196-
# get code-partition factory_partition address
197-
dt_nodelabel(dts_partition_path NODELABEL "factory_partition")
198-
dt_reg_addr(factory_size PATH ${dts_partition_path})
199-
math(EXPR factory_blocks "${factory_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)
200-
201195
if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE)
202-
add_custom_target(merge_factory_data ALL
203-
COMMAND
204-
dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${factory_blocks}
205-
)
206-
if (CONFIG_CHIP_OTA_IMAGE_BUILD)
207-
add_dependencies(merge_factory_data merge_mcuboot)
208-
else()
209-
add_dependencies(merge_factory_data ${ZEPHYR_FINAL_EXECUTABLE})
210-
endif()
196+
dt_nodelabel(dts_partition_path NODELABEL "factory_partition")
197+
dt_reg_addr(factory_size PATH ${dts_partition_path})
198+
math(EXPR factory_blocks "${factory_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)
199+
200+
add_custom_target(merge_factory_data ALL
201+
COMMAND
202+
dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${factory_blocks}
203+
)
204+
if (CONFIG_CHIP_OTA_IMAGE_BUILD)
205+
add_dependencies(merge_factory_data merge_mcuboot)
206+
else()
207+
add_dependencies(merge_factory_data ${ZEPHYR_FINAL_EXECUTABLE})
208+
endif()
211209
endif()
212210

213211
# ==============================================================================
@@ -218,4 +216,27 @@ if (CONFIG_CHIP_FACTORY_DATA_BUILD)
218216
telink_generate_factory_data()
219217
endif()
220218

219+
if (CONFIG_SOC_SERIES_RISCV_TELINK_W91 AND CONFIG_TELINK_W91_FETCH_N22_BIN)
220+
dt_nodelabel(flash_path NODELABEL "flash")
221+
dt_reg_size(flash_size PATH ${flash_path})
222+
math(EXPR flash_blocks "${flash_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)
223+
224+
add_custom_target(merge_n22 ALL
225+
COMMAND
226+
[ -f ${PROJECT_BINARY_DIR}/n22.bin ] && (
227+
dd if=/dev/zero bs=${BLOCK_SIZE} count=${flash_blocks} | tr '\\000' '\\377' > ${PROJECT_BINARY_DIR}/merged.bin &&
228+
dd if=${PROJECT_BINARY_DIR}/zephyr.bin of=${PROJECT_BINARY_DIR}/merged.bin conv=notrunc &&
229+
dd if=${PROJECT_BINARY_DIR}/n22.bin of=${PROJECT_BINARY_DIR}/merged.bin bs=${BLOCK_SIZE} seek=${flash_blocks} conv=notrunc
230+
) || true
231+
)
232+
233+
if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE)
234+
add_dependencies(merge_n22 merge_factory_data)
235+
elseif (CONFIG_CHIP_OTA_IMAGE_BUILD)
236+
add_dependencies(merge_n22 merge_mcuboot)
237+
else()
238+
add_dependencies(merge_n22 ${ZEPHYR_FINAL_EXECUTABLE})
239+
endif()
240+
endif()
241+
221242
endif() # CONFIG_CHIP

docs/cluster_and_device_type_dev/cluster_and_device_type_dev.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ ending in the cluster initialization code.
107107
EmberAfInitializeAttributes - ember attribute storage - for all attributes
108108
marked as “RAM” in the zap, sets defaults in the storage
109109
Matter<Cluster>PluginServerCallback - .h is a generated file, .cpp impl is done
110-
in the server cluster code. Use this to setup the cluster and do attribute
111-
overrides registerAttributeAccessOverride - use this if you want to handle
112-
attribute reads and writes externally
110+
in the server cluster code. Use this to setup the cluster and setup overrides in
111+
chip::app::AttributeAccessInterfaceRegistry::Instance().Register - use this if
112+
you want to handle attribute reads and writes externally
113113

114114
Blue sections can be overridden.
115115

docs/upgrading.md

+20-4
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,26 @@ independent of the InteractionModelEngine class.
6969
The following replacements exist:
7070

7171
- `chip::app::InteractionModelEngine::RegisterCommandHandler` replaced by
72-
`chip::app::CommandHandlerInterfaceRegistry::RegisterCommandHandler`
72+
`chip::app::CommandHandlerInterfaceRegistry::Instance().RegisterCommandHandler`
7373
- `chip::app::InteractionModelEngine::UnregisterCommandHandler` replaced by
74-
`chip::app::CommandHandlerInterfaceRegistry::UnregisterCommandHandler`
74+
`chip::app::CommandHandlerInterfaceRegistry::Instance().UnregisterCommandHandler`
7575
- `chip::app::InteractionModelEngine::FindCommandHandler` replaced by
76-
`chip::app::CommandHandlerInterfaceRegistry::GetCommandHandler`
76+
`chip::app::CommandHandlerInterfaceRegistry::Instance().GetCommandHandler`
7777
- `chip::app::InteractionModelEngine::UnregisterCommandHandlers` replaced by
78-
`chip::app::CommandHandlerInterfaceRegistry::UnregisterAllCommandHandlersForEndpoint`
78+
`chip::app::CommandHandlerInterfaceRegistry::Instance().UnregisterAllCommandHandlersForEndpoint`
79+
80+
### AttributeAccessInterface registration and removal
81+
82+
A new object exists for the attribute access interface registry, accessible as
83+
`chip::app::AttributeHandlerInterfaceRegistry::Instance()`
84+
85+
Replacements for methods are:
86+
87+
- `registerAttributeAccessOverride` replaced by
88+
`chip::app::AttributeAccessInterfaceRegistry::Instance().Register`
89+
- `unregisterAttributeAccessOverride` replaced by
90+
`chip::app::AttributeAccessInterfaceRegistry::Instance().Unregister`
91+
- `unregisterAllAttributeAccessOverridesForEndpoint` replaced by
92+
`chip::app::AttributeAccessInterfaceRegistry::Instance().UnregisterAllForEndpoint`
93+
- `chip::app::GetAttributeAccessOverride` replaced by
94+
`chip::app::AttributeAccessInterfaceRegistry::Instance().Get`

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -9252,10 +9252,10 @@ endpoint 1 {
92529252
ram attribute occupancy;
92539253
ram attribute occupancySensorType;
92549254
ram attribute occupancySensorTypeBitmap default = 1;
9255-
ram attribute holdTime default = 10;
9255+
callback attribute holdTime;
92569256
callback attribute holdTimeLimits;
92579257
ram attribute PIROccupiedToUnoccupiedDelay default = 10;
9258-
ram attribute featureMap default = 0x02;
9258+
callback attribute featureMap;
92599259
ram attribute clusterRevision default = 5;
92609260
}
92619261

@@ -9730,10 +9730,10 @@ endpoint 2 {
97309730
ram attribute occupancy;
97319731
ram attribute occupancySensorType;
97329732
ram attribute occupancySensorTypeBitmap default = 1;
9733-
ram attribute holdTime default = 20;
9733+
callback attribute holdTime;
97349734
callback attribute holdTimeLimits;
97359735
ram attribute PIROccupiedToUnoccupiedDelay default = 10;
9736-
ram attribute featureMap default = 0x02;
9736+
callback attribute featureMap;
97379737
ram attribute clusterRevision default = 5;
97389738
}
97399739
}

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -19196,10 +19196,10 @@
1919619196
"side": "server",
1919719197
"type": "int16u",
1919819198
"included": 1,
19199-
"storageOption": "RAM",
19199+
"storageOption": "External",
1920019200
"singleton": 0,
1920119201
"bounded": 0,
19202-
"defaultValue": "10",
19202+
"defaultValue": null,
1920319203
"reportable": 1,
1920419204
"minInterval": 1,
1920519205
"maxInterval": 65534,
@@ -19244,10 +19244,10 @@
1924419244
"side": "server",
1924519245
"type": "bitmap32",
1924619246
"included": 1,
19247-
"storageOption": "RAM",
19247+
"storageOption": "External",
1924819248
"singleton": 0,
1924919249
"bounded": 0,
19250-
"defaultValue": "0x02",
19250+
"defaultValue": null,
1925119251
"reportable": 1,
1925219252
"minInterval": 1,
1925319253
"maxInterval": 65534,
@@ -25353,10 +25353,10 @@
2535325353
"side": "server",
2535425354
"type": "int16u",
2535525355
"included": 1,
25356-
"storageOption": "RAM",
25356+
"storageOption": "External",
2535725357
"singleton": 0,
2535825358
"bounded": 0,
25359-
"defaultValue": "20",
25359+
"defaultValue": null,
2536025360
"reportable": 1,
2536125361
"minInterval": 1,
2536225362
"maxInterval": 65534,
@@ -25401,10 +25401,10 @@
2540125401
"side": "server",
2540225402
"type": "bitmap32",
2540325403
"included": 1,
25404-
"storageOption": "RAM",
25404+
"storageOption": "External",
2540525405
"singleton": 0,
2540625406
"bounded": 0,
25407-
"defaultValue": "0x02",
25407+
"defaultValue": null,
2540825408
"reportable": 1,
2540925409
"minInterval": 1,
2541025410
"maxInterval": 65534,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr
9898

9999
void MatterActionsPluginServerInitCallback()
100100
{
101-
registerAttributeAccessOverride(&gAttrAccess);
101+
AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess);
102102
}

examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,6 @@ void emberAfFanControlClusterInitCallback(EndpointId endpoint)
173173
{
174174
VerifyOrDie(mFanControlManager == nullptr);
175175
mFanControlManager = new FanControlManager(endpoint);
176-
registerAttributeAccessOverride(mFanControlManager);
176+
AttributeAccessInterfaceRegistry::Instance().Register(mFanControlManager);
177177
FanControl::SetDefaultDelegate(endpoint, mFanControlManager);
178178
}

0 commit comments

Comments
 (0)