Skip to content

Commit

Permalink
Merge branch 'project-chip:master' into infineon-p6-keyvaluemanager-u…
Browse files Browse the repository at this point in the history
…pdate
  • Loading branch information
keithmwheeler authored Aug 23, 2022
2 parents 98b9d8f + c3fcbc1 commit ee2d6b5
Show file tree
Hide file tree
Showing 333 changed files with 9,375 additions and 3,457 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/docker_img.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ jobs:
- "-esp32"
- "-esp32-qemu"
- "-infineon"
- "-imx"
# NOTE: imx image requires too much space for GitHub-hosted runners. It fails with:
# ```
# ....
# ApplyLayer exit status 1 stdout: stderr: write /opt/fsl-imx-xwayland/5.15-kirkstone/sysroots/armv8a-poky-linux/opt/ltp/testcases/bin/fanotify15: no space left on device
# ```
# - "-imx"
- "-k32w"
- "-mbed-os"
- "-nrf-platform"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ jobs:
- name: Build example EFR32 Lighting App for BRD4161A with RPCs
timeout-minutes: 15
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug_rpc BRD4161A \
'import("//with_pw_rpc.gni")'
scripts/examples/gn_efr32_example.sh examples/lighting-app/efr32/ out/lighting_app_debug_rpc BRD4161A "is_debug=false" \
disable_lcd=true 'import("//with_pw_rpc.gni")'
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rpc lighting-app \
out/lighting_app_debug_rpc/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
- name: Build example EFR32+WF200 WiFi Lock app for BRD4161A
Expand Down
54 changes: 27 additions & 27 deletions .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,6 @@ jobs:
nrfconnect nrf52840dk_nrf52840 lock-app \
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 15
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf52840dk_nrf52840
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 lighting-app \
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF52840 Dongle
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 15
Expand All @@ -122,6 +113,15 @@ jobs:
nrfconnect nrf52840dk_nrf52840+rpc lighting-app \
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Light Switch App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 15
run: |
scripts/examples/nrfconnect_example.sh light-switch-app nrf52840dk_nrf52840
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf52840dk_nrf52840 light-switch-app \
examples/light-switch-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Shell on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.shell == 'true'
timeout-minutes: 15
Expand All @@ -140,24 +140,6 @@ jobs:
nrfconnect nrf52840dk_nrf52840 pigweed-app \
examples/pigweed-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lock App on nRF5340 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 15
run: |
scripts/examples/nrfconnect_example.sh lock-app nrf5340dk_nrf5340_cpuapp
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf5340dk_nrf5340_cpuapp lock-app \
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF5340 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 15
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk_nrf5340_cpuapp
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf5340dk_nrf5340_cpuapp lighting-app \
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Pump App on nRF52840 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 15
Expand Down Expand Up @@ -192,6 +174,24 @@ jobs:
nrfconnect nrf52840dk_nrf52840 all-clusters-minimal-app \
examples/all-clusters-minimal-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lock App on nRF5340 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 15
run: |
scripts/examples/nrfconnect_example.sh lock-app nrf5340dk_nrf5340_cpuapp
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf5340dk_nrf5340_cpuapp lock-app \
examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Build example nRF Connect SDK Lighting App on nRF5340 DK
if: github.event_name == 'push' || steps.changed_paths.outputs.nrfconnect == 'true'
timeout-minutes: 15
run: |
scripts/examples/nrfconnect_example.sh lighting-app nrf5340dk_nrf5340_cpuapp
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nrfconnect nrf5340dk_nrf5340_cpuapp lighting-app \
examples/lighting-app/nrfconnect/build/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: Run unit tests for Zephyr native_posix_64 platform
if: github.event_name == 'push' || steps.changed_paths.outputs.tests == 'true'
timeout-minutes: 15
Expand Down
12 changes: 9 additions & 3 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ endif()

include(${CMAKE_CURRENT_LIST_DIR}/ota-image.cmake)

set(CHIP_REQURIE_COMPONENTS freertos lwip bt mdns mbedtls fatfs app_update console openthread)
set(CHIP_REQURIE_COMPONENTS freertos lwip bt mbedtls fatfs app_update console openthread nvs_flash)

