Skip to content

Commit

Permalink
Merge branch 'master' into tv-app-linux_doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lboue authored May 29, 2023
2 parents 9c43a42 + 76baa66 commit 477f987
Show file tree
Hide file tree
Showing 485 changed files with 347,368 additions and 36,236 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-incomplete-umbrella -Wno-unguarded-availability-new' CHIP_IS_UBSAN=YES > >(tee /tmp/darwin/framework-tests/darwin-tests-asan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-err.log >&2)
# -enableThreadSanitizer instruments the code in Matter.framework,
# but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_TSAN=YES
#xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-incomplete-umbrella -Wno-unguarded-availability-new' CHIP_IS_TSAN=YES > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2)
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-incomplete-umbrella -Wno-unguarded-availability-new' CHIP_IS_TSAN=YES > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2)
working-directory: src/darwin/Framework
- name: Uploading log files
uses: actions/upload-artifact@v3
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ jobs:
run: |
git grep -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of "SuccessOrExit(something-without-assignment(", which should probably be "SuccessOrExit(err = something("
if: always()
run: |
git grep -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
- name: Check that our hardcoded SHA for clang-format on ARM mac matches the pigweed SHA.
if: always()
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml \
src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/concentration-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/content-launch-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/descriptor-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/diagnostic-logs-cluster.xml \
Expand Down Expand Up @@ -163,6 +164,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/onoff-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/pressure-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/power-source-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/power-source-configuration-cluster.xml \
Expand Down Expand Up @@ -487,7 +489,7 @@ jobs:
- name: Build Python REPL and example apps
timeout-minutes: 50
run: |
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env'
scripts/run_in_build_env.sh './scripts/build_python.sh --install_wheel build-env --extra_packages "mobly"'
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \
Expand Down
2 changes: 1 addition & 1 deletion build/chip/java/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ java_path = getenv("JAVA_PATH")
declare_args() {
java_matter_controller_dependent_paths = []
build_java_matter_controller = false
if (java_path != "") {
if (java_path != "" && current_os != "android") {
java_matter_controller_dependent_paths += [ "${java_path}/include/" ]

if (current_os == "mac") {
Expand Down
12 changes: 8 additions & 4 deletions build/chip/java/rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ template("java_library") {

# Compiles the given files into a directory and generates a 'class list'
_javac_target_name = target_name + "__javac"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
target_name + "/classes"
_class_list_file = "$target_gen_dir/$target_name.classlist"
action(_javac_target_name) {
sources = _java_files
Expand Down Expand Up @@ -284,7 +285,8 @@ template("java_binary") {

# Compiles the given files into a directory and generates a 'class list'
_javac_target_name = target_name + "__javac"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
target_name + "/classes"
_class_list_file = "$target_gen_dir/$target_name.classlist"
action(_javac_target_name) {
sources = _java_files
Expand Down Expand Up @@ -441,7 +443,8 @@ template("kotlin_library") {

# Compiles the given files into a directory and generates a 'class list'
_kotlinc_target_name = target_name + "__kotlinc"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
target_name + "/classes"
_class_list_file = "$target_gen_dir/$target_name.classlist"
action(_kotlinc_target_name) {
sources = _kotlin_files
Expand Down Expand Up @@ -598,7 +601,8 @@ template("kotlin_binary") {

# Compiles the given files into a directory and generates a 'class list'
_kotlinc_target_name = target_name + "__kotlinc"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/classes"
_class_dir = rebase_path(target_out_dir, root_build_dir) + "/" +
target_name + "/classes"
_class_list_file = "$target_gen_dir/$target_name.classlist"
action(_kotlinc_target_name) {
sources = _kotlin_files
Expand Down
15 changes: 14 additions & 1 deletion config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ if (CONFIG_ENABLE_ESP32_BLE_CONTROLLER)
chip_gn_arg_append("chip_enable_ble_controller" "true")
endif()

if (CONFIG_ENABLE_ETHERNET_TELEMETRY)
chip_gn_arg_append("chip_enable_ethernet" "true")
endif()

if (CONFIG_ENABLE_MATTER_OVER_THREAD)
chip_gn_arg_append("chip_enable_openthread" "true")
else()
Expand Down Expand Up @@ -359,6 +363,9 @@ endif()
if(CONFIG_OPENTHREAD_ENABLED)
idf_component_get_property(openthread_lib openthread COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${openthread_lib}>)

idf_component_get_property(ieee802154_lib ieee802154 COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${ieee802154_lib}>)
endif()

if((NOT CONFIG_USE_MINIMAL_MDNS) AND (CONFIG_ENABLE_WIFI_STATION OR CONFIG_ENABLE_WIFI_AP))
Expand All @@ -385,7 +392,7 @@ idf_component_get_property(lwip_lib lwip COMPONENT_LIB)
list(APPEND chip_libraries $<TARGET_FILE:${lwip_lib}>)


if (CONFIG_ESP_WIFI_ENABLED)
if (CONFIG_ESP32_WIFI_ENABLED)
idf_component_get_property(esp_wifi_lib esp_wifi COMPONENT_LIB)
idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR)
list(APPEND chip_libraries $<TARGET_FILE:${esp_wifi_lib}>)
Expand Down Expand Up @@ -436,6 +443,12 @@ 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}>)

target_link_libraries(${COMPONENT_LIB} INTERFACE -Wl,--start-group
${chip_libraries}
$<TARGET_FILE:mbedcrypto> $<TARGET_FILE:mbedx509>
Expand Down
5 changes: 1 addition & 4 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -705,12 +705,9 @@ menu "CHIP Device Layer"
depends on SEC_CERT_DAC_PROVIDER && SOC_ECDSA_SUPPORTED
default y
select MBEDTLS_HARDWARE_ECDSA_SIGN
select ENABLE_ESP32_FACTORY_DATA_PROVIDER
select ENABLE_ESP32_DEVICE_INSTANCE_INFO_PROVIDER
help
If DAC is being read from secure cert and SOC supports ECDSA signing using on-chip peripheral
then this option gets enabled. This option also selects few more that are required for commissioning
the device.
then this option gets enabled.
Also, please disable ESP_SECURE_CERT_DS_PERIPHERAL from the menuconfig when this option is disabled

endmenu
Expand Down
5 changes: 3 additions & 2 deletions docs/guides/esp32/build_app_and_commission.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ Note: In order to commission an ethernet device, from all-clusters-app enable
these config options: select `ESP32-Ethernet-Kit` under `Demo->Device Type` and
select `On-Network` rendezvous mode under `Demo->Rendezvous Mode`. Currently
default ethernet board supported is IP101, if you want to use other types of
ethernet board then override the current implementation under
`ConnectivityManagerImpl::InitEthernet`
ethernet board then you can extend the `ESPEthernetDriver` class in your
application and override the current implementation under
`ESPEthernetDriver::Init`
#### Commissioning Parameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ struct LabelStruct {

/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
server cluster Identify = 3 {
enum IdentifyEffectIdentifier : ENUM8 {
enum EffectIdentifierEnum : ENUM8 {
kBlink = 0;
kBreathe = 1;
kOkay = 2;
Expand All @@ -22,21 +22,21 @@ server cluster Identify = 3 {
kStopEffect = 255;
}

enum IdentifyEffectVariant : ENUM8 {
enum EffectVariantEnum : ENUM8 {
kDefault = 0;
}

enum IdentifyIdentifyType : ENUM8 {
enum IdentifyTypeEnum : ENUM8 {
kNone = 0;
kVisibleLight = 1;
kVisibleLED = 2;
kLightOutput = 1;
kVisibleIndicator = 2;
kAudibleBeep = 3;
kDisplay = 4;
kActuator = 5;
}

attribute int16u identifyTime = 0;
readonly attribute enum8 identifyType = 1;
readonly attribute IdentifyTypeEnum identifyType = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -49,8 +49,8 @@ server cluster Identify = 3 {
}

request struct TriggerEffectRequest {
IdentifyEffectIdentifier effectIdentifier = 0;
IdentifyEffectVariant effectVariant = 1;
EffectIdentifierEnum effectIdentifier = 0;
EffectVariantEnum effectVariant = 1;
}

command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0;
Expand All @@ -63,7 +63,11 @@ server cluster Groups = 4 {
kGroupNames = 0x1;
}

readonly attribute bitmap8 nameSupport = 0;
bitmap NameSupportBitmap : BITMAP8 {
kGroupNames = 0x80;
}

readonly attribute NameSupportBitmap nameSupport = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -134,7 +138,7 @@ server cluster Scenes = 5 {

struct AttributeValuePair {
optional attrib_id attributeID = 0;
int8u attributeValue[] = 1;
int32u attributeValue = 1;
}

struct ExtensionFieldSet {
Expand All @@ -147,6 +151,9 @@ server cluster Scenes = 5 {
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute nullable node_id lastConfiguredBy = 5;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1342,6 +1349,7 @@ server cluster NetworkCommissioning = 49 {
k5g = 2;
k6g = 3;
k60g = 4;
k1g = 5;
}

bitmap Feature : BITMAP32 {
Expand Down Expand Up @@ -1826,6 +1834,7 @@ server cluster WiFiNetworkDiagnostics = 54 {
kN = 3;
kAc = 4;
kAx = 5;
kAh = 6;
}

bitmap Feature : BITMAP32 {
Expand Down Expand Up @@ -2323,6 +2332,34 @@ server cluster ModeSelect = 80 {
command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0;
}

/** Attributes for reporting air quality classification */
server cluster AirQuality = 91 {
enum AirQualityEnum : ENUM8 {
kUnknown = 0;
kGood = 1;
kFair = 2;
kModerate = 3;
kPoor = 4;
kVeryPoor = 5;
kExtremelyPoor = 6;
}

bitmap Feature : BITMAP32 {
kFair = 0x1;
kModerate = 0x2;
kVeryPoor = 0x4;
kExtremelyPoor = 0x8;
}

readonly attribute AirQualityEnum airQuality = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

/** An interface to a generic way to secure a door */
server cluster DoorLock = 257 {
enum AlarmCodeEnum : ENUM8 {
Expand Down Expand Up @@ -5014,6 +5051,9 @@ endpoint 1 {
ram attribute currentGroup default = 0x0000;
ram attribute sceneValid default = 0x00;
ram attribute nameSupport;
ram attribute lastConfiguredBy;
ram attribute sceneTableSize;
ram attribute remainingCapacity;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 4;
}
Expand Down Expand Up @@ -5139,6 +5179,16 @@ endpoint 1 {
ram attribute manufacturerExtension default = 255;
}

server cluster AirQuality {
ram attribute airQuality default = 0;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 15;
ram attribute clusterRevision default = 1;
}

server cluster DoorLock {
emits event DoorLockAlarm;
emits event LockOperation;
Expand Down
Loading

0 comments on commit 477f987

Please sign in to comment.