Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/removing_password_logs
Browse files Browse the repository at this point in the history
  • Loading branch information
arun-silabs authored Feb 20, 2024
2 parents cc52243 + a2e2c8a commit 11adcb5
Show file tree
Hide file tree
Showing 87 changed files with 1,790 additions and 547 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"initializeCommand": ".devcontainer/build.sh --tag matter-dev-environment:local --version 22",
"initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 22",
"image": "matter-dev-environment:local",
"remoteUser": "vscode",
"customizations": {
Expand Down
3 changes: 2 additions & 1 deletion .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ epochStartTime
eq
errorValue
esd
espcoredump
ESPPORT
Espressif
esptool
Expand Down Expand Up @@ -1621,4 +1622,4 @@ zephyrproject
zhengyaohan
Zigbee
zigbeealliance
zigbeethread
zigbeethread
2 changes: 2 additions & 0 deletions .github/workflows/darwin-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
--target darwin-x64-bridge-${BUILD_VARIANT} \
--target darwin-x64-lit-icd-${BUILD_VARIANT} \
--target darwin-x64-microwave-oven-${BUILD_VARIANT} \
--target darwin-x64-rvc-${BUILD_VARIANT} \
build \
--copy-artifacts-to objdir-clone \
"
Expand All @@ -120,6 +121,7 @@ jobs:
--tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \
--bridge-app ./out/darwin-x64-bridge-${BUILD_VARIANT}/chip-bridge-app \
--microwave-oven-app ./out/darwin-x64-microwave-oven-${BUILD_VARIANT}/chip-microwave-oven-app \
--rvc-app ./out/darwin-x64-rvc-${BUILD_VARIANT}/chip-rvc-app \
"
- name: Run OTA Test
run: |
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,35 +93,25 @@ jobs:
--known-failure app/AttributeAccessInterface.h \
--known-failure app/AttributeAccessToken.h \
--known-failure app/att-storage.h \
--known-failure app/BufferedReadCallback.h \
--known-failure app/CommandHandler.h \
--known-failure app/CommandHandlerInterface.h \
--known-failure app/CommandPathParams.h \
--known-failure app/CommandPathRegistry.h \
--known-failure app/CommandResponseSender.h \
--known-failure app/CommandSender.h \
--known-failure app/CommandSenderLegacyCallback.h \
--known-failure app/CompatEnumNames.h \
--known-failure app/ConcreteAttributePath.h \
--known-failure app/ConcreteCommandPath.h \
--known-failure app/data-model/ListLargeSystemExtensions.h \
--known-failure app/EventHeader.h \
--known-failure app/EventLoggingDelegate.h \
--known-failure app/EventLogging.h \
--known-failure app/EventLoggingTypes.h \
--known-failure app/EventManagement.h \
--known-failure app/InteractionModelHelper.h \
--known-failure app/ObjectList.h \
--known-failure app/ReadClient.h \
--known-failure app/ReadHandler.h \
--known-failure app/ReadPrepareParams.h \
--known-failure app/reporting/tests/MockReportScheduler.cpp \
--known-failure app/reporting/tests/MockReportScheduler.h \
--known-failure app/server/AppDelegate.h \
--known-failure app/TestEventTriggerDelegate.h \
--known-failure app/util/af.h \
--known-failure app/util/af-types.h \
--known-failure app/util/attribute-metadata.h \
--known-failure app/util/attribute-storage.cpp \
--known-failure app/util/attribute-storage.h \
--known-failure app/util/attribute-storage-null-handling.h \
Expand All @@ -141,11 +131,7 @@ jobs:
--known-failure app/util/im-client-callbacks.h \
--known-failure app/util/MatterCallbacks.h \
--known-failure app/util/message.cpp \
--known-failure app/util/mock/Constants.h \
--known-failure app/util/mock/Functions.h \
--known-failure app/util/mock/MockNodeConfig.h \
--known-failure app/util/odd-sized-integers.h \
--known-failure app/util/types_stub.h \
--known-failure app/util/util.cpp \
--known-failure app/util/util.h \
--known-failure app/WriteClient.h \
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/tests.yaml

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
enable_linux_lit_icd_app_build =
enable_default_builds && (host_os == "linux" || host_os == "mac")

# Build the Linux RVC app example.
enable_linux_rvc_app_build =
enable_default_builds && (host_os == "linux" || host_os == "mac")

# Build the cc13x2x7_26x2x7 lock app example.
enable_cc13x2x7_26x2x7_lock_app_build = enable_ti_simplelink_builds

Expand Down Expand Up @@ -744,6 +748,14 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
extra_build_deps += [ ":genio_shell_app" ]
}