if(NOT "${IDF_TARGET}" STREQUAL "esp32h2")
list(APPEND CHIP_REQURIE_COMPONENTS mdns)
endif()

if (NOT CMAKE_BUILD_EARLY_EXPANSION)
if (CONFIG_COMPILER_OPTIMIZATION_DEFAULT OR CONFIG_COMPILER_OPTIMIZATION_NONE)
Expand Down Expand Up @@ -270,7 +274,9 @@ if(CONFIG_BT_ENABLED)
idf_component_get_property(bt_lib bt COMPONENT_LIB)
idf_component_get_property(bt_dir bt COMPONENT_DIR)
list(APPEND chip_libraries $<TARGET_FILE:${bt_lib}>)
list(APPEND chip_libraries ${bt_dir}/controller/lib_esp32h2/esp32h2-bt-lib/libcontroller_5p0_seq.a)
if(CONFIG_IDF_TARGET_ESP32H2_BETA_VERSION_2)
list(APPEND chip_libraries ${bt_dir}/controller/lib_esp32h2/esp32h2-bt-lib/beta2/libble_app.a)
endif()
else()
idf_component_get_property(bt_lib bt COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${bt_lib}> -lbtdm_app)
Expand All @@ -287,7 +293,7 @@ if(CONFIG_OPENTHREAD_ENABLED)
list(APPEND chip_libraries $<TARGET_FILE:${openthread_lib}>)
endif()

if(NOT CONFIG_USE_MINIMAL_MDNS)
if(NOT CONFIG_USE_MINIMAL_MDNS AND NOT CONFIG_IDF_TARGET_ESP32H2)
idf_component_get_property(mdns_lib mdns COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${mdns_lib}>)
endif()
Expand Down
1 change: 1 addition & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ menu "CHIP Device Layer"
menu "WiFi AP Options"

config ENABLE_WIFI_AP
depends on ESP_WIFI_SOFTAP_SUPPORT
bool "Enable CHIP WIFI AP"
default y
help
Expand Down
7 changes: 3 additions & 4 deletions docs/guides/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Tested on:

- macOS 10.15
- Debian 11
- Ubuntu 20.04 LTS
- Ubuntu 22.04 LTS

Build system features:

Expand Down Expand Up @@ -81,9 +81,8 @@ dependency.

### Installing prerequisites on Raspberry Pi 4

Using `rpi-imager`, install the Ubuntu _21.04_ 64-bit _server_ OS for arm64
architectures on a micro SD card. This release will have bluez 5.55 or newer
which is required for BLE functionality.
Using `rpi-imager`, install the Ubuntu _22.04_ 64-bit _server_ OS for arm64
architectures on a micro SD card.

Boot the SD card, login with the default user account "ubuntu" and password
"ubuntu", then proceed with
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/esp32/setup_idf_chip.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ step.
$ ./install.sh
```
- For ESP32H2, please checkout commit id
[10f3aba770](https://github.com/espressif/esp-idf/tree/10f3aba770),
- For ESP32H2, please checkout tag
[v5.0-beta1](https://github.com/espressif/esp-idf/tree/v5.0-beta1),
currently only lighting-app is supported on H2
```
$ cd esp-idf
$ git checkout 10f3aba770
$ git checkout v5.0-beta1
$ git submodule update --init
$ ./install.sh
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2851,7 +2851,7 @@ server cluster ColorControl = 768 {
readonly attribute int16u colorTempPhysicalMinMireds = 16395;
readonly attribute int16u colorTempPhysicalMaxMireds = 16396;
readonly attribute int16u coupleColorTempToLevelMinMireds = 16397;
attribute access(write: manage) int16u startUpColorTemperatureMireds = 16400;
attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

Expand Down Expand Up @@ -3850,7 +3850,14 @@ server cluster FaultInjection = 4294048774 {
BOOLEAN takeMutex = 4;
}

request struct FailRandomlyAtFaultRequest {
FaultType type = 0;
INT32U id = 1;
INT8U percentage = 2;
}

command access(invoke: manage) FailAtFault(FailAtFaultRequest): DefaultSuccess = 0;
command access(invoke: manage) FailRandomlyAtFault(FailRandomlyAtFaultRequest): DefaultSuccess = 1;
}

