Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into feature/extend-im-with-uin…
Browse files Browse the repository at this point in the history
…t24-support
  • Loading branch information
tlykkeberg-grundfos committed Nov 3, 2021
2 parents 56e75f0 + 4947759 commit d241b5f
Show file tree
Hide file tree
Showing 396 changed files with 40,361 additions and 27,462 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/examples-infineon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,23 @@ jobs:
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
"scripts/build/build_examples.py --no-log-timestamps --target-glob 'infineon-*' build"
"scripts/build/build_examples.py --no-log-timestamps --target 'infineon-p6-lock' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
p6 default lock-app \
out/infineon-p6-lock/chip-p6-lock-example.out
- name: Build all-clusters-app example
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh \
"scripts/build/build_examples.py --no-log-timestamps --target 'infineon-p6-all-clusters' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
p6 default all-clusters-app \
out/infineon-p6-all-clusters/chip-p6-clusters-example.out
- name: Uploading Size Reports
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name: Size,P6-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }}
path: |
out/infineon-p6-lock/p6-default-lock-app-sizes.json
out/infineon-p6-all-clusters/p6-default-all-clusters-app-sizes.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,6 @@
path = third_party/pybind11/repo
url = https://github.com/pybind/pybind11
branch = stable
[submodule "p6/lwip"]
path = third_party/p6/p6_sdk/libs/lwip
url = https://git.savannah.nongnu.org/git/lwip
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
"esp32-devkitc-temperature-measurement",
"esp32-m5stack-all-clusters",
"esp32-m5stack-all-clusters-rpc",
"infineon-p6-all-clusters",
"infineon-p6-lock",
"linux-arm64-all-clusters",
"linux-arm64-all-clusters-ipv6only",
Expand All @@ -248,6 +249,21 @@
"linux-x64-chip-tool-ipv6only",
"linux-x64-thermostat",
"linux-x64-thermostat-ipv6only",
"mbed-CY8CPROTO_062_4343W-all-clusters-debug",
"mbed-CY8CPROTO_062_4343W-all-clusters-develop",
"mbed-CY8CPROTO_062_4343W-all-clusters-release",
"mbed-CY8CPROTO_062_4343W-light-debug",
"mbed-CY8CPROTO_062_4343W-light-develop",
"mbed-CY8CPROTO_062_4343W-light-release",
"mbed-CY8CPROTO_062_4343W-lock-debug",
"mbed-CY8CPROTO_062_4343W-lock-develop",
"mbed-CY8CPROTO_062_4343W-lock-release",
"mbed-CY8CPROTO_062_4343W-pigweed-debug",
"mbed-CY8CPROTO_062_4343W-pigweed-develop",
"mbed-CY8CPROTO_062_4343W-pigweed-release",
"mbed-CY8CPROTO_062_4343W-shell-debug",
"mbed-CY8CPROTO_062_4343W-shell-develop",
"mbed-CY8CPROTO_062_4343W-shell-release",
"nrf-nrf52840-light",
"nrf-nrf52840-lock",
"nrf-nrf52840-pump",
Expand Down
1 change: 1 addition & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {

if (current_os == "android") {
deps += [
"${chip_root}/src/app/server/java",
"${chip_root}/src/controller/java",
"${chip_root}/src/platform/android:java",
"${chip_root}/src/setup_payload/java",
Expand Down
5 changes: 5 additions & 0 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,11 @@ config("size_default") {
"-ffunction-sections",
"-fdata-sections",
]

# do not export functions in jni, or --gc-sections will not work and will be some undefined issues
if (current_os == "android") {
cflags += [ "-fvisibility=hidden" ]
}
}

config("stack_protector_default") {
Expand Down
2 changes: 2 additions & 0 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ target_include_directories(${COMPONENT_LIB} INTERFACE
"${CHIP_ROOT}/src/include"
"${CHIP_ROOT}/src/lib"
"${CHIP_ROOT}/src"
"${CHIP_ROOT}/zzz_generated/app-common"
"${CHIP_ROOT}/examples/platform/esp32"
"${CHIP_ROOT}/third_party/nlassert/repo/include"
"${CHIP_ROOT}/third_party/nlio/repo/include"
"${CMAKE_CURRENT_BINARY_DIR}/src/include"
Expand Down
39 changes: 19 additions & 20 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0001",
Expand Down Expand Up @@ -1605,14 +1605,6 @@
"source": "client",
"incoming": 1,
"outgoing": 1
},
{
"name": "GetLastNetworkCommissioningResult",
"code": 16,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
}
],
"attributes": [
Expand Down Expand Up @@ -7961,7 +7953,7 @@
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0001",
Expand Down Expand Up @@ -8855,14 +8847,6 @@
"source": "client",
"incoming": 1,
"outgoing": 1
},
{
"name": "GetLastNetworkCommissioningResult",
"code": 16,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
}
],
"attributes": [
Expand Down Expand Up @@ -9339,7 +9323,7 @@
"code": 2,
"mfgCode": null,
"side": "server",
"included": 0,
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
Expand All @@ -9349,6 +9333,21 @@
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
Expand Down Expand Up @@ -16905,7 +16904,7 @@
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
Expand Down
36 changes: 28 additions & 8 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,17 @@
# The list of src and include dirs must be in sync with that in all-clusters-app/esp32/main/component.mk
set(PRIV_INCLUDE_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/third_party/nlio/repo/include"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src"
"${CMAKE_CURRENT_LIST_DIR}/include"
)
set(SRC_DIRS_LIST
"${CMAKE_CURRENT_LIST_DIR}"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app/zap-generated"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated/attributes"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/app-common/app-common/zap-generated"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/test-cluster-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/descriptor"
Expand All @@ -59,14 +54,13 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/media-playback-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ota-provider"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/target-navigator-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread_network_diagnostics_server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/thread_network_diagnostics_server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/tv-channel-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/scenes"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/software_diagnostics_server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/general_diagnostics_server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/bindings"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server"
Expand Down Expand Up @@ -131,6 +125,19 @@ include(${PIGWEED_ROOT}/pw_build/pigweed.cmake)
include(${PIGWEED_ROOT}/pw_protobuf_compiler/proto.cmake)
set(dir_pw_third_party_nanopb "${CHIP_ROOT}/third_party/nanopb/repo" CACHE STRING "" FORCE)

pw_proto_library(attributes_service
SOURCES
${CHIP_ROOT}/examples/common/pigweed/protos/attributes_service.proto
INPUTS
${CHIP_ROOT}/examples/common/pigweed/protos/attributes_service.options
PREFIX
attributes_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
pw_protobuf.common_protos
)

pw_proto_library(button_service
SOURCES
${CHIP_ROOT}/examples/common/pigweed/protos/button_service.proto
Expand Down Expand Up @@ -166,6 +173,17 @@ pw_proto_library(lighting_service
pw_protobuf.common_protos
)

pw_proto_library(locking_service
SOURCES
${CHIP_ROOT}/examples/common/pigweed/protos/locking_service.proto
PREFIX
locking_service
STRIP_PREFIX
${CHIP_ROOT}/examples/common/pigweed/protos
DEPS
pw_protobuf.common_protos
)

pw_proto_library(wifi_service
SOURCES
${CHIP_ROOT}/examples/ipv6only-app/common/wifi_service/wifi_service.proto
Expand All @@ -180,9 +198,11 @@ pw_proto_library(wifi_service
)

target_link_libraries(${COMPONENT_LIB} PUBLIC
attributes_service.nanopb_rpc
button_service.nanopb_rpc
device_service.nanopb_rpc
lighting_service.nanopb_rpc
locking_service.nanopb_rpc
wifi_service.nanopb_rpc
pw_checksum
pw_hdlc
Expand Down
18 changes: 16 additions & 2 deletions examples/all-clusters-app/esp32/main/Rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
#include "pw_log/log.h"
#include "pw_rpc/server.h"
#include "pw_sys_io/sys_io.h"
#include "rpc_services/Attributes.h"
#include "rpc_services/Button.h"
#include "rpc_services/Device.h"
#include "rpc_services/Lighting.h"
#include "rpc_services/Locking.h"

#include <lib/support/logging/CHIPLogging.h>

Expand All @@ -41,6 +43,7 @@
#include "esp_wifi.h"
#include "freertos/FreeRTOS.h"
#include "freertos/semphr.h"
#include "freertos/timers.h"
#include "pw_containers/flat_map.h"
#include "pw_status/status.h"
#include "pw_status/try.h"
Expand Down Expand Up @@ -109,10 +112,17 @@ class Esp32Device final : public Device
public:
pw::Status Reboot(ServerContext & ctx, const pw_protobuf_Empty & request, pw_protobuf_Empty & response) override
{
esp_restart();
// WILL NOT RETURN
mRebootTimer = xTimerCreateStatic("Reboot", kRebootTimerPeriodTicks, false, nullptr, RebootHandler, &mRebootTimerBuffer);
xTimerStart(mRebootTimer, 0);
return pw::OkStatus();
}

private:
static constexpr TickType_t kRebootTimerPeriodTicks = 1000;
TimerHandle_t mRebootTimer;
StaticTimer_t mRebootTimerBuffer;

static void RebootHandler(TimerHandle_t) { esp_restart(); }
};

class Wifi final : public generated::Wifi<Wifi>
Expand Down Expand Up @@ -300,17 +310,21 @@ constexpr uint8_t kRpcTaskPriority = 5;

TaskHandle_t rpcTaskHandle;

Attributes attributes_service;
Esp32Button button_service;
Esp32Device device_service;
Lighting lighting_service;
Locking locking_service;
Wifi wifi_service;
pw::trace::TraceService trace_service;

void RegisterServices(pw::rpc::Server & server)
{
server.RegisterService(attributes_service);
server.RegisterService(button_service);
server.RegisterService(device_service);
server.RegisterService(lighting_service);
server.RegisterService(locking_service);
server.RegisterService(wifi_service);
server.RegisterService(trace_service);
PW_TRACE_SET_ENABLED(true);
Expand Down
2 changes: 1 addition & 1 deletion examples/all-clusters-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class MdnsDebugListModel : public ActionListModel
private:
void DoReinit()
{
CHIP_ERROR err = Dnssd::ServiceAdvertiser::Instance().Init(&DeviceLayer::InetLayer);
CHIP_ERROR err = Dnssd::ServiceAdvertiser::Instance().Init(&DeviceLayer::InetLayer());
if (err != CHIP_NO_ERROR)
{
ESP_LOGE(TAG, "Error initializing: %s", err.AsString());
Expand Down
1 change: 0 additions & 1 deletion examples/all-clusters-app/mbed/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
config/
build-*/
4 changes: 2 additions & 2 deletions examples/all-clusters-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ configure_file(
@ONLY
)

set(MBED_PATH $ENV{MBED_OS_PATH} CACHE INTERNAL "")
set(MBED_PATH ${MBED_OS_PATH} CACHE INTERNAL "")
set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "")
set(APP_TARGET chip-mbed-all-clusters-app-example)

Expand All @@ -25,7 +25,7 @@ include(${MBED_PATH}/tools/cmake/app.cmake)
project(${APP_TARGET})

add_subdirectory(${MBED_PATH} ./mbed_build)
add_subdirectory($ENV{MBED_OS_POSIX_SOCKET_PATH} ./mbed_os_posix_socket_build)
add_subdirectory(${MBED_OS_POSIX_SOCKET_PATH} ./mbed_os_posix_socket_build)

add_executable(${APP_TARGET})

Expand Down
28 changes: 28 additions & 0 deletions examples/all-clusters-app/p6/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")

# The location of the build configuration file.
buildconfig = "${build_root}/config/BUILDCONFIG.gn"

# CHIP uses angle bracket includes.
check_system_includes = true

default_args = {
target_cpu = "arm"
target_os = "freertos"

import("//args.gni")
}
Loading

0 comments on commit d241b5f

Please sign in to comment.