Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into setupcodepairer_a…
Browse files Browse the repository at this point in the history
…lways_onnetwork
  • Loading branch information
cecille committed Dec 3, 2021
2 parents c824d0a + 89c17fe commit adbc1dc
Show file tree
Hide file tree
Showing 65 changed files with 1,616 additions and 341 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
run: |
mkdir -p /tmp/darwin/framework-tests
../../../out/debug/chip-all-clusters-app > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
xcodebuild test -target "CHIP" -scheme "CHIP Framework Tests" -sdk macosx > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
xcodebuild test -target "CHIP" -scheme "CHIP Framework Tests" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wno-documentation -Wno-conditional-uninitialized -Wno-incomplete-umbrella' > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
working-directory: src/darwin/Framework
- name: Uploading log files
uses: actions/upload-artifact@v2
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,6 @@
"clang-format.fallbackStyle": "WebKit",
"files.trimFinalNewlines": true,
"C_Cpp.default.cppStandard": "gnu++14",
"C_Cpp.default.cStandard": "gnu11"
"C_Cpp.default.cStandard": "gnu11",
"cmake.configureOnOpen": false
}
46 changes: 46 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,17 @@
"${workspaceFolder}/src/test_driver/mbed/unit_tests/build"
]
}
},
{
"label": "Flash EFR32 board",
"type": "shell",
"command": "python3",
"args": [
"${workspaceFolder}/out/${input:exampleTarget}/chip-efr32-*.flash.py"
],
"problemMatcher": {
"base": "$gcc"
}
}
],
"inputs": [
Expand Down Expand Up @@ -229,10 +240,45 @@
"android-x64-chip-tool",
"android-x86-chip-tool",
"efr32-brd4161a-light",
"efr32-brd4163a-light",
"efr32-brd4164a-light",
"efr32-brd4166a-light",
"efr32-brd4170a-light",
"efr32-brd4186a-light",
"efr32-brd4187a-light",
"efr32-brd4304a-light",
"efr32-brd4161a-light-rpc",
"efr32-brd4163a-light-rpc",
"efr32-brd4164a-light-rpc",
"efr32-brd4166a-light-rpc",
"efr32-brd4170a-light-rpc",
"efr32-brd4186a-light-rpc",
"efr32-brd4187a-light-rpc",
"efr32-brd4304a-light-rpc",
"efr32-brd4161a-lock",
"efr32-brd4163a-lock",
"efr32-brd4164a-lock",
"efr32-brd4166a-lock",
"efr32-brd4170a-lock",
"efr32-brd4186a-lock",
"efr32-brd4187a-lock",
"efr32-brd4304a-lock",
"efr32-brd4161a-unit-test",
"efr32-brd4163a-unit-test",
"efr32-brd4164a-unit-test",
"efr32-brd4166a-unit-test",
"efr32-brd4170a-unit-test",
"efr32-brd4186a-unit-test",
"efr32-brd4187a-unit-test",
"efr32-brd4304a-unit-test",
"efr32-brd4161a-window-covering",
"efr32-brd4163a-window-covering",
"efr32-brd4164a-window-covering",
"efr32-brd4166a-window-covering",
"efr32-brd4170a-window-covering",
"efr32-brd4186a-window-covering",
"efr32-brd4187a-window-covering",
"efr32-brd4304a-window-covering",
"esp32-c3devkit-all-clusters",
"esp32-devkitc-all-clusters",
"esp32-devkitc-all-clusters-ipv6only",
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ target_compile_options(${COMPONENT_LIB} PRIVATE
"-DPW_RPC_BUTTON_SERVICE=1"
"-DPW_RPC_DEVICE_SERVICE=1"
"-DPW_RPC_LIGHTING_SERVICE=1"
"-DPW_RPC_LOCKING_SERVICE=1")
"-DPW_RPC_LOCKING_SERVICE=1"
"-DPW_RPC_TRACING_SERVICE=1")

endif (CONFIG_ENABLE_PW_RPC)
25 changes: 25 additions & 0 deletions examples/platform/esp32/Rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,23 @@
#include "pigweed/rpc_services/Locking.h"
#endif // defined(PW_RPC_LOCKING_SERVICE) && PW_RPC_LOCKING_SERVICE

#if defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE
#include "pw_trace/trace.h"
#include "pw_trace_tokenized/trace_rpc_service_nanopb.h"

// Define trace time for pw_trace
PW_TRACE_TIME_TYPE pw_trace_GetTraceTime()
{
return (PW_TRACE_TIME_TYPE) chip::System::SystemClock().GetMonotonicMicroseconds64().count();
}
// Microsecond time source
size_t pw_trace_GetTraceTimeTicksPerSecond()
{
return 1000000;
}