if (enable_linux_rvc_app_build) {
group("linux_rvc_app") {
deps = [ "${chip_root}/examples/rvc-app/linux(${standalone_toolchain})" ]
}

extra_build_deps += [ ":linux_rvc_app" ]
}

group("default") {
deps = extra_build_deps + builds
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,19 @@ class ClusterDetailFragment : Fragment() {

private fun castStringToType(data: String, type: Class<*>, underlyingType: Class<*>): Any? {
return when (type) {
Int::class.java -> data.toInt()
Boolean::class.java -> data.toBoolean()
Int::class.java,
java.lang.Integer::class.java -> data.toInt()
Boolean::class.java,
java.lang.Boolean::class.java -> data.toBoolean()
ByteArray::class.java -> data.encodeToByteArray()
Long::class.java -> data.toLong()
Long::class.java,
java.lang.Long::class.java -> data.toLong()
Short::class.java,
java.lang.Short::class.java -> data.toShort()
Double::class.java,
java.lang.Double::class.java -> data.toDouble()
Float::class.java,
java.lang.Float::class.java -> data.toFloat()
Optional::class.java ->
if (data.isEmpty()) Optional.empty()
else Optional.of(castStringToType(data, underlyingType, underlyingType)!!)
Expand Down
32 changes: 31 additions & 1 deletion examples/temperature-measurement-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,39 @@ chip-tool pairing ble-wifi 1 SSID PASSPHRASE 20202021 3840
chip-tool diagnosticlogs retrieve-logs-request 0 0 1 0
# Read network diagnostic using BDX protocol
chip-tool diagnosticlogs retrieve-logs-request 1 0 1 0 --TransferFileDesignator network-diag.log
chip-tool interactive start
> diagnosticlogs retrieve-logs-request 1 1 1 0 --TransferFileDesignator network-diag.log
# Retrieve crash over BDX
> diagnosticlogs retrieve-logs-request 1 1 1 0 --TransferFileDesignator crash.bin
```

esp-idf supports storing and retrieving
[core dump in flash](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/core_dump.html#core-dump-to-flash).

To support that, application needs to add core dump partition's entry in
[partitons.csv](partitions.csv#7) and we need to enable few menuconfig options.

```
CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=y
CONFIG_ESP32_COREDUMP_DATA_FORMAT_ELF=y
```

This example's partition table and sdkconfig.default are already modified

- Retrieve the core dump using diagnostic logs cluster

```
# Read crash logs over BDX
chip-tool interactive start
> diagnosticlogs retrieve-logs-request 1 1 1 0 --TransferFileDesignator crash.bin
```
- Decode the crash logs, using espcoredump.py
```
espcoredump.py --chip (CHIP) info_corefile --core /tmp/crash.bin \
--core-format elf build/chip-temperature-measurement-app.elf
```
## Optimization
Optimization related to WiFi, BLuetooth, Asserts etc are the part of this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers"
)

set(PRIV_REQUIRES_LIST chip QRCode bt nvs_flash)
set(PRIV_REQUIRES_LIST chip QRCode bt nvs_flash bootloader_support espcoredump)

if (CONFIG_ENABLE_PW_RPC)
# Append additional directories for RPC build
Expand Down Expand Up @@ -83,7 +83,7 @@ endif (CONFIG_ENABLE_PW_RPC)
idf_component_register(PRIV_INCLUDE_DIRS ${PRIV_INCLUDE_DIRS_LIST}
SRC_DIRS ${SRC_DIRS_LIST}
PRIV_REQUIRES ${PRIV_REQUIRES_LIST}
EMBED_FILES diagnostic_logs/end_user_support.log diagnostic_logs/network_diag.log diagnostic_logs/crash.log)
EMBED_FILES diagnostic_logs/end_user_support.log diagnostic_logs/network_diag.log)

include("${CHIP_ROOT}/build/chip/esp32/esp32_codegen.cmake")
chip_app_component_codegen("${CHIP_ROOT}/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter")
Expand Down
Loading

0 comments on commit 11adcb5

Please sign in to comment.