endpoint 0 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8461,6 +8461,14 @@
"source": "client",
"incoming": 1,
"outgoing": 1
},
{
"name": "FailRandomlyAtFault",
"code": 1,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
Expand Down
9 changes: 2 additions & 7 deletions examples/all-clusters-app/esp32/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,19 @@ menu "Demo"

config RENDEZVOUS_MODE_SOFTAP
bool "Soft-AP"
select ESP_WIFI_SOFTAP_SUPPORT
config RENDEZVOUS_MODE_BLE
bool "BLE"
depends on BT_ENABLED
config RENDEZVOUS_MODE_ON_NETWORK
bool "On-Network"
config RENDEZVOUS_MODE_SOFTAP_ON_NETWORK
bool "Soft-AP / On-Network"
select ESP_WIFI_SOFTAP_SUPPORT
config RENDEZVOUS_MODE_BLE_ON_NETWORK
bool "BLE / On-Network"
endchoice

config ECHO_HOST_IP
string "IPV4 address"
default "127.0.0.1"
depends on USE_ECHO_CLIENT
help
The IPV4 Address of the ECHO Server.

# NOTE: This config is not displayed as a input in the Kconfig menu, as its value is
# entirely derived from the Device Type choice. However the CONFIG_EXAMPLE_DISPLAY_TYPE
# define that is produced is needed to configure the TFT library correctly.
Expand Down
3 changes: 3 additions & 0 deletions examples/all-clusters-app/esp32/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y
# Serial Flasher config
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"

# Disable softap support by default
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,19 @@ menu "Demo"

config RENDEZVOUS_MODE_SOFTAP
bool "Soft-AP"
select ESP_WIFI_SOFTAP_SUPPORT
config RENDEZVOUS_MODE_BLE
bool "BLE"
depends on BT_ENABLED
config RENDEZVOUS_MODE_ON_NETWORK
bool "On-Network"
config RENDEZVOUS_MODE_SOFTAP_ON_NETWORK
bool "Soft-AP / On-Network"
select ESP_WIFI_SOFTAP_SUPPORT
config RENDEZVOUS_MODE_BLE_ON_NETWORK
bool "BLE / On-Network"
endchoice

config ECHO_HOST_IP
string "IPV4 address"
default "127.0.0.1"
depends on USE_ECHO_CLIENT
help
The IPV4 Address of the ECHO Server.

# NOTE: This config is not displayed as a input in the Kconfig menu, as its value is
# entirely derived from the Device Type choice. However the CONFIG_EXAMPLE_DISPLAY_TYPE
# define that is produced is needed to configure the TFT library correctly.
Expand Down
3 changes: 3 additions & 0 deletions examples/all-clusters-minimal-app/esp32/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y
# Serial Flasher config
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"

# Disable softap support by default
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n
3 changes: 3 additions & 0 deletions examples/bridge-app/esp32/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"

CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y
CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y

# Disable softap support by default
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@ server cluster ColorControl = 768 {
readonly attribute int16u colorTempPhysicalMinMireds = 16395;
readonly attribute int16u colorTempPhysicalMaxMireds = 16396;
readonly attribute int16u coupleColorTempToLevelMinMireds = 16397;
attribute access(write: manage) int16u startUpColorTemperatureMireds = 16400;
attribute access(write: manage) nullable int16u startUpColorTemperatureMireds = 16400;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
Expand Down
7 changes: 6 additions & 1 deletion examples/chef/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ efr32_executable("chef_app") {
if (chip_enable_openthread) {
deps += [
"${chip_root}/third_party/openthread:openthread",
"${chip_root}/third_party/openthread:openthread-platform",
"${examples_plat_dir}:efr-matter-shell",
]
}
Expand Down Expand Up @@ -246,7 +247,11 @@ efr32_executable("chef_app") {
}

if (!disable_lcd) {
sources += [ "${examples_plat_dir}/display/lcd.c" ]
sources += [
"${examples_plat_dir}/display/demo-ui.c",
"${examples_plat_dir}/display/lcd.cpp",
]
include_dirs += [ "${examples_plat_dir}/display" ]
defines += [ "DISPLAY_ENABLED" ]
if (show_qr_code) {
defines += [ "QR_CODE_ENABLED" ]
Expand Down
9 changes: 2 additions & 7 deletions examples/chef/esp32/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,19 @@ menu "Demo"
bool "Bypass"
config RENDEZVOUS_MODE_SOFTAP
bool "Soft-AP"
select ESP_WIFI_SOFTAP_SUPPORT
config RENDEZVOUS_MODE_BLE
bool "BLE"
depends on BT_ENABLED
config RENDEZVOUS_MODE_ON_NETWORK
bool "On-Network"
config RENDEZVOUS_MODE_SOFTAP_ON_NETWORK
bool "Soft-AP / On-Network"
select ESP_WIFI_SOFTAP_SUPPORT
config RENDEZVOUS_MODE_BLE_ON_NETWORK
bool "BLE / On-Network"
endchoice

config ECHO_HOST_IP
string "IPV4 address"
default "127.0.0.1"
depends on USE_ECHO_CLIENT
help
The IPV4 Address of the ECHO Server.

# NOTE: This config is not displayed as a input in the Kconfig menu, as its value is
# entirely derived from the Device Type choice. However the CONFIG_EXAMPLE_DISPLAY_TYPE
# define that is produced is needed to configure the TFT library correctly.
Expand Down
3 changes: 3 additions & 0 deletions examples/chef/esp32/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ CONFIG_STACK_CHECK=y
# Serial Flasher config
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"

# Disable softap support by default
CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n
6 changes: 6 additions & 0 deletions examples/chip-tool/commands/common/CHIPCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,12 @@ CHIP_ERROR CHIPCommand::InitializeCommissioner(std::string key, chip::FabricId f
// store the credentials in persistent storage, and
// generate when not available in the storage.
ReturnLogErrorOnFailure(mCommissionerStorage.Init(key.c_str()));
if (mUseMaxSizedCerts.HasValue())
{
auto option = CredentialIssuerCommands::CredentialIssuerOptions::kMaximizeCertificateSizes;
mCredIssuerCmds->SetCredentialIssuerOption(option, mUseMaxSizedCerts.Value());
}

ReturnLogErrorOnFailure(mCredIssuerCmds->InitializeCredentialsIssuer(mCommissionerStorage));

chip::MutableByteSpan nocSpan(noc.Get(), chip::Controller::kMaxCHIPDERCertLength);
Expand Down
4 changes: 4 additions & 0 deletions examples/chip-tool/commands/common/CHIPCommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ class CHIPCommand : public Command
"4. The default if not specified is \"alpha\".");
AddArgument("commissioner-nodeid", 0, UINT64_MAX, &mCommissionerNodeId,
"The node id to use for chip-tool. If not provided, kTestControllerNodeId (112233, 0x1B669) will be used.");
AddArgument("use-max-sized-certs", 0, 1, &mUseMaxSizedCerts,
"Maximize the size of operational certificates. If not provided or 0 (\"false\"), normally sized operational "
"certificates are generated.");
#if CHIP_CONFIG_TRANSPORT_TRACE_ENABLED
AddArgument("trace_file", &mTraceFile);
AddArgument("trace_log", 0, 1, &mTraceLog);
Expand Down Expand Up @@ -153,6 +156,7 @@ class CHIPCommand : public Command
chip::Optional<chip::NodeId> mCommissionerNodeId;
chip::Optional<uint16_t> mBleAdapterId;
chip::Optional<char *> mPaaTrustStorePath;
chip::Optional<bool> mUseMaxSizedCerts;

// Cached trust store so commands other than the original startup command
// can spin up commissioners as needed.
Expand Down
Loading

0 comments on commit ee2d6b5

Please sign in to comment.