#endif // defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE

namespace chip {
namespace rpc {

Expand Down Expand Up @@ -122,6 +139,10 @@ Lighting lighting_service;
Locking locking;
#endif // defined(PW_RPC_LOCKING_SERVICE) && PW_RPC_LOCKING_SERVICE

#if defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE
pw::trace::TraceService trace_service;
#endif // defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE

void RegisterServices(pw::rpc::Server & server)
{
#if defined(PW_RPC_ATTRIBUTE_SERVICE) && PW_RPC_ATTRIBUTE_SERVICE
Expand All @@ -143,6 +164,10 @@ void RegisterServices(pw::rpc::Server & server)
#if defined(PW_RPC_LOCKING_SERVICE) && PW_RPC_LOCKING_SERVICE
server.RegisterService(locking);
#endif // defined(PW_RPC_LOCKING_SERVICE) && PW_RPC_LOCKING_SERVICE

#if defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE
server.RegisterService(trace_service);
#endif // defined(PW_RPC_TRACING_SERVICE) && PW_RPC_TRACING_SERVICE
}

} // namespace
Expand Down
16 changes: 11 additions & 5 deletions scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,17 @@ _bootstrap_or_activate() {

local _CHIP_BANNER="$(
cat <<EOF
▄███▒ ░▓█ ░▓█ ░▓█▓ ▒█████▄
██▒ ▀█▒ ▒█ ▒█ ░█▒ ▒█░ █░
█▓░ ▒██████ ░█▒ ▒█▄▄▄█░
▓█ █▒ ▒█ ▒█ ░█░ ▒█▀
░▓███▀ ░▓███░▓█▒ ░█░ ▒█
░▓░
▓█▓
▓█▓ ▒█ ▒█
▒██▒▒▓██▒███▒ ░▒▓▒░ ░▒▓▒░ ░░▓█▒░ ░█ █████████████░ ░▒█▒░ ░░▒░
░▓█████▓██░ ▒█▒░░▒▓██▓▒░░▒█▒ ░█▓▒░░▒████ █▓░ █▓░ ▒█▒░░░▒█▓░ ██▒░░
▒█▒░ ░██▒ ░█░ █▓ ░█░ ░▓▒ ░▓█ █▓ █▓ ▒█░░ ░██ ▒▓
░▓██▓░ ░██▓█░ ░█ ▓█ █░ ░█░ ██ █▓ █▓ ▓██████████ ▒█
░▓███▒ ▒███▒░ ░█ ▓█ █░ ██░ ░███ █▓ █▓ ░█▒░ ▒█
░▒████████░ ░███▓▓█▓▓▒ ░█ ▒▒ █░ ░█▓██▓█░▒█ ░▓▓█░ ░▓▓█░ ▒▓▓██▓█░ ▒▓
░██▒░ ▒██▒ ▒██░ ░▒█▓
░▓░ ░▓░
EOF
)"

Expand Down
40 changes: 29 additions & 11 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,38 @@ def Esp32Targets():


def Efr32Targets():
efr_target = Target('efr32-brd4161a', Efr32Builder,
board=Efr32Board.BRD4161A)
efr_target = Target('efr32', Efr32Builder)

board_targets = [
efr_target.Extend('brd4161a', board=Efr32Board.BRD4161A),
efr_target.Extend('brd4163a', board=Efr32Board.BRD4163A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4164a', board=Efr32Board.BRD4164A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4166a', board=Efr32Board.BRD4166A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4170a', board=Efr32Board.BRD4170A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4186a', board=Efr32Board.BRD4186A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4187a', board=Efr32Board.BRD4187A).GlobBlacklist(
'only user requested'),
efr_target.Extend('brd4304a', board=Efr32Board.BRD4304A).GlobBlacklist(
'only user requested')
]

yield efr_target.Extend('window-covering', app=Efr32App.WINDOW_COVERING)
yield efr_target.Extend('unit-test', app=Efr32App.UNIT_TEST)
for board_target in board_targets:
yield board_target.Extend('window-covering', app=Efr32App.WINDOW_COVERING)
yield board_target.Extend('unit-test', app=Efr32App.UNIT_TEST)

rpc_aware_targets = [
efr_target.Extend('light', app=Efr32App.LIGHT),
efr_target.Extend('lock', app=Efr32App.LOCK)
]
rpc_aware_targets = [
board_target.Extend('light', app=Efr32App.LIGHT),
board_target.Extend('lock', app=Efr32App.LOCK)
]

for target in rpc_aware_targets:
yield target
yield target.Extend('rpc', enable_rpcs=True)
for target in rpc_aware_targets:
yield target
yield target.Extend('rpc', enable_rpcs=True)


def NrfTargets():
Expand Down
23 changes: 23 additions & 0 deletions scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,33 @@ def BuildRoot(self, root):

class Efr32Board(Enum):
BRD4161A = 1
BRD4163A = 2
BRD4164A = 3
BRD4166A = 4
BRD4170A = 5
BRD4186A = 6
BRD4187A = 7
BRD4304A = 8

def GnArgName(self):
if self == Efr32Board.BRD4161A:
return 'BRD4161A'
elif self == Efr32Board.BRD4163A:
return 'BRD4163A'
elif self == Efr32Board.BRD4164A:
return 'BRD4164A'
elif self == Efr32Board.BRD4166A:
return 'BRD4166A'
elif self == Efr32Board.BRD4170A:
return 'BRD4170A'
elif self == Efr32Board.BRD4186A:
return 'BRD4186A'
elif self == Efr32Board.BRD4187A:
return 'BRD4187A'
elif self == Efr32Board.BRD4304A:
return 'BRD4304A'
else:
raise Exception('Unknown board #: %r' % self)


class Efr32Builder(GnBuilder):
Expand Down
42 changes: 42 additions & 0 deletions scripts/build/testdata/all_targets_except_host.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,48 @@ efr32-brd4161a-lock
efr32-brd4161a-lock-rpc
efr32-brd4161a-unit-test
efr32-brd4161a-window-covering
efr32-brd4163a-light (NOGLOB: only user requested)
efr32-brd4163a-light-rpc (NOGLOB: only user requested)
efr32-brd4163a-lock (NOGLOB: only user requested)
efr32-brd4163a-lock-rpc (NOGLOB: only user requested)
efr32-brd4163a-unit-test (NOGLOB: only user requested)
efr32-brd4163a-window-covering (NOGLOB: only user requested)
efr32-brd4164a-light (NOGLOB: only user requested)
efr32-brd4164a-light-rpc (NOGLOB: only user requested)
efr32-brd4164a-lock (NOGLOB: only user requested)
efr32-brd4164a-lock-rpc (NOGLOB: only user requested)
efr32-brd4164a-unit-test (NOGLOB: only user requested)
efr32-brd4164a-window-covering (NOGLOB: only user requested)
efr32-brd4166a-light (NOGLOB: only user requested)
efr32-brd4166a-light-rpc (NOGLOB: only user requested)
efr32-brd4166a-lock (NOGLOB: only user requested)
efr32-brd4166a-lock-rpc (NOGLOB: only user requested)
efr32-brd4166a-unit-test (NOGLOB: only user requested)
efr32-brd4166a-window-covering (NOGLOB: only user requested)
efr32-brd4170a-light (NOGLOB: only user requested)
efr32-brd4170a-light-rpc (NOGLOB: only user requested)
efr32-brd4170a-lock (NOGLOB: only user requested)
efr32-brd4170a-lock-rpc (NOGLOB: only user requested)
efr32-brd4170a-unit-test (NOGLOB: only user requested)
efr32-brd4170a-window-covering (NOGLOB: only user requested)
efr32-brd4186a-light (NOGLOB: only user requested)
efr32-brd4186a-light-rpc (NOGLOB: only user requested)
efr32-brd4186a-lock (NOGLOB: only user requested)
efr32-brd4186a-lock-rpc (NOGLOB: only user requested)
efr32-brd4186a-unit-test (NOGLOB: only user requested)
efr32-brd4186a-window-covering (NOGLOB: only user requested)
efr32-brd4187a-light (NOGLOB: only user requested)
efr32-brd4187a-light-rpc (NOGLOB: only user requested)
efr32-brd4187a-lock (NOGLOB: only user requested)
efr32-brd4187a-lock-rpc (NOGLOB: only user requested)
efr32-brd4187a-unit-test (NOGLOB: only user requested)
efr32-brd4187a-window-covering (NOGLOB: only user requested)
efr32-brd4304a-light (NOGLOB: only user requested)
efr32-brd4304a-light-rpc (NOGLOB: only user requested)
efr32-brd4304a-lock (NOGLOB: only user requested)
efr32-brd4304a-lock-rpc (NOGLOB: only user requested)
efr32-brd4304a-unit-test (NOGLOB: only user requested)
efr32-brd4304a-window-covering (NOGLOB: only user requested)
esp32-c3devkit-all-clusters
esp32-devkitc-all-clusters
esp32-devkitc-all-clusters-ipv6only
Expand Down
Loading

0 comments on commit adbc1dc

Please sign in to comment.