Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Local Master #3

Merged
merged 234 commits into from
Dec 10, 2020
Merged
Changes from 1 commit
Commits
Show all changes
234 commits
Select commit Hold shift + click to select a range
1dcc358
Bring back image referenced by nRF examples (#3655)
mspang Nov 5, 2020
d006b0a
Make various src/app code compile with -Wconversion (#3681)
bzbarsky-apple Nov 5, 2020
e9f7524
[examples/pigweed-app] Added README file to the nRF Connect example. …
kkasperczyk-no Nov 5, 2020
52466a9
Add ZCL reporting plugin to be compiled in various examples (#3608)
vivien-apple Nov 5, 2020
4b00a33
Rename wifi-echo to all-clusters-app (#3653)
vivien-apple Nov 5, 2020
4f757f7
Use our EndpointId type in more places. (#3682)
bzbarsky-apple Nov 6, 2020
56206eb
Simplify Securepairing send message: (#3656)
andy31415 Nov 6, 2020
73870e9
ESP32: Fix PluginBasicResetToFactoryDefaultsCallback to call the corr…
dhrishi Nov 6, 2020
69dcdb5
[nRF Connect] Update README - Building with Docker (#3629)
Damian-Nordic Nov 6, 2020
8ec5567
Update docker images to 0.4.16 (#3710)
mspang Nov 6, 2020
a18d118
* Moving CHIPProjectConfig.h to a /platform (#3632)
tima-q Nov 6, 2020
4711189
Remove *-cli.c files in src/app/clusters and some leftovers (#3688)
vivien-apple Nov 6, 2020
0188d22
Use ClusterId in some cases where uint16_t snuck in. (#3701)
bzbarsky-apple Nov 6, 2020
280d80f
Add a linux version of the all-clusters-app demo (#3678)
vivien-apple Nov 6, 2020
7e4986c
Use the exit value of chip-tool in test-on-off-cluster.py instead of …
vivien-apple Nov 6, 2020
aa2eb3e
Add JavaScript to .clang-format (#3708)
vivien-apple Nov 7, 2020
39cbaf7
Enable BLE advertising start/stop command in shell application (#3714)
tima-q Nov 7, 2020
7d522cd
Update IntelliSense modes to correct architecture (#3713)
mspang Nov 7, 2020
c58b305
CodeQL: Comparison result is always the same in src/inet/tests/TestIn…
vivien-apple Nov 7, 2020
2d17edb
Enable -Wstack-usage on device builds (#3683)
kpschoedel Nov 7, 2020
bd63c51
[Android] Save Wifi credentials to CHIP device (#3670)
vidhis88 Nov 7, 2020
0ceca21
inet: remove kSendFlag_RetainBuffer (#3669)
kghost Nov 7, 2020
1a3cfe2
Remove examples/*-app/efr32/src/gen/ folders in order to use examples…
vivien-apple Nov 7, 2020
34c9e68
[nRF Connect] Add tasks to VS Code Container (#3717)
Damian-Nordic Nov 9, 2020
b2550f9
Compile with C++14 (#3680)
andy31415 Nov 9, 2020
4128ef3
[nrfconnect] Update NCS version to v1.4.0 (#3677)
LuDuda Nov 9, 2020
3e263cc
Add ReportAttributes commands to chip-tool and src/app (#3659)
vivien-apple Nov 9, 2020
7264b5c
Fix some assert() misuse in src/app. (#3690)
bzbarsky-apple Nov 9, 2020
24e9c68
Remove '-Wno-unused-variable' from compiler flags (#3720)
vivien-apple Nov 9, 2020
122da92
Add the implementation of _ProvisionThreadNetwork for efr platforms (…
jmartinez-silabs Nov 10, 2020
7cba727
ESP32 NimBLE: While starting new advertisement procedure stop active …
prasad-alatkar Nov 10, 2020
e4ac46a
[transport] Add node ID to address mapping (#3673)
gjc13 Nov 10, 2020
d652be4
[controller] Build CHIP Device Controller for arm64 (#3726)
erjiaqing Nov 10, 2020
c2e5453
Add ZAP templates to src/app (#3638)
jepenven-silabs Nov 10, 2020
e1f34b3
[Build bustage] src/lib/mdns/DiscoveryManager.cpp:165:13: warning: un…
vivien-apple Nov 10, 2020
0bedb82
Use src/app/reporting/reporting.h in src/app/util instead of the decl…
vivien-apple Nov 10, 2020
f3aa28c
[nrfconnect/pigweed-app] Added support for the USB transport. (#3748)
kkasperczyk-no Nov 10, 2020
85d4bf9
Move 'emberAfPluginDoorLockServerActivateDoorLockCallback' into src/a…
vivien-apple Nov 10, 2020
5230b2d
Move Groups Plugin callbacks into src/app/groups-server (#3750)
vivien-apple Nov 10, 2020
c06a341
Move 'emberAfPluginIdentify[Start/Stop]FeedbackCallback' callbacks in…
vivien-apple Nov 10, 2020
ba147cb
Remove '-Wno-unused-but-set-variable' from compiler flags (#3739)
vivien-apple Nov 10, 2020
7972765
Add `--device` option to EFR32 flashing script. (#3758)
kpschoedel Nov 10, 2020
81f0566
Add FindElementWithTag (#3695)
yunhanw-google Nov 11, 2020
047424f
Enable pairing for multiple devices (#3630)
pan-apple Nov 11, 2020
e384094
Use '#pragma once' in src/app/util, src/app/reporting and src/app/clu…
vivien-apple Nov 11, 2020
36a1b59
Move 'emberAfPluginBasicResetToFactoryDefaultsCallback' into src/app/…
vivien-apple Nov 11, 2020
c23b992
Move emberAfPluginLevelControlClusterServerPostInitCallback definitio…
vivien-apple Nov 11, 2020
eda6980
Rename gen/*.c files to cpp (#3754)
vivien-apple Nov 11, 2020
3d7f598
Move IAS Zone Client Plugin callbacks into src/app/ias-zone-client (#…
vivien-apple Nov 11, 2020
852f5af
CodeQL: Too many arguments to formatting function in examples/shell/q…
vivien-apple Nov 11, 2020
41af200
Warning: CHIPPersistentStorageDelegateBridge.h 'SetDelegate' override…
vivien-apple Nov 11, 2020
a3cb13d
Update CHIP to use release/v4.1 branch instead of the v4.1 release. (…
dhrishi Nov 11, 2020
dac3a91
[nrfconnect] Reduce OpenThread RAM and FLASH usage (#3801)
Damian-Nordic Nov 12, 2020
dde64a3
Add a CommandId type and use it in some obvious places (#3781)
bzbarsky-apple Nov 12, 2020
02d5a99
Move Scene Cluster Specific callbaks from gen/callback* to src/app/sc…
vivien-apple Nov 12, 2020
51ee065
ESP32: Make NimBLE as the default Bluetooth host in the temperature-m…
dhrishi Nov 12, 2020
73776c2
Remove '-Wno-maybe-uninitialized' from compiler flags (#3797)
vivien-apple Nov 12, 2020
b443fd8
Fix a few more cases of hardcoded integers used for data model types …
bzbarsky-apple Nov 12, 2020
9fcb5d5
Add a ValueOr method to Optional (#3767)
bzbarsky-apple Nov 12, 2020
aba2743
[nrfconnect] Added workaround fixing improper select method operation…
kkasperczyk-no Nov 13, 2020
9fd0123
Add attribute-size.h to src/app/zap-templates/chip-templates.json (#3…
vivien-apple Nov 13, 2020
b6f8229
Add missing non-clusters related callbacks to src/app/zap-templates (…
vivien-apple Nov 13, 2020
478a1da
Catch network exception (#3808)
markus-becker-tridonic-com Nov 13, 2020
cb0b8fe
Move Groups Cluster Specific callbacks from gen/callback* to src/app/…
vivien-apple Nov 13, 2020
fc57b42
Move OnOff Cluster Specific callbacks from gen/callback* to src/app/o…
vivien-apple Nov 13, 2020
7c14a33
Remove '-Wno-non-virtual-dtor' from compiler flags (#3773)
vivien-apple Nov 13, 2020
b1b084b
Change the output target in chip-templates.json to be .cpp instead of…
vivien-apple Nov 13, 2020
bda2945
Add src/lib/mdns to Doxygen (#3770)
vivien-apple Nov 13, 2020
58810f3
Add '-Wshadow' to the compiler flags (#3778)
vivien-apple Nov 13, 2020
528ac73
Add missing '#ifdef EMBER_AF_PLUGIN_REPORTING' to src/app/util/util.c…
vivien-apple Nov 13, 2020
42dad85
Set EchoClient as the exchange delegate to receive the incoming messa…
yufengwangca Nov 13, 2020
ef44fd4
[nrfconnect] Don't pass Zephyr optimization flags to CHIP build scrip…
Damian-Nordic Nov 14, 2020
bde3b5d
Move 'emberAfPluginColorControlServerComputePwmFrom*Callback' to src/…
vivien-apple Nov 14, 2020
a51eac9
Remove esi-management-test.c from src/app/util (#3843)
vivien-apple Nov 16, 2020
19a520e
[nRF Connect] Provide a way to build examples with no debugging featu…
Damian-Nordic Nov 16, 2020
15e835d
Remove hardcoded node IDs for devices (#3817)
pan-apple Nov 16, 2020
c5237ef
Add script for ZAP (#3833)
jepenven-silabs Nov 16, 2020
611055d
Create an autorelease class for System::PacketBuffers (#3783)
andy31415 Nov 16, 2020
28e081a
Add missing 'emberAf{clusterName}ServerInitCallback' and 'emberAf{clu…
vivien-apple Nov 16, 2020
3204296
Add some method on a BufferReader to test how much buffer is left. (#…
bzbarsky-apple Nov 16, 2020
7bd7736
Issue a 'WakeSelect' after marking the system for shutdown. (#3813)
andy31415 Nov 16, 2020
1c13a80
Remove 'emberAfClusterSecurityCustomCallback' from src/app (#3828)
vivien-apple Nov 16, 2020
e87fc4d
Add a work queue for thread safety in CHIP's Storage Delegate Bridge …
sagar-apple Nov 16, 2020
69e250e
[nrf] add timestamp in nrfconnect logs (#3790)
gjc13 Nov 16, 2020
056d0b3
A start of a bare-minimum mDNS query generator and reply parser (#3759)
andy31415 Nov 16, 2020
222a575
Use new DeviceController API im iOS framework (#3789)
pan-apple Nov 16, 2020
be6901a
[Thread] Fix linker errors when linking with OpenThread MTD (#3845)
Damian-Nordic Nov 16, 2020
b9cfe6b
[shell] Add command to join a network with the given SSID and PSK (#3…
yufengwangca Nov 16, 2020
8a62169
Use chip::* types from src/app/util/basic-types.h instead of EmberAf*…
vivien-apple Nov 16, 2020
4623603
Remove callbacks generated stubs from templates (#3842)
vivien-apple Nov 16, 2020
78e8776
Add nrfconnect lighting-app build dir to .gitignore (#3814)
bzbarsky-apple Nov 17, 2020
8567a65
Remove EmberAfProfileId and its dependencies (#3462)
vivien-apple Nov 17, 2020
de2c50c
Move 'emberAfPluginOnOffClusterServerPostInitCallback' to src/app/clu…
vivien-apple Nov 17, 2020
280f568
* Addition application level state machine (#3831)
tima-q Nov 17, 2020
a8f0fdc
[Build Bustage] 'EmberAfClusterId' has not been declared (#3876)
vivien-apple Nov 17, 2020
44392a5
Fix persistent storage delegate in iOS framework (#3859)
pan-apple Nov 17, 2020
fe3ec30
Fix mdns build depencency on core. (#3878)
kpschoedel Nov 17, 2020
5b9ef45
Remove IAS Zone Cluster Client from the all-clusters-app configuratio…
vivien-apple Nov 17, 2020
10ebaf4
Fix some build issues when building examples/lighting-app from ./gn_b…
vivien-apple Nov 17, 2020
bd7d709
Add '#define EMBER_AF_PLUGIN_{{clusterName}}' and related to src/app/…
vivien-apple Nov 17, 2020
6602287
Use chip::NodeId from transport/raw/MessageHeader.h instead of ChipNo…
vivien-apple Nov 17, 2020
d19730a
Fix merge error in master (#3883)
andy31415 Nov 17, 2020
fbd2d10
ExchangeManager: use delegate instead of AppState (#3640)
kghost Nov 17, 2020
5fc7cc5
fix wrong max prefix length in nrfconnect logs (#3869)
gjc13 Nov 17, 2020
260edfd
Remove gen/clusters-callback-stubs.cpp from the temperature-measureme…
vivien-apple Nov 17, 2020
8d2b32e
Remove '-Wno-deprecated-copy' from compiler flags (#3864)
vivien-apple Nov 17, 2020
a84274e
Update README.md to include SDK and NDK version (#3815)
lijujayakumar Nov 17, 2020
32181fc
Followup for #3846. Extra block leftover in src/app/zap-templates/cal…
vivien-apple Nov 17, 2020
34771f6
Update ZAP submodule (#3884)
vivien-apple Nov 17, 2020
f6ad93c
Simplify unit test generation - remove 'driver' boilerplate and exter…
andy31415 Nov 17, 2020
53ee104
build: Fix inputs to generated test drivers (#3900)
mspang Nov 18, 2020
0413ee6
Use CHIP prefix for iOS framework handler functions (#3891)
pan-apple Nov 18, 2020
c6098f5
Return PacketBufferHandle from PacketBuffer::New...() (#3850)
kpschoedel Nov 18, 2020
18badf3
Fix build breakage - test usage of System::PacketBuffer (#3906)
andy31415 Nov 18, 2020
74642ff
Add persistent storage delegate to chip tool (#3908)
pan-apple Nov 18, 2020
934f89c
BDX message structs and utility methods (#3731)
holbrookt Nov 18, 2020
b93cba2
fix MacOS build (#3919)
Nov 19, 2020
dc9c49f
Add all-clusters-app.zap file to all-clusters-app (#3901)
vivien-apple Nov 19, 2020
188a35f
Exchange handles SecureSession closing (#3897)
kghost Nov 19, 2020
460538a
Implement stale (#3887)
Nov 19, 2020
e982e15
[nrfconnect] disable 2Mbps BLE PHY by default (#3916)
LuDuda Nov 19, 2020
2d6dcb6
Add lighting-app.zap and lock-app.zap files to examples/lighting-app …
vivien-apple Nov 19, 2020
05b1e1f
Refactor Exchange APIs (#3923)
kghost Nov 19, 2020
c1df1bc
More cleanup in persistent storage delegate in iOS framework (#3905)
pan-apple Nov 19, 2020
d513b63
Add available macros for 'return error code' as an alterative to 'ver…
andy31415 Nov 19, 2020
aa2967a
Fix undefined symbol error when linking to echo protocol (#3920)
yufengwangca Nov 19, 2020
d18db36
Fix the identify timer logic on the esp32 all-clusters-app (#3917)
sagar-apple Nov 19, 2020
108e1b7
Fix bounds checks in PeerConnections (#3940)
bzbarsky-apple Nov 19, 2020
e6cc389
[cirque] Fix cirque test (#3947)
erjiaqing Nov 20, 2020
b99dac9
Fix some more uint8_t that should actually be EndpointId. (#3927)
bzbarsky-apple Nov 20, 2020
fb62fb0
Add initial message def for interaction model spec (#3491)
yunhanw-google Nov 20, 2020
97e5003
Remove duplicate node id (#3956)
yunhanw-google Nov 20, 2020
d6da789
Release all active device handles on controller shutdown (#3959)
pan-apple Nov 20, 2020
83e4e95
Bump Docker image version in VSCode Devcontainer (#3960)
Damian-Nordic Nov 20, 2020
9cb7edf
Add missing client clusters to src/app/clusters (#3924)
vivien-apple Nov 20, 2020
7d020b8
Implement cluster controller base class and port OnOff cluster to it …
pan-apple Nov 20, 2020
fba2fdc
[rendezvous] Add initial support for IP rendezvous (#3704)
erjiaqing Nov 20, 2020
f408bf6
[Darwin] Cleanup unused imports and forward declare where possible (#…
sagar-apple Nov 20, 2020
0f45b74
Temperature app measurement does not build anymore on the esp32 (#3907)
vivien-apple Nov 20, 2020
084a684
Disable multiple BLE connections by default (#3925)
gjc13 Nov 20, 2020
247ea28
Update spelling of chip_bypass_rendezvous (#3921)
mspang Nov 20, 2020
cc92b63
Groom BufBound (#3932)
Nov 21, 2020
6b996d8
Disable IAS Zone Client in the all-clusters-app configuration .zap fi…
vivien-apple Nov 23, 2020
00c7f5a
Minimal MDNS - start a generic server implementation (#3855)
andy31415 Nov 23, 2020
daa06bb
[linux]:Implement soft AP APIs for ConnectivityMgr on Linux platform …
yufengwangca Nov 23, 2020
5379d6b
Update temperature-measurement-app gen/ folder with ZAP generated con…
vivien-apple Nov 23, 2020
0abf731
[shell]:Add commands to control device in SoftAP mode (#3914)
yufengwangca Nov 24, 2020
f54b925
Some conversions to use PacketBufferHandle (#3909)
kpschoedel Nov 24, 2020
034c37a
Extracted ESP32 Url encoding method to the common QRCodeUtil module. …
kkasperczyk-no Nov 24, 2020
177a9f5
Add #idfef for DEVICE_LAYER for minimal mdns, Update to latest Packet…
andy31415 Nov 24, 2020
ddac4b1
Add temperature-measurement.zap file to temperature-measurement-app (…
vivien-apple Nov 24, 2020
90df58f
Fix Darwin host build (#3990)
kpschoedel Nov 25, 2020
ff3367f
Add '-Wextra' to compiler flags (#3902)
vivien-apple Nov 26, 2020
7c17319
Implement Level Control Cluster (#3806)
markus-becker-tridonic-com Nov 27, 2020
750cc0b
Fix Rendezvous over BLE after recent changes (#4012)
Damian-Nordic Nov 30, 2020
36845b6
[thread] fix invalid configuration of active dataset (#4008)
LuDuda Nov 30, 2020
591208a
Fix data loss or crash in TCPEndPoint with LwIP (#4022)
kpschoedel Nov 30, 2020
515d2cc
Update lighting-app gen/ folder with ZAP generated content (#4010)
vivien-apple Nov 30, 2020
b572719
Fix segmentation fault error in response echo message (#3984)
yufengwangca Nov 30, 2020
5697043
Add back Android default build coverage & fix the build (#3966)
mspang Nov 30, 2020
f99ac87
Update all-clusters-app gen/ folder with ZAP generated content (#3963)
vivien-apple Nov 30, 2020
b4b2fca
Move src/inet/tests to auto-test-driver generation (#3997)
andy31415 Dec 1, 2020
05faf7d
Rename TestUtils to UnitTestRegistration. (#4021)
andy31415 Dec 1, 2020
4d592f5
Update src/lib/core/tests to auto-test-driver generation (#3991)
andy31415 Dec 1, 2020
c4aeea0
Cleanup zap chip-helper.js (#3973)
jepenven-silabs Dec 1, 2020
2f16904
Move src/transport/tests to auto-test-driver generation (#3999)
andy31415 Dec 1, 2020
f382625
Use CHIPDeviceController instead of CHIPDeviceController_deprecated (…
vivien-apple Dec 1, 2020
dedd15f
Implement the missing part of Exchange Header in Transport layer (#4017)
yufengwangca Dec 1, 2020
01031e7
Remove duplicated send flag defines and put ExchangeMgr/ExchangeConte…
yufengwangca Dec 1, 2020
9afbb33
Move src/lib/asn1/tests and src/ble/tests to auto-test-driver generat…
andy31415 Dec 1, 2020
316a6f5
Some conversions to use PacketBufferHandle (#4011)
kpschoedel Dec 1, 2020
3ef347f
Move src/system/tests to auto-test-driver generation (#4000)
andy31415 Dec 1, 2020
b1139f7
Remove explicit "all" target from root build file (#3967)
mspang Dec 1, 2020
cb21694
Make src/setup_payload compile with -Werror=conversion (#4032)
bzbarsky-apple Dec 2, 2020
cb4fa9a
Add SSID and password to chip-tool pairing (#4054)
kpschoedel Dec 2, 2020
0110e48
Get temperature-measurement and all-clusters-app to use examples/comm…
vivien-apple Dec 2, 2020
b9ca485
Add all Thread ULA addresses to the lwip interface (#4053)
gjc13 Dec 2, 2020
9550af2
Remove src/lib/message. (#4055)
andy31415 Dec 2, 2020
75376cb
[ChipTool] Add Payload Parse Command (#3696)
lijujayakumar Dec 3, 2020
7c3facf
Remove unused legacy wml based protocol headers (#4066)
yufengwangca Dec 3, 2020
4ff557a
Add bounds checks to HandleCharacteristicReceived to avoid reading of…
bzbarsky-apple Dec 3, 2020
69a35c0
temporary disable cirque test (#4076)
yunhanw-google Dec 3, 2020
b5a5d89
Convert //src/protocols/bdx to use PacketBufferHandle (#4059)
kpschoedel Dec 4, 2020
305fd02
Add separate transport for IPv4 and IPv6 in controller (#4045)
pan-apple Dec 4, 2020
e4d9b28
[hotfix] Fix cirque test due to openthread change (#4085)
erjiaqing Dec 4, 2020
fd26ea2
Update lock-app gen/ folder with ZAP generated content (#3985)
vivien-apple Dec 4, 2020
252b094
Update the ZAP template to encode/decode commands (#3935)
vivien-apple Dec 4, 2020
d708a13
Make src/ble compile with -Werror=conversion (#4075)
bzbarsky-apple Dec 4, 2020
2244db6
Roll up third_party/pigweed/repo to ToT (#4044)
szatmz Dec 4, 2020
a8dbf65
[android/CHIPTool] Re-add Thread provisioning (#4073)
Damian-Nordic Dec 4, 2020
9a77777
Move src/setup_payload/tests to auto-test-driver generation (#4001)
andy31415 Dec 4, 2020
c6949c7
[cirque] Create dedicate docker container for cirque tests. (#3995)
erjiaqing Dec 5, 2020
fb0b748
Add zap client-macro-template (#4078)
jepenven-silabs Dec 5, 2020
e743ba8
Fix passing enum instead of bool to SetBLEAdvertisingEnabled (#3955)
Damian-Nordic Dec 6, 2020
ee937e6
Rework nRF Connect documentation (#4042)
Damian-Nordic Dec 7, 2020
2f73cb9
Initial full-functionality minimal MDNS (#3968)
andy31415 Dec 7, 2020
c5099ed
Implement an object pool following nlAllocator concept and add a adap…
kghost Dec 7, 2020
5813d4a
Convert support tests to auto test driver building (#3982)
andy31415 Dec 7, 2020
cf1cd59
Set/Reset on CHIPoBLEConState (#4095)
kpschoedel Dec 7, 2020
2eef447
Sync examples gen/ folder with zap-templates/ (#4097)
vivien-apple Dec 7, 2020
1b29655
Build all-clusters-app and lighting-app by default on macOS (#4101)
vivien-apple Dec 7, 2020
eba006a
Fix empty struct generation (#4006)
jepenven-silabs Dec 7, 2020
9a50701
Add a check to verify if the cluster has any commands enabled prior t…
jepenven-silabs Dec 7, 2020
2db319d
Create a 'BufferWriter' class to be the complement of 'BufferReader' …
andy31415 Dec 7, 2020
72e563a
[doc] Add a guide about commissioning nRF Connect examples using Andr…
Damian-Nordic Dec 7, 2020
6cabf8c
Properly update chip_tool_config.ini when a device is unpaired or pai…
vivien-apple Dec 7, 2020
d79f327
Rename SecurityChannel protocol to SecureChannel protocol to align wi…
yufengwangca Dec 7, 2020
09e5098
Fix iOS CHIPTool (#4109)
pan-apple Dec 7, 2020
d2645f9
Update src/app/chip-zcl-zpro-codec-api.h to SiLabs XML definition (#4…
vivien-apple Dec 7, 2020
6d8ff99
[Android CHIPTool] Wi-Fi vs Thread provisioning. (#4082)
vidhis88 Dec 8, 2020
0e2b4a4
MinMDNS refactor: (#4102)
andy31415 Dec 8, 2020
9df28b5
Fix build: references to bufbound replaced with bufferwriter (#4120)
andy31415 Dec 8, 2020
3896619
Refactor TestInetCommon (#4112)
szatmz Dec 8, 2020
f61f480
Purge some unused PacketBuffer declarations. (#4121)
kpschoedel Dec 8, 2020
c16bbe4
Drop "StartingFrom" from BufferWriter (#4122)
andy31415 Dec 8, 2020
4282a07
Add echo example apps to conduct end-to-end connectivity sanity check…
yufengwangca Dec 8, 2020
acfaa62
Sync examples gen/ folder with zap-templates/ (#4115)
vivien-apple Dec 8, 2020
49022e4
Use 16 bits service UUID on esp32 platform (#4098)
vivien-apple Dec 8, 2020
ed2cd1f
Revert "Refactor TestInetCommon (#4112)" (#4123)
szatmz Dec 8, 2020
731c798
Serialize and initlaize network interface ID used to communicate with…
pan-apple Dec 8, 2020
eb8217f
Remove "Show tree" step from CI (#4103)
andy31415 Dec 8, 2020
548b71a
Begin SystemPacketBuffer.h cleanup (#4096)
kpschoedel Dec 8, 2020
9365ae5
Fix Mac build breakage from incorrect formats for node ids (#4139)
bzbarsky-apple Dec 9, 2020
dfd5015
[shell]:Implement set commands for WiFi STA on Linux platform (#4131)
yufengwangca Dec 9, 2020
f8c29d4
Convert PacketBuffer::Next() to return a PacketBufferHandle (#4129)
kpschoedel Dec 9, 2020
0dba026
[linux]:Save config if provisioning is succeeded to live through powe…
yufengwangca Dec 9, 2020
830d1f8
[controller] Add IP rendezvous feature to CHIP Device controller (#4050)
erjiaqing Dec 9, 2020
8a76b4a
Add light button control RPC to lighting-app (#3930)
szatmz Dec 9, 2020
59cb4f6
Receive path cleanup for PacketBufferHandle conversion (#4128)
kpschoedel Dec 9, 2020
0a88e21
Refactor TestInetCommon (2nd attempt) (#4136)
szatmz Dec 9, 2020
82e1d6e
Add initial secure channel protocol definitions (#4138)
yufengwangca Dec 9, 2020
ab38281
Resurrect 'SetUdpListenPort' on 'ChipDeviceController' (#4071)
vivien-apple Dec 9, 2020
eddb7c3
Move src/platform/tests to auto-generation of unit test drivers (#3989)
andy31415 Dec 9, 2020
bb9c35c
Fix build break from outdated header name (#4148)
bzbarsky-apple Dec 9, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Enable -Wstack-usage on device builds (project-chip#3683)
* Enable -Wstack-usage on device builds

#### Problem

RAM on small devices is limited, so excesssive stack should not be used
without good reason. Stack allocation is also not easily checked at run
time so overflow is likely to cause crashes.

#### Summary of Changes

- Add a `-Wstack-usage` compiler flag on embedded builds. (For this
  purpose, an ‘embedded build’ is any that is not using a whitelisted
  non-embedded OS, so new platforms will have this enabled by default.)

  In this PR, the stack limit is set high enough that _only_ dynamically
  unbounded stack usage triggers it. The intent is to lower the limit
  in the future so that any unusually large stack requires whitelisting
  with justification in review.

- Replace most uses of dynamically unbounded stack.

- Filed separate issues for two remaining uses of dynamic stack:
    - project-chip#3662 emberAfPrintBuffer()
    - project-chip#3663 payloadBase41RepresentationWithTLV()

fixes project-chip#3505 Use "-Wstack-usage" for device builds

* Fix dynamic-sized stack array in CHIPDeviceController.cpp

* Additional dynamic-stack-size fixes.

* Revert ManualSetupPayloadGenerator.cpp
  • Loading branch information
kpschoedel authored Nov 7, 2020
commit 2d17edb5a8afc3cb7601a180dbd3e27bd2d09c37
5 changes: 5 additions & 0 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
@@ -186,6 +186,11 @@ config("warnings_default") {
if (current_os != "mac" && current_os != "ios") {
ldflags = [ "-Wl,--fatal-warnings" ]
}

if (current_os != "mac" && current_os != "ios" && current_os != "linux" &&
current_os != "win") {
cflags = [ "-Wstack-usage=8192" ]
}
}

config("symbols_default") {
12 changes: 4 additions & 8 deletions examples/chip-tool/commands/common/EchoCommand.cpp
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ using namespace ::chip;
using namespace ::chip::DeviceController;

#define SEND_DELAY 5
static const char * PAYLOAD = "Message from Standalone CHIP echo client!";
static const char PAYLOAD[] = "Message from Standalone CHIP echo client!";

void EchoCommand::SendEcho() const
{
@@ -59,19 +59,15 @@ void EchoCommand::SendEcho() const
void EchoCommand::ReceiveEcho(PacketBuffer * buffer) const
{
// attempt to print the incoming message
size_t data_len = buffer->DataLength();
char msg_buffer[data_len];
msg_buffer[data_len] = 0; // Null-terminate whatever we received and treat like a string...
memcpy(msg_buffer, buffer->Start(), data_len);

bool isEchoIdenticalToMessage = strncmp(msg_buffer, PAYLOAD, data_len) == 0;
size_t data_len = buffer->DataLength();
bool isEchoIdenticalToMessage = (data_len + 1 == sizeof PAYLOAD) && (memcmp(buffer->Start(), PAYLOAD, data_len) == 0);
if (isEchoIdenticalToMessage)
{
ChipLogProgress(chipTool, "Echo (%s): Received expected message !", GetNetworkName());
}
else
{
ChipLogError(chipTool, "Echo: (%s): Error \nSend: %s \nRecv: %s", GetNetworkName(), PAYLOAD, msg_buffer);
ChipLogError(chipTool, "Echo: (%s): Error \nSend: %s \nRecv: %.*s", GetNetworkName(), PAYLOAD, data_len, buffer->Start());
}
}

6 changes: 6 additions & 0 deletions src/app/util/ember-print.cpp
Original file line number Diff line number Diff line change
@@ -50,6 +50,10 @@ void emberAfPrintln(int category, const char * format, ...)
}
}

// TODO: issue #3662 - Unbounded stack in emberAfPrintBuffer()
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstack-usage="

void emberAfPrintBuffer(int category, const uint8_t * buffer, uint16_t length, bool withSpace)
{
if (buffer != NULL && length > 0)
@@ -73,6 +77,8 @@ void emberAfPrintBuffer(int category, const uint8_t * buffer, uint16_t length, b
}
}

#pragma GCC diagnostic pop // -Wstack-usage

void emberAfPrintString(int category, const uint8_t * string)
{
emberAfPrint(category, "%s", string);
7 changes: 4 additions & 3 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
@@ -63,15 +63,16 @@ namespace DeviceController {

using namespace chip::Encoding;

constexpr const char * kDeviceCredentialsKeyPrefix = "DeviceCredentials";
constexpr const char * kDeviceAddressKeyPrefix = "DeviceAddress";
constexpr const char kDeviceCredentialsKeyPrefix[] = "DeviceCredentials";
constexpr const char kDeviceAddressKeyPrefix[] = "DeviceAddress";

// This macro generates a key using node ID an key prefix, and performs the given action
// on that key.
#define PERSISTENT_KEY_OP(node, keyPrefix, key, action) \
do \
{ \
const size_t len = strlen(keyPrefix); \
constexpr size_t len = std::extent<decltype(keyPrefix)>::value; \
nlSTATIC_ASSERT_PRINT(len > 0, "keyPrefix length must be known at compile time"); \
/* 2 * sizeof(NodeId) to accomodate 2 character for each byte in Node Id */ \
char key[len + 2 * sizeof(NodeId) + 1]; \
nlSTATIC_ASSERT_PRINT(sizeof(node) <= sizeof(uint64_t), "Node ID size is greater than expected"); \
200 changes: 139 additions & 61 deletions src/crypto/tests/CHIPCryptoPALTest.cpp
100755 → 100644

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions src/inet/tests/TestInetCommon.cpp
Original file line number Diff line number Diff line change
@@ -48,6 +48,7 @@
#include <inet/InetFaultInjection.h>
#include <support/CHIPFaultInjection.h>
#include <support/CHIPMem.h>
#include <support/ScopedBuffer.h>
#include <system/SystemFaultInjection.h>
#include <system/SystemTimer.h>

@@ -665,11 +666,17 @@ void DumpMemory(const uint8_t * mem, uint32_t len, const char * prefix)

DumpMemory(mem, len, prefix, kRowWidth);
}

static void RebootCallbackFn()
{
char * lArgv[sRestartCallbackCtx.mArgc + 2];
int i;
int j = 0;
chip::Platform::ScopedMemoryBuffer<char *> lArgv;
if (!lArgv.Alloc(sRestartCallbackCtx.mArgc + 2))
{
printf("** failed to allocate memory **\n");
ExitNow();
}

if (gSigusr1Received)
{
@@ -707,7 +714,7 @@ static void RebootCallbackFn()

printf("********** Restarting *********\n");
fflush(stdout);
execvp(lArgv[0], lArgv);
execvp(lArgv[0], lArgv.Get());

exit:
return;
11 changes: 6 additions & 5 deletions src/lib/support/tests/TestSerializableIntegerSet.cpp
Original file line number Diff line number Diff line change
@@ -19,6 +19,7 @@
#include "TestSupport.h"

#include <support/CHIPMem.h>
#include <support/CHIPMemString.h>
#include <support/SerializableIntegerSet.h>
#include <support/TestUtils.h>

@@ -126,17 +127,17 @@ void TestSerializableIntegerSetSerialize(nlTestSuite * inSuite, void * inContext
NL_TEST_ASSERT(inSuite, set.SerializeBase64(buf, size) == nullptr);
NL_TEST_ASSERT(inSuite, size != 0);

char buf1[size];
NL_TEST_ASSERT(inSuite, set.SerializeBase64(buf1, size) == buf1);
chip::Platform::ScopedMemoryString buf1("", size);
NL_TEST_ASSERT(inSuite, set.SerializeBase64(buf1.Get(), size) == buf1.Get());
NL_TEST_ASSERT(inSuite, size != 0);

uint16_t size2 = static_cast<uint16_t>(2 * size);
char buf2[size2];
NL_TEST_ASSERT(inSuite, set.SerializeBase64(buf2, size2) == buf2);
chip::Platform::ScopedMemoryString buf2("", size2);
NL_TEST_ASSERT(inSuite, set.SerializeBase64(buf2.Get(), size2) == buf2.Get());
NL_TEST_ASSERT(inSuite, size2 == size);

chip::SerializableU64Set<8> set2;
NL_TEST_ASSERT(inSuite, set2.DeserializeBase64(buf2, size2) == CHIP_NO_ERROR);
NL_TEST_ASSERT(inSuite, set2.DeserializeBase64(buf2.Get(), size2) == CHIP_NO_ERROR);

for (uint64_t i = 1; i <= 6; i++)
{
6 changes: 6 additions & 0 deletions src/setup_payload/ManualSetupPayloadGenerator.cpp
Original file line number Diff line number Diff line change
@@ -40,13 +40,19 @@ static uint32_t shortPayloadRepresentation(const SetupPayload & payload)
return result;
}

// TODO: issue #3663 - Unbounded stack in src/setup_payload
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstack-usage="

static std::string decimalStringWithPadding(uint32_t number, int minLength)
{
char buf[minLength + 1];
snprintf(buf, sizeof(buf), "%0*" PRIu32, minLength, number);
return std::string(buf);
}

#pragma GCC diagnostic pop

CHIP_ERROR ManualSetupPayloadGenerator::payloadDecimalStringRepresentation(std::string & outDecimalString)
{
if (!mSetupPayload.isValidManualCode())
6 changes: 6 additions & 0 deletions src/setup_payload/QRCodeSetupPayloadGenerator.cpp
Original file line number Diff line number Diff line change
@@ -207,6 +207,10 @@ static CHIP_ERROR generateBitSet(SetupPayload & payload, uint8_t * bits, uint8_t
return err;
}

// TODO: issue #3663 - Unbounded stack in payloadBase41RepresentationWithTLV()
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstack-usage="

static CHIP_ERROR payloadBase41RepresentationWithTLV(SetupPayload & setupPayload, string & base41Representation, size_t bitsetSize,
uint8_t * tlvDataStart, size_t tlvDataLengthInBytes)
{
@@ -247,3 +251,5 @@ CHIP_ERROR QRCodeSetupPayloadGenerator::payloadBase41Representation(string & bas
exit:
return err;
}

#pragma GCC diagnostic pop // -Wstack-usage
3 changes: 2 additions & 1 deletion src/transport/SecureSession.cpp
Original file line number Diff line number Diff line change
@@ -152,7 +152,8 @@ CHIP_ERROR SecureSession::Encrypt(const uint8_t * input, size_t input_length, ui
constexpr Header::EncryptionType encType = Header::EncryptionType::kAESCCMTagLen16;

const size_t taglen = MessageAuthenticationCode::TagLenForEncryptionType(encType);
uint8_t tag[taglen];
assert(taglen <= kMaxTagLen);
uint8_t tag[kMaxTagLen];

VerifyOrExit(mKeyAvailable, error = CHIP_ERROR_INVALID_USE_OF_SESSION_KEY);
VerifyOrExit(input != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT);