Skip to content

Commit

Permalink
Merge branch 'master' into upgrade_cpp17
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored Aug 4, 2023
2 parents 13f2706 + 32ed9c5 commit 73869ff
Show file tree
Hide file tree
Showing 268 changed files with 30,590 additions and 4,835 deletions.
3 changes: 2 additions & 1 deletion .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ hci
hciattach
hciconfig
hdlc
HEPA
HKDF
HMAC
hoc
Expand All @@ -641,7 +642,6 @@ HomePods
hostapd
hostname
href
HEPA
HTTPS
HW
hwadr
Expand All @@ -652,6 +652,7 @@ IasWd
iaszone
ibb
ICA
ICD
iCloud
ICMP
IDF
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/chef.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-esp32:1
image: ghcr.io/project-chip/chip-build-esp32:2
options: --user root

steps:
Expand All @@ -64,8 +64,6 @@ jobs:
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: esp32
- name: Fixup GdbGui requirement
run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt
- name: CI Examples ESP32
shell: bash
run: |
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-esp32:1
image: ghcr.io/project-chip/chip-build-esp32:2
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand All @@ -46,9 +46,6 @@ jobs:
with:
platform: esp32

- name: Fixup GdbGui requirement
run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt

- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
if: ${{ !env.ACT }}
Expand Down Expand Up @@ -130,7 +127,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-esp32:1
image: ghcr.io/project-chip/chip-build-esp32:2
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand All @@ -142,9 +139,6 @@ jobs:
with:
platform: esp32

- name: Fixup GdbGui requirement
run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt

- name: Build example Bridge App
run: scripts/examples/esp_example.sh bridge-app

Expand Down
67 changes: 38 additions & 29 deletions .github/workflows/examples-openiotsdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ jobs:
examples/shell/openiotsdk/build/chip-openiotsdk-shell-example.elf \
/tmp/bloat_reports/
- name: "Test: shell example"
if: steps.build_shell.outcome == 'success'
run: |
scripts/run_in_python_env.sh out/venv \
'scripts/examples/openiotsdk_example.sh --no-activate -C test shell'
- name: Clean shell output
run: rm -rf examples/shell/openiotsdk/build

- name: Build lock-app example (mbedtls)
# Disabled being tracked here: https://github.com/project-chip/connectedhomeip/issues/28026
if: false
Expand All @@ -93,6 +102,18 @@ jobs:
examples/tv-app/openiotsdk/build/chip-openiotsdk-tv-app-example.elf \
/tmp/bloat_reports/
- name: "Test: tv-app example"
if: steps.build_tv_app.outcome == 'success'
timeout-minutes: 10
run: |
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up
scripts/run_in_python_env.sh out/venv \
'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app'
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down
- name: Clean tv-app output
run: rm -rf examples/tv-app/openiotsdk/build

- name: Build all-clusters-app example
id: build_all_clusters_app
timeout-minutes: 10
Expand All @@ -103,6 +124,18 @@ jobs:
examples/all-clusters-app/openiotsdk/build/chip-openiotsdk-all-clusters-app-example.elf \
/tmp/bloat_reports/
- name: "Test: all-clusters-app example"
if: steps.build_all_clusters_app.outcome == 'success'
timeout-minutes: 5
run: |
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up
scripts/run_in_python_env.sh out/venv \
'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app'
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down
- name: Clean all-clusters-app output
run: rm -rf examples/all-clusters-app/openiotsdk/build

- name: Build ota-requestor-app example
id: build_ota_requestor_app
timeout-minutes: 10
Expand All @@ -127,12 +160,6 @@ jobs:
run: |
scripts/examples/gn_build_example.sh examples/ota-provider-app/linux/ out/ota-provider chip_config_network_layer_ble=false
- name: "Test: shell example"
if: steps.build_shell.outcome == 'success'
run: |
scripts/run_in_python_env.sh out/venv \
'scripts/examples/openiotsdk_example.sh --no-activate -C test shell'
- name: "Test: lock-app example (mbedtls)"
if: steps.build_lock_app_mbedtls.outcome == 'success'
run: |
Expand All @@ -141,24 +168,6 @@ jobs:
'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app'
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down
- name: "Test: tv-app example"
if: steps.build_tv_app.outcome == 'success'
timeout-minutes: 10
run: |
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up
scripts/run_in_python_env.sh out/venv \
'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap tv-app'
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down
- name: "Test: all-clusters-app example"
if: steps.build_all_clusters_app.outcome == 'success'
timeout-minutes: 5
run: |
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME up
scripts/run_in_python_env.sh out/venv \
'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap all-clusters-app'
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down
- name: "Test: ota-requestor-app example"
if: steps.build_ota_requestor_app.outcome == 'success' && steps.build_ota_provider_app.outcome == 'success'
timeout-minutes: 30
Expand Down Expand Up @@ -189,11 +198,6 @@ jobs:
examples/lock-app/openiotsdk/build/chip-openiotsdk-lock-app-example.elf \
/tmp/bloat_reports/
- name: Build unit tests (psa)
id: build_unit_tests_psa
run: |
scripts/examples/openiotsdk_example.sh -b psa unit-tests
- name: "Test: lock-app example (psa)"
if: steps.build_lock_app_psa.outcome == 'success'
run: |
Expand All @@ -202,6 +206,11 @@ jobs:
'scripts/run_in_ns.sh ${TEST_NETWORK_NAME}ns scripts/examples/openiotsdk_example.sh --no-activate -C test -n ${TEST_NETWORK_NAME}tap lock-app'
scripts/setup/openiotsdk/network_setup.sh -n $TEST_NETWORK_NAME down
- name: Build unit tests (psa)
id: build_unit_tests_psa
run: |
scripts/examples/openiotsdk_example.sh -b psa unit-tests
- name: "Test: unit-tests (psa)"
if: steps.build_unit_tests_psa.outcome == 'success'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kotlin-style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v3

