-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[QPG6100] Addition of Qorvo QPG6100 platform - initial lock-app versi…
…on (#2669) * Addition of Qorvo QPG6100 platform - initial lock-app version * Restyled by whitespace * Restyled by clang-format * Restyled by prettier-markdown * Restyled by clang-format * Restyled by prettier-markdown * Restyled by prettier-markdown * Markdown update * Addition of Qorvo QPG6100 platform - initial lock-app version * Restyled by whitespace * Restyled by clang-format * Restyled by prettier-markdown * Restyled by clang-format * Restyled by prettier-markdown * Restyled by prettier-markdown * Markdown update * * Enabling GN/Ninja build system for Lock-app * Moving Qorvo SDK code to third_party/qpg_sdk (awaiting availibility of external location) * Restyled by whitespace * Restyled by gn * Restyled by prettier-markdown * Update merge - missing } * Update merge 2 - missing } * Restyled by gn * - Removal Qorvo specific SDK files. SDK available on Qorvo repository - Updated README.md to reflect changes - Fix conversion errors in ConfigurationManager * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * * Updating review comments andy31415 * Created #2939 to follow up on OpenThread creation * lwip assert enabled * Commented out code removed where needed * Restyled by gn * * Use QPG qpg-connectedhomeip repository as submodule * make QPG6100_SDK_ROOT point to repo by default * Restyled by prettier-markdown * * Removal automake support for QPG6100 * * Fix flash utils due to API update * Restyled by prettier-markdown * mspang comments * Updating submodule reference to qpg_sdk * Removing efr32 reference * * Integration diff kpschoedel - aligning with updates in firmware_utils.py * Addition checks for mBed copy Co-authored-by: Restyled.io <commits@restyled.io>
- Loading branch information
1 parent
842ca36
commit b5b3d38
Showing
54 changed files
with
4,740 additions
and
3 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
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,24 @@ | ||
# 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. | ||
|
||
import("//build_overrides/chip.gni") | ||
|
||
import("//build/toolchain/arm_gcc/arm_toolchain.gni") | ||
|
||
arm_toolchain("qpg6100_lock_app") { | ||
toolchain_args = { | ||
current_os = "freertos" | ||
import("${chip_root}/examples/lock-app/qpg6100/args.gni") | ||
} | ||
} |
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,18 @@ | ||
# 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. | ||
|
||
declare_args() { | ||
# Root directory for QPG6100 SDK. | ||
qpg6100_sdk_build_root = "//third_party/connectedhomeip/third_party/qpg_sdk" | ||
} |
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,29 @@ | ||
# 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. | ||
|
||
# The location of the build configuration file. | ||
buildconfig = "//build/config/BUILDCONFIG.gn" | ||
|
||
# CHIP uses angle bracket includes. | ||
check_system_includes = true | ||
|
||
# Allow loading paths relative to //gn. | ||
secondary_source = "//third_party/connectedhomeip/gn/" | ||
|
||
default_args = { | ||
target_cpu = "arm" | ||
target_os = "freertos" | ||
|
||
import("//args.gni") | ||
} |
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,82 @@ | ||
# 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. | ||
|
||
import("//build/config/defaults.gni") | ||
import("//build_overrides/chip.gni") | ||
import("//build_overrides/qpg6100_sdk.gni") | ||
import("${qpg6100_sdk_build_root}/qpg6100_executable.gni") | ||
import("${qpg6100_sdk_build_root}/qpg6100_sdk.gni") | ||
|
||
assert(current_os == "freertos") | ||
|
||
qpg6100_project_dir = "${chip_root}/examples/lock-app/qpg6100" | ||
examples_plat_dir = "${chip_root}/examples/platform/qpg6100" | ||
|
||
qpg6100_sdk("sdk") { | ||
include_dirs = [ | ||
"${chip_root}/src/platform/qpg6100", | ||
"${qpg6100_project_dir}/include/", | ||
"${qpg6100_project_dir}/src/", | ||
] | ||
|
||
sources = [ "${qpg6100_project_dir}/include/CHIPProjectConfig.h" ] | ||
|
||
defines = [] | ||
if (is_debug) { | ||
defines += [ "BUILD_RELEASE=0" ] | ||
} else { | ||
defines += [ "BUILD_RELEASE=1" ] | ||
} | ||
} | ||
|
||
qpg6100_executable("lock_app") { | ||
include_dirs = [] | ||
defines = [] | ||
output_name = "chip-qpg6100-lock-example.out" | ||
|
||
public_deps = [ | ||
":sdk", | ||
"${chip_root}/src/lib", | ||
"${chip_root}/src/setup_payload", | ||
|
||
# OpenThread to be enabled | ||
# https://github.com/project-chip/connectedhomeip/issues/293 | ||
# "${chip_root}/third_party/openthread/platforms:libopenthread-platform", | ||
# "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", | ||
# "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd", | ||
# "${chip_root}/third_party/openthread/repo:libopenthread-ftd", | ||
] | ||
|
||
include_dirs += [ | ||
"${qpg6100_project_dir}/include/", | ||
"${chip_root}/src/app/util", | ||
"${examples_plat_dir}/", | ||
] | ||
|
||
sources = [ "src/main.cpp" ] | ||
|
||
output_dir = root_out_dir | ||
|
||
ldscript = "${qpg6100_sdk_root}/qpg6100/ldscripts/chip-qpg6100-example.ld" | ||
|
||
ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] | ||
} | ||
|
||
group("qpg6100") { | ||
deps = [ ":lock_app" ] | ||
} | ||
|
||
group("default") { | ||
deps = [ ":qpg6100" ] | ||
} |
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,133 @@ | ||
# CHIP QPG6100 Lock Example Application | ||
|
||
An example application showing the use | ||
[CHIP](https://github.com/project-chip/connectedhomeip) on the Qorvo QPG6100. | ||
|
||
--- | ||
|
||
- [CHIP QPG6100 Lock Example Application](#chip-qpg6100-lock-example-application) | ||
- [Introduction](#introduction) | ||
- [Building](#building) | ||
- [Flashing the application](#flashing-the-application) | ||
- [Viewing Logging Output](#viewing-logging-output) | ||
|
||
--- | ||
|
||
## Introduction | ||
|
||
![QPG6100 DK board](../../platform/qpg6100/doc/images/QPG6100_DK_Board.jpg) | ||
|
||
The QPG6100 Lock shows an implementation of a Door Lock device, based on CHIP | ||
and the Qorvo QPG6100 SDK. Intention of this example is to demonstrate a CHIP | ||
device, with Thread connectivity, using BLE to perform CHIP provisioning. | ||
|
||
The example will be implemented in a phased approach, enabling more features | ||
with separate updates. | ||
|
||
Current status of implementation: | ||
|
||
- Initialization of the CHIP stack. | ||
- CHIP Logging, PlatformManager and ConfigurationManager enabled. | ||
|
||
Pending: | ||
|
||
- Button and LED control | ||
- BLE: Addition of CHIPoBLE to enable provisioning | ||
- Thread: Linking QPG6100 OpenThread implementation to CHIP build | ||
- Intake CHIP ZCL cluster control for the Lock mechanism through CHIP tool. | ||
|
||
For more information on Qorvo and the platforms, please visit | ||
[the Qorvo website](www.qorvo.com) or contact us on LPW.support@qorvo.com. | ||
|
||
## Building | ||
|
||
### Preparation | ||
|
||
- Download and install a suitable ARM gcc tool chain: | ||
[GNU Arm Embedded Toolchain 9-2019-q4-update](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads) | ||
(Direct download link: | ||
[Linux](https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2) | ||
[Mac OS X](https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-mac.tar.bz2)) | ||
|
||
- Install additional tools used by the CHIP build: | ||
|
||
``` | ||
# Linux | ||
sudo apt-get install git make libtool ccache ninja-build | ||
``` | ||
|
||
``` | ||
# Mac OS X | ||
brew install libtool ccache ninja | ||
``` | ||
|
||
- Clone the [CHIP](https://github.com/project-chip/connectedhomeip) repo into | ||
a local directory | ||
|
||
``` | ||
cd ~ | ||
git clone https://github.com/project-chip/connectedhomeip.git | ||
``` | ||
|
||
- The Qorvo CHIP SDK is added as a submodule in /third_party/qpg_sdk/repo. To | ||
manually clone this repo you can clone it from | ||
[CHIP SDK](https://github.com/Qorvo/qpg-connectedhomeip) | ||
|
||
``` | ||
cd ~ | ||
git clone https://github.com/Qorvo/qpg-connectedhomeip | ||
``` | ||
|
||
### Compilation | ||
|
||
- Set the following environment variables before compilation: | ||
|
||
``` | ||
export ARM_GCC_INSTALL_ROOT=${HOME}/tools/gcc-arm-none-eabi-9-2019-q4-major/bin | ||
export PATH=$PATH:$ARM_GCC_INSTALL_ROOT | ||
export QPG6100_SDK_ROOT=${HOME}/qpg-connectedhomeip | ||
``` | ||
|
||
- All builds are GN/ninja based | ||
|
||
``` | ||
cd ~/connectedhomeip/examples/lock-app/qpg6100 | ||
gn gen out/debug | ||
ninja -C out/debug | ||
``` | ||
|
||
## Flashing the application | ||
|
||
The QPG6100 DK boards can be programmed using: | ||
|
||
### CMSIS-DAP Drag and Drop | ||
|
||
Drag/copy the hex-file generated to the mBED drive that appears when plugging in | ||
the DK board. | ||
|
||
### Segger JLink debugger | ||
|
||
Connect the Segger J-Link to the programming header and use the Segger SW to | ||
flash the .hex. | ||
|
||
More detailed information to be included in SDK Documentation. | ||
|
||
## Viewing Logging Output | ||
|
||
- Launch a serial terminal with baudrate 115200. | ||
- At startup you will see: | ||
|
||
``` | ||
qvCHIP v0.0.0.0 (CL:155586) running | ||
[P][-] Init CHIP Stack | ||
[P][DL] BLEManagerImpl::Init() complete | ||
[P][-] Starting Platform Manager Event Loop | ||
[P][-] ============================ | ||
[P][-] Qorvo Lock-app Launching | ||
[P][-] ============================ | ||
[D][DL] CHIP task running | ||
``` | ||
|
||
- Note! Logging is currently encapsulated by the Qorvo logging module. Output | ||
will have additional header and footer bytes. This will be updated later | ||
into a raw stream for any serial terminal to parse. |
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,18 @@ | ||
# 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. | ||
|
||
import("//build_overrides/chip.gni") | ||
import("${chip_root}/examples/platform/qpg6100/args.gni") | ||
|
||
qpg6100_sdk_target = get_label_info(":sdk", "label_no_toolchain") |
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 @@ | ||
../../build_overrides |
Oops, something went wrong.