-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add TI CC32xx CI * Update README.md * Update README.md * Update README.md * update lock-app readme sysconfig version * fixed lock app example path in cc32xx.py * wrap dmm source set with cc13xx family check * added cc32xx as a platform for freertos submodule, added path to dnssd.h * trying again to add dnssd.h path * adding path to public deps * adding src to include path and taking out public dependency * trying to add dnssd lib as a dependency * saved from August * moved DNSSD Start Server call and CommonDeviceCallbacks into examples/lock-app/cc32xx, string library error appears during build * removed dnssd.h file include from connectivitymanagerimpl.cpp * moved commondevicecallbacks and chipdevicemanager into example src files in build.gn * added implementation for deviceeventcallback * removed DeviceCallbacks.cpp and .h and renamed CommonDeviceCallbacks.cpp and .h as DeviceCallbacks.cpp and .h * merge conflict resolution on targets.py * fixed build command for lock-app * added missing header in CC32XXConfig.cpp and corrected header in AppTask.cpp * updated cc32xx yaml file to have the correct docker img version * removed StartEventLoop Task so that CHIPDeviceManager can start it * added CC32xx DAC certs and code cleanup * removed CHIP-tool modification section in lock-app readme, not needed anymore * more code cleanup * forgot to add platform BUILD.gn to prev commit * added DAC instructions in lock-app readme * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * Restyled by autopep8 * misspell correction * correcting merge conflict resolution mistake and adding Accessors.h back as an include file to AppTask * corrected contents of testdata folder * code cleanup from PR feedback * removed brackets from lock in all_targets_linux_x64.txt * empty commit * increased job timeout limit --------- Co-authored-by: Restyled.io <commits@restyled.io>
- Loading branch information
Showing
20 changed files
with
976 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# 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. | ||
|
||
name: Build example - TI CC32XX | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
cc32xx: | ||
name: cc32xx | ||
timeout-minutes: 100 | ||
|
||
env: | ||
BUILD_TYPE: gn_cc32xx | ||
|
||
runs-on: ubuntu-latest | ||
if: github.actor != 'restyled-io[bot]' | ||
|
||
container: | ||
image: connectedhomeip/chip-build-ti:0.6.34 | ||
volumes: | ||
- "/tmp/bloat_reports:/tmp/bloat_reports" | ||
steps: | ||
- uses: Wandalen/wretry.action@v1.0.15 | ||
name: Checkout | ||
with: | ||
action: actions/checkout@v3 | ||
with: | | ||
token: ${{ github.token }} | ||
attempt_limit: 3 | ||
attempt_delay: 2000 | ||
- name: Checkout submodules | ||
run: scripts/checkout_submodules.py --shallow --platform cc32xx | ||
- name: Set up environment for size reports | ||
if: ${{ !env.ACT }} | ||
env: | ||
GH_CONTEXT: ${{ toJson(github) }} | ||
run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" | ||
- name: Bootstrap | ||
timeout-minutes: 25 | ||
run: scripts/build/gn_bootstrap.sh | ||
- name: Uploading bootstrap logs | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ always() && !env.ACT }} | ||
with: | ||
name: bootstrap-logs | ||
path: | | ||
.environment/gn_out/.ninja_log | ||
.environment/pigweed-venv/*.log | ||
- name: Build examples | ||
timeout-minutes: 60 | ||
run: | | ||
scripts/run_in_build_env.sh "\ | ||
./scripts/build/build_examples.py \ | ||
--target cc32xx-lock build \ | ||
--copy-artifacts-to out/artifacts \ | ||
" | ||
- name: Get lock app size stats | ||
timeout-minutes: 5 | ||
run: | | ||
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ | ||
cc32xx CC3235SF_LAUNCHXL lock \ | ||
out/artifacts/cc32xx-lock/chip-CC3235SF_LAUNCHXL-lock-example.out \ | ||
/tmp/bloat_reports/ | ||
- name: Uploading Size Reports | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ !env.ACT }} | ||
with: | ||
name: Size,cc32xx-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} | ||
path: | | ||
/tmp/bloat_reports/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* | ||
* Copyright (c) 2020 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. | ||
*/ | ||
|
||
/** | ||
* @file | ||
* This file implements the CHIP Device Interface that is used by | ||
* applications to interact with the CHIP stack | ||
* | ||
*/ | ||
|
||
#include <stdlib.h> | ||
|
||
#include "CHIPDeviceManager.h" | ||
|
||
using namespace ::chip; | ||
|
||
namespace chip { | ||
|
||
namespace DeviceManager { | ||
|
||
using namespace ::chip::DeviceLayer; | ||
|
||
void CHIPDeviceManager::DeviceEventHandler(const ChipDeviceEvent * event, intptr_t arg) | ||
{ | ||
CHIPDeviceManagerCallbacks * cb = reinterpret_cast<CHIPDeviceManagerCallbacks *>(arg); | ||
if (cb != nullptr) | ||
{ | ||
cb->DeviceEventCallback(event, reinterpret_cast<intptr_t>(cb)); | ||
} | ||
} | ||
|
||
CHIP_ERROR CHIPDeviceManager::Init(CHIPDeviceManagerCallbacks * cb) | ||
{ | ||
mCB = cb; | ||
|
||
// Register a function to receive events from the CHIP device layer. Note that calls to | ||
// this function will happen on the CHIP event loop thread, not the app_main thread. | ||
PlatformMgr().AddEventHandler(CHIPDeviceManager::DeviceEventHandler, reinterpret_cast<intptr_t>(cb)); | ||
|
||
// Start a task to run the CHIP Device event loop. | ||
return PlatformMgr().StartEventLoopTask(); | ||
} | ||
|
||
void CHIPDeviceManagerCallbacks::DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg) {} | ||
|
||
CHIPDeviceManagerCallbacks::~CHIPDeviceManagerCallbacks() {} | ||
|
||
} // namespace DeviceManager | ||
} // namespace chip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* | ||
* Copyright (c) 2022 Project CHIP Authors | ||
* All rights reserved. | ||
* | ||
* 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. | ||
*/ | ||
|
||
#include "DeviceCallbacks.h" | ||
#include <app/server/Dnssd.h> | ||
|
||
using namespace chip; | ||
using namespace chip::DeviceLayer; | ||
using namespace chip::System; | ||
|
||
DeviceCallbacksDelegate * appDelegate = nullptr; | ||
extern "C" void cc32xxLog(const char * aFormat, ...); | ||
|
||
void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) | ||
{ | ||
switch (event->Type) | ||
{ | ||
case DeviceEventType::kInterfaceIpAddressChanged: | ||
if ((event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV4_Assigned) || | ||
(event->InterfaceIpAddressChanged.Type == InterfaceIpChangeType::kIpV6_Assigned)) | ||
{ | ||
// MDNS server restart on any ip assignment: if link local ipv6 is configured, that | ||
// will not trigger a 'internet connectivity change' as there is no internet | ||
// connectivity. MDNS still wants to refresh its listening interfaces to include the | ||
// newly selected address. | ||
cc32xxLog("DeviceEventCallback:Start DNS Server"); | ||
chip::app::DnssdServer::Instance().StartServer(); | ||
} | ||
} | ||
} |
Oops, something went wrong.