- name: "detekt"
uses: natiginfo/action-detekt-all@1.23.0
uses: natiginfo/action-detekt-all@1.23.1
# Detekt seems not to like circular symlinks, so we set up
# explicit paths below
with:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-esp32-qemu:1
image: ghcr.io/project-chip/chip-build-esp32-qemu:2
volumes:
- "/tmp/log_output:/tmp/test_logs"

Expand All @@ -50,9 +50,6 @@ jobs:
with:
platform: esp32

- name: Fixup GdbGui requirement
run: perl -i -pe 's/^gdbgui==/# gdbgui==/' /opt/espressif/esp-idf/requirements.txt

- name: Build ESP32 QEMU test images
run: |
scripts/run_in_build_env.sh " \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: ghcr.io/project-chip/chip-build-esp32:1
image: ghcr.io/project-chip/chip-build-esp32:2

steps:
- name: Checkout
Expand Down
4 changes: 4 additions & 0 deletions build/chip/java/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
java_path = getenv("JAVA_PATH")
declare_args() {
java_matter_controller_dependent_paths = []

# The class of each cluster created by ZAP is added to the library. (e.g., ChipClusters)
matter_enable_java_generated_api = true
matter_enable_java_compilation = false
if (java_path != "" && current_os == "linux") {
java_matter_controller_dependent_paths += [ "${java_path}/include/" ]
Expand All @@ -27,6 +30,7 @@ declare_args() {
[ "${java_path}/include/linux/" ]
}

matter_enable_java_generated_api = false
matter_enable_java_compilation = true
}
}
29 changes: 9 additions & 20 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ if(CONFIG_DISABLE_IPV4)
chip_gn_arg_append("chip_inet_config_enable_ipv4" "false")
endif()

if(CONFIG_DISABLE_READ_CLIENT)
chip_gn_arg_append("chip_enable_read_client" "false")
endif()

if(CHIP_CODEGEN_PREGEN_DIR)
chip_gn_arg_append("chip_code_pre_generated_directory" "\"${CHIP_CODEGEN_PREGEN_DIR}\"")
endif()
Expand Down Expand Up @@ -462,26 +466,11 @@ foreach(phy_blob ${phy_blobs})
list(APPEND chip_libraries "${esp_phy_dir}/lib/${target_name}/lib${phy_blob}.a")
endforeach()

idf_component_get_property(esp_event_lib esp_event COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${esp_event_lib}>)

idf_component_get_property(hal_lib hal COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${hal_lib}>)

idf_component_get_property(esp_system_lib esp_system COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${esp_system_lib}>)

idf_component_get_property(soc_lib soc COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${soc_lib}>)

idf_component_get_property(efuse_lib efuse COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${efuse_lib}>)

idf_component_get_property(vfs_lib vfs COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${vfs_lib}>)

idf_component_get_property(driver_lib driver COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${driver_lib}>)
set(components_to_link esp_event hal esp_system soc efuse vfs driver esp_coex freertos)
foreach(component ${components_to_link})
idf_component_get_property(lib_name ${component} COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${lib_name}>)
endforeach()

target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group
${chip_libraries}
Expand Down
6 changes: 6 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ menu "CHIP Core"
help
Matter spec is based on IPv6 communication only. Enabling this option may save some flash/ram.

config DISABLE_READ_CLIENT
bool "Disable read client in Interaction Model"
default n
help
Some device types don't require the read client. Enabling this option may save some flash/ram.

config BUILD_CHIP_TESTS
bool "Build CHIP tests"
default n
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/chip_tool_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -980,23 +980,23 @@ Complete the following steps:
fabric by using the following command pattern:
```
$ ./chip-tool pairing code <payload> <node_id> --commissioner-name <commissioner_name>
$ ./chip-tool pairing code <node_id> <payload> --commissioner-name <commissioner_name>
```
In this command:
- _<payload\>_ is the the QR code payload or a manual pairing code generated
by the first commissioner instance when opened commissioning window
- _<node_id\>_ is the user-defined ID of the node being commissioned. It
doesn't need to be the same ID, as for the first fabric.
- _<payload\>_ is the the QR code payload or a manual pairing code generated
by the first commissioner instance when opened commissioning window
- _<commissioner_name\>_ is the name of the second fabric. Valid values are
"alpha", "beta", "gamma", and integers greater than or equal to 4. The
default if not specified is "alpha".
**Example of command:**
```
$ ./chip-tool pairing code 36281602573 1 --commissioner-name beta
$ ./chip-tool pairing code 1 36281602573 --commissioner-name beta
```
#### Step 5: Test reception of commands
Expand Down
Loading

0 comments on commit 73869ff

Please sign in to comment.