Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ankk-css authored Aug 8, 2024
2 parents 434491f + 514b9eb commit 8755436
Show file tree
Hide file tree
Showing 312 changed files with 8,547 additions and 1,819 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ concurrency:

env:
CHIP_NO_LOG_TIMESTAMPS: true

jobs:

qemu-esp32:
Expand Down Expand Up @@ -75,12 +75,7 @@ jobs:
name: Tizen

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

container:
image: ghcr.io/project-chip/chip-build-tizen-qemu:54
Expand Down
108 changes: 2 additions & 106 deletions .github/workflows/tests.yaml

Large diffs are not rendered by default.

33 changes: 21 additions & 12 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
pull_request_rules:
- name: Label conflicting pull requests
description: Add a label to a pull request with conflict to spot it easily
conditions:
- conflict
- '-closed'
actions:
label:
toggle:
- conflict
- name: Automatic merge on PullApprove
conditions:
- or:
- "check-success=pullapprove"
- label="fast track"
- "#approved-reviews-by>=1"
- "#review-threads-unresolved=0"
- "-draft"
- "label!=docker" # Don't auto merge docker images
- "#check-failure=0" # Don't auto merge with a failure
- "#check-pending=0" # Don't auto merge with anything pending
- "check-success~=Build" # Don't auto merge unless a build has succeeded, needed because above is true on a fresh PR before builds
- check-success=pullapprove
- label="fast track"
- '#approved-reviews-by>=1'
- '#review-threads-unresolved=0'
- '-draft'
- label!=docker
- '#check-failure=0'
- '#check-pending=0'
- check-success~=Build
- or:
- "check-success=pullapprove"
- "check-skipped=pullapprove"
- "check-neutral=pullapprove"
- check-success=pullapprove
- check-skipped=pullapprove
- check-neutral=pullapprove
actions:
merge:
method: squash
6 changes: 5 additions & 1 deletion build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,11 @@ config("warnings_third_party") {
}

config("symbols_default") {
cflags = [ "-g${symbol_level}" ]
if (strip_symbols) {
cflags = [ "-s" ]
} else {
cflags = [ "-g${symbol_level}" ]
}
}

config("std_default") {
Expand Down
9 changes: 6 additions & 3 deletions build/config/compiler/compiler.gni
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ declare_args() {
symbol_level = 2

# Enable position independent code (-fPIC).
enable_pic =
current_os == "linux" || current_os == "mac" || current_os == "android"
enable_pic = current_os == "linux" || current_os == "mac" ||
current_os == "android" || current_os == "tizen"

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

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

# Remove all symbol table and relocation information from the binary.
strip_symbols = false

# Generate code coverage analysis artifacts when enabled.
use_coverage = false

Expand Down
5 changes: 1 addition & 4 deletions config/beken/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ import("//build_overrides/chip.gni")
#import("${chip_root}/build/chip/tests.gni")

group("beken") {
deps = [
"${chip_root}/examples/lighting-app/beken:MatterApp",
"${chip_root}/src/lib",
]
deps = [ "${chip_root}/src/lib" ]
}
group("default") {
deps = [ ":beken" ]
Expand Down
75 changes: 48 additions & 27 deletions config/telink/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if (CONFIG_CHIP_ROTATING_DEVICE_ID)
matter_add_gn_arg_bool("chip_enable_additional_data_advertising" TRUE)
endif()

if(CONFIG_WIFI_W91)
if (CONFIG_WIFI_W91)
matter_add_gn_arg_string("chip_mdns" "minimal")
elseif (CONFIG_NET_L2_OPENTHREAD)
matter_add_gn_arg_string("chip_mdns" "platform")
Expand Down Expand Up @@ -160,12 +160,11 @@ include(${TELINK_COMMON}/common.cmake)

set(BLOCK_SIZE "1024")

# get code-partition mcuboot_partition size
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
dt_reg_size(mcuboot_size PATH ${dts_partition_path})
math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)

if (CONFIG_BOOTLOADER_MCUBOOT)
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
dt_reg_size(mcuboot_size PATH ${dts_partition_path})
math(EXPR boot_blocks "${mcuboot_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)

add_custom_target(build_mcuboot ALL
COMMAND
west build -b ${BASE_BOARD} -d build_mcuboot ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr
Expand All @@ -183,31 +182,30 @@ if (CONFIG_BOOTLOADER_MCUBOOT)

add_dependencies(merge_mcuboot ${ZEPHYR_FINAL_EXECUTABLE})

if (CONFIG_CHIP_OTA_IMAGE_BUILD)
chip_ota_image(chip-ota-image
INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin
OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin
)
if (CONFIG_CHIP_OTA_IMAGE_BUILD)
chip_ota_image(chip-ota-image
INPUT_FILES ${PROJECT_BINARY_DIR}/zephyr.signed.bin
OUTPUT_FILE ${PROJECT_BINARY_DIR}/zephyr-ota.bin
)

add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE})
endif()
add_dependencies(chip-ota-image ${ZEPHYR_FINAL_EXECUTABLE})
endif()
endif()

# get code-partition factory_partition address
dt_nodelabel(dts_partition_path NODELABEL "factory_partition")
dt_reg_addr(factory_size PATH ${dts_partition_path})
math(EXPR factory_blocks "${factory_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)

if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE)
add_custom_target(merge_factory_data ALL
COMMAND
dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${factory_blocks}
)
if (CONFIG_CHIP_OTA_IMAGE_BUILD)
add_dependencies(merge_factory_data merge_mcuboot)
else()
add_dependencies(merge_factory_data ${ZEPHYR_FINAL_EXECUTABLE})
endif()
dt_nodelabel(dts_partition_path NODELABEL "factory_partition")
dt_reg_addr(factory_size PATH ${dts_partition_path})
math(EXPR factory_blocks "${factory_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)

add_custom_target(merge_factory_data ALL
COMMAND
dd if=${PROJECT_BINARY_DIR}/factory/factory_data.bin of=${PROJECT_BINARY_DIR}/zephyr.bin bs=${BLOCK_SIZE} seek=${factory_blocks}
)
if (CONFIG_CHIP_OTA_IMAGE_BUILD)
add_dependencies(merge_factory_data merge_mcuboot)
else()
add_dependencies(merge_factory_data ${ZEPHYR_FINAL_EXECUTABLE})
endif()
endif()

# ==============================================================================
Expand All @@ -218,4 +216,27 @@ if (CONFIG_CHIP_FACTORY_DATA_BUILD)
telink_generate_factory_data()
endif()

if (CONFIG_SOC_SERIES_RISCV_TELINK_W91 AND CONFIG_TELINK_W91_FETCH_N22_BIN)
dt_nodelabel(flash_path NODELABEL "flash")
dt_reg_size(flash_size PATH ${flash_path})
math(EXPR flash_blocks "${flash_size} / ${BLOCK_SIZE}" OUTPUT_FORMAT DECIMAL)

add_custom_target(merge_n22 ALL
COMMAND
[ -f ${PROJECT_BINARY_DIR}/n22.bin ] && (
dd if=/dev/zero bs=${BLOCK_SIZE} count=${flash_blocks} | tr '\\000' '\\377' > ${PROJECT_BINARY_DIR}/merged.bin &&
dd if=${PROJECT_BINARY_DIR}/zephyr.bin of=${PROJECT_BINARY_DIR}/merged.bin conv=notrunc &&
dd if=${PROJECT_BINARY_DIR}/n22.bin of=${PROJECT_BINARY_DIR}/merged.bin bs=${BLOCK_SIZE} seek=${flash_blocks} conv=notrunc
) || true
)

if (CONFIG_CHIP_FACTORY_DATA_MERGE_WITH_FIRMWARE)
add_dependencies(merge_n22 merge_factory_data)
elseif (CONFIG_CHIP_OTA_IMAGE_BUILD)
add_dependencies(merge_n22 merge_mcuboot)
else()
add_dependencies(merge_n22 ${ZEPHYR_FINAL_EXECUTABLE})
endif()
endif()

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

Blue sections can be overridden.

Expand Down
24 changes: 20 additions & 4 deletions docs/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,26 @@ independent of the InteractionModelEngine class.
The following replacements exist:

- `chip::app::InteractionModelEngine::RegisterCommandHandler` replaced by
`chip::app::CommandHandlerInterfaceRegistry::RegisterCommandHandler`
`chip::app::CommandHandlerInterfaceRegistry::Instance().RegisterCommandHandler`
- `chip::app::InteractionModelEngine::UnregisterCommandHandler` replaced by
`chip::app::CommandHandlerInterfaceRegistry::UnregisterCommandHandler`
`chip::app::CommandHandlerInterfaceRegistry::Instance().UnregisterCommandHandler`
- `chip::app::InteractionModelEngine::FindCommandHandler` replaced by
`chip::app::CommandHandlerInterfaceRegistry::GetCommandHandler`
`chip::app::CommandHandlerInterfaceRegistry::Instance().GetCommandHandler`
- `chip::app::InteractionModelEngine::UnregisterCommandHandlers` replaced by
`chip::app::CommandHandlerInterfaceRegistry::UnregisterAllCommandHandlersForEndpoint`
`chip::app::CommandHandlerInterfaceRegistry::Instance().UnregisterAllCommandHandlersForEndpoint`

### AttributeAccessInterface registration and removal

A new object exists for the attribute access interface registry, accessible as
`chip::app::AttributeHandlerInterfaceRegistry::Instance()`

Replacements for methods are:

- `registerAttributeAccessOverride` replaced by
`chip::app::AttributeAccessInterfaceRegistry::Instance().Register`
- `unregisterAttributeAccessOverride` replaced by
`chip::app::AttributeAccessInterfaceRegistry::Instance().Unregister`
- `unregisterAllAttributeAccessOverridesForEndpoint` replaced by
`chip::app::AttributeAccessInterfaceRegistry::Instance().UnregisterAllForEndpoint`
- `chip::app::GetAttributeAccessOverride` replaced by
`chip::app::AttributeAccessInterfaceRegistry::Instance().Get`
Original file line number Diff line number Diff line change
Expand Up @@ -9252,10 +9252,10 @@ endpoint 1 {
ram attribute occupancy;
ram attribute occupancySensorType;
ram attribute occupancySensorTypeBitmap default = 1;
ram attribute holdTime default = 10;
callback attribute holdTime;
callback attribute holdTimeLimits;
ram attribute PIROccupiedToUnoccupiedDelay default = 10;
ram attribute featureMap default = 0x02;
callback attribute featureMap;
ram attribute clusterRevision default = 5;
}

Expand Down Expand Up @@ -9730,10 +9730,10 @@ endpoint 2 {
ram attribute occupancy;
ram attribute occupancySensorType;
ram attribute occupancySensorTypeBitmap default = 1;
ram attribute holdTime default = 20;
callback attribute holdTime;
callback attribute holdTimeLimits;
ram attribute PIROccupiedToUnoccupiedDelay default = 10;
ram attribute featureMap default = 0x02;
callback attribute featureMap;
ram attribute clusterRevision default = 5;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19196,10 +19196,10 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "10",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -19244,10 +19244,10 @@
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x02",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -25353,10 +25353,10 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "20",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -25401,10 +25401,10 @@
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x02",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ CHIP_ERROR ActionsAttrAccess::Read(const ConcreteReadAttributePath & aPath, Attr

void MatterActionsPluginServerInitCallback()
{
registerAttributeAccessOverride(&gAttrAccess);
AttributeAccessInterfaceRegistry::Instance().Register(&gAttrAccess);
}
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,6 @@ void emberAfFanControlClusterInitCallback(EndpointId endpoint)
{
VerifyOrDie(mFanControlManager == nullptr);
mFanControlManager = new FanControlManager(endpoint);
registerAttributeAccessOverride(mFanControlManager);
AttributeAccessInterfaceRegistry::Instance().Register(mFanControlManager);
FanControl::SetDefaultDelegate(endpoint, mFanControlManager);
}
Loading

0 comments on commit 8755436

Please sign in to comment.