diff --git a/.github/workflows/examples-qpg6100.yaml b/.github/workflows/examples-qpg.yaml similarity index 85% rename from .github/workflows/examples-qpg6100.yaml rename to .github/workflows/examples-qpg.yaml index e76e66527768e1..ddf5dec564202f 100644 --- a/.github/workflows/examples-qpg6100.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-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. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Build example - QPG6100 +name: Build example - QPG on: push: @@ -23,12 +23,12 @@ concurrency: cancel-in-progress: true jobs: - qpg6100: - name: QPG6100 + qpg: + name: QPG timeout-minutes: 60 env: - BUILD_TYPE: gn_qpg6100 + BUILD_TYPE: gn_qpg runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -63,11 +63,15 @@ jobs: - name: Build example QPG6100 Lock App timeout-minutes: 5 run: scripts/examples/gn_build_example.sh - examples/lock-app/qpg6100 out/lock_app_debug + examples/lock-app/qpg out/lock_app_debug qpg_target_ic=\"qpg6100\" - name: Build example QPG6100 Lighting App timeout-minutes: 5 run: scripts/examples/gn_build_example.sh - examples/lighting-app/qpg6100 out/lighting_app_debug + examples/lighting-app/qpg out/lighting_app_debug qpg_target_ic=\"qpg6100\" + - name: Build example QPG6100 persistent-storage + timeout-minutes: 5 + run: scripts/examples/gn_build_example.sh + examples/persistent-storage/qpg out/persistent-storage_app_debug qpg_target_ic=\"qpg6100\" - name: Binary artifact suffix id: outsuffix uses: haya14busa/action-cond@v1.0.0 diff --git a/.vscode/tasks.json b/.vscode/tasks.json index d4a03ab8a0b578..2af12e1f41521b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -117,7 +117,7 @@ { "label": "Build QPG6100 Lock Example", "type": "shell", - "command": "scripts/examples/gn_build_example.sh examples/lock-app/qpg6100 out/qpg6100_lock_app", + "command": "scripts/examples/gn_build_example.sh examples/lock-app/qpg out/qpg6100_lock_app qpg6100", "group": "build", "problemMatcher": { "base": "$gcc", diff --git a/BUILD.gn b/BUILD.gn index a24dfeefe04255..24ba1bf13e2f19 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -166,8 +166,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { # Set this to true to enable efr32 builds by default. enable_efr32_builds = false - # Set this to true to enable qpg6100 builds by default. - enable_qpg6100_builds = false + # Set this to true to enable Qorvo qpg builds by default. + enable_qpg_builds = false # Set this to true to enable k32w builds by default. enable_k32w_builds = false @@ -216,8 +216,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { # Build the efr32 lock app example. enable_efr32_lock_app_build = enable_efr32_builds - # Build the qpg6100 lock app example. - enable_qpg6100_lock_app_build = enable_qpg6100_builds && !is_debug + # Build the qpgxxxx lock app example. + enable_qpg_lock_app_build = enable_qpg_builds # Build the efr32 lighting app example. enable_efr32_lighting_app_build = enable_efr32_builds @@ -335,9 +335,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { } } - if (enable_qpg6100_lock_app_build) { - group("qpg6100_lock_app") { - deps = [ "${chip_root}/examples/lock-app/qpg6100(${chip_root}/config/qpg6100/toolchain:qpg6100_lock_app)" ] + if (enable_qpg_lock_app_build) { + group("qpg_lock_app") { + deps = [ "${chip_root}/examples/lock-app/qpg(${chip_root}/config/qpg/toolchain:qpg_lock_app)" ] } } @@ -429,8 +429,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (enable_k32w_shell_app_build) { deps += [ ":k32w_shell_app" ] } - if (enable_qpg6100_lock_app_build) { - deps += [ ":qpg6100_lock_app" ] + if (enable_qpg_lock_app_build) { + deps += [ ":qpg_lock_app" ] } if (enable_cc13x2x7_26x2x7_lock_app_build) { deps += [ ":cc13x2x7_26x2x7_lock_app" ] diff --git a/README.md b/README.md index 3c3df5783118a4..705fdf73999fa6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![Examples - EFR32](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20EFR32/badge.svg) ![Examples - nRF Connect SDK](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20nRF%20Connect%20SDK/badge.svg) -![Examples - QPG6100](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20QPG6100/badge.svg) +![Examples - QPG](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20QPG/badge.svg) ![Examples - Linux Standalone](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20Linux%20Standalone/badge.svg) ![Examples - ESP32](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20ESP32/badge.svg) ![Examples - K32W with SE051](https://github.com/project-chip/connectedhomeip/workflows/Build%20example%20-%20K32W%20with%20SE051/badge.svg) diff --git a/examples/build_overrides/qpg6100_sdk.gni b/build_overrides/qpg_sdk.gni similarity index 78% rename from examples/build_overrides/qpg6100_sdk.gni rename to build_overrides/qpg_sdk.gni index 4246dc1e1f9a85..317cf6fa2bd908 100644 --- a/examples/build_overrides/qpg6100_sdk.gni +++ b/build_overrides/qpg_sdk.gni @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-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. @@ -13,6 +13,6 @@ # limitations under the License. declare_args() { - # Root directory for QPG6100 SDK. - qpg6100_sdk_build_root = "//third_party/connectedhomeip/third_party/qpg_sdk" + # Root directory for Qorvo QPGxxxx SDK. + qpg_sdk_build_root = "//third_party/qpg_sdk" } diff --git a/config/qpg6100/toolchain/BUILD.gn b/config/qpg6100/toolchain/BUILD.gn index 3860a8eb083f8c..b7953bd98482a8 100644 --- a/config/qpg6100/toolchain/BUILD.gn +++ b/config/qpg6100/toolchain/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-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. @@ -17,9 +17,16 @@ import("//build_overrides/chip.gni") import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni") -arm_toolchain("qpg6100_lock_app") { +arm_toolchain("qpg_lock_app") { toolchain_args = { current_os = "freertos" - import("${chip_root}/examples/lock-app/qpg6100/args.gni") + import("${chip_root}/examples/lock-app/qpg/args.gni") + } +} + +arm_toolchain("qpg_lighting_app") { + toolchain_args = { + current_os = "freertos" + import("${chip_root}/examples/lighting-app/qpg/args.gni") } } diff --git a/build_overrides/qpg6100_sdk.gni b/examples/build_overrides/qpg_sdk.gni similarity index 84% rename from build_overrides/qpg6100_sdk.gni rename to examples/build_overrides/qpg_sdk.gni index 6a5d8556093145..f55168997b9e05 100644 --- a/build_overrides/qpg6100_sdk.gni +++ b/examples/build_overrides/qpg_sdk.gni @@ -13,6 +13,6 @@ # limitations under the License. declare_args() { - # Root directory for QPG6100 SDK. - qpg6100_sdk_build_root = "//third_party/qpg_sdk" + # Root directory for QPG SDK. + qpg_sdk_build_root = "//third_party/connectedhomeip/third_party/qpg_sdk" } diff --git a/examples/lighting-app/qpg6100/.gn b/examples/lighting-app/qpg/.gn similarity index 100% rename from examples/lighting-app/qpg6100/.gn rename to examples/lighting-app/qpg/.gn diff --git a/examples/lighting-app/qpg6100/APPLICATION.md b/examples/lighting-app/qpg/APPLICATION.md similarity index 100% rename from examples/lighting-app/qpg6100/APPLICATION.md rename to examples/lighting-app/qpg/APPLICATION.md diff --git a/examples/lighting-app/qpg6100/BUILD.gn b/examples/lighting-app/qpg/BUILD.gn similarity index 75% rename from examples/lighting-app/qpg6100/BUILD.gn rename to examples/lighting-app/qpg/BUILD.gn index 4fa610e8e2ae32..5632a0f96b0c4b 100644 --- a/examples/lighting-app/qpg6100/BUILD.gn +++ b/examples/lighting-app/qpg/BUILD.gn @@ -15,31 +15,31 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("//build_overrides/openthread.gni") -import("//build_overrides/qpg6100_sdk.gni") +import("//build_overrides/qpg_sdk.gni") import("${build_root}/config/defaults.gni") -import("${qpg6100_sdk_build_root}/qpg6100_executable.gni") -import("${qpg6100_sdk_build_root}/qpg6100_sdk.gni") +import("${qpg_sdk_build_root}/qpg_executable.gni") +import("${qpg_sdk_build_root}/qpg_sdk.gni") assert(current_os == "freertos") -qpg6100_project_dir = "${chip_root}/examples/lighting-app/qpg6100" -examples_plat_dir = "${chip_root}/examples/platform/qpg6100" +qpg_project_dir = "${chip_root}/examples/lighting-app/qpg" +examples_plat_dir = "${chip_root}/examples/platform/qpg" -qpg6100_sdk("sdk") { +qpg_sdk("sdk") { sources = [ "${examples_plat_dir}/app/include/Service.h", "${examples_plat_dir}/project_include/CHIPProjectConfig.h", ] include_dirs = [ - "${chip_root}/src/platform/qpg6100", + "${chip_root}/src/platform/qpg", "${examples_plat_dir}/project_include", ] } -qpg6100_executable("lighting_app") { - output_name = "chip-qpg6100-lighting-example.out" +qpg_executable("lighting_app") { + output_name = "chip-${qpg_target_ic}-lighting-example.out" sources = [ "${examples_plat_dir}/app/main.cpp", @@ -62,12 +62,12 @@ qpg6100_executable("lighting_app") { cflags = [ "-Wconversion" ] include_dirs = [ - "${qpg6100_project_dir}/include/", + "${qpg_project_dir}/include/", "${examples_plat_dir}", "${examples_plat_dir}/app/include", ] - ldscript = "${qpg6100_sdk_root}/qpg6100/ldscripts/chip-qpg6100-example.ld" + ldscript = "${qpg_sdk_root}/${qpg_target_ic}/ldscripts/chip-${qpg_target_ic}-example.ld" inputs = [ ldscript ] @@ -76,10 +76,10 @@ qpg6100_executable("lighting_app") { output_dir = root_out_dir } -group("qpg6100") { +group("qpg") { deps = [ ":lighting_app" ] } group("default") { - deps = [ ":qpg6100" ] + deps = [ ":qpg" ] } diff --git a/examples/lighting-app/qpg/README.md b/examples/lighting-app/qpg/README.md new file mode 120000 index 00000000000000..dfb11955dc29c0 --- /dev/null +++ b/examples/lighting-app/qpg/README.md @@ -0,0 +1 @@ +../../platform/qpg/README.md \ No newline at end of file diff --git a/examples/lighting-app/qpg6100/args.gni b/examples/lighting-app/qpg/args.gni similarity index 83% rename from examples/lighting-app/qpg6100/args.gni rename to examples/lighting-app/qpg/args.gni index 38f955bb59c89b..8a90e0c6e66dbc 100644 --- a/examples/lighting-app/qpg6100/args.gni +++ b/examples/lighting-app/qpg/args.gni @@ -13,6 +13,6 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("${chip_root}/examples/platform/qpg6100/args.gni") +import("${chip_root}/examples/platform/qpg/args.gni") -qpg6100_sdk_target = get_label_info(":sdk", "label_no_toolchain") +qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") diff --git a/examples/lighting-app/qpg6100/build_overrides b/examples/lighting-app/qpg/build_overrides similarity index 100% rename from examples/lighting-app/qpg6100/build_overrides rename to examples/lighting-app/qpg/build_overrides diff --git a/examples/lighting-app/qpg6100/include/AppConfig.h b/examples/lighting-app/qpg/include/AppConfig.h similarity index 100% rename from examples/lighting-app/qpg6100/include/AppConfig.h rename to examples/lighting-app/qpg/include/AppConfig.h diff --git a/examples/lighting-app/qpg6100/include/AppEvent.h b/examples/lighting-app/qpg/include/AppEvent.h similarity index 100% rename from examples/lighting-app/qpg6100/include/AppEvent.h rename to examples/lighting-app/qpg/include/AppEvent.h diff --git a/examples/lighting-app/qpg6100/include/AppTask.h b/examples/lighting-app/qpg/include/AppTask.h similarity index 100% rename from examples/lighting-app/qpg6100/include/AppTask.h rename to examples/lighting-app/qpg/include/AppTask.h diff --git a/examples/lighting-app/qpg6100/include/LightingManager.h b/examples/lighting-app/qpg/include/LightingManager.h similarity index 100% rename from examples/lighting-app/qpg6100/include/LightingManager.h rename to examples/lighting-app/qpg/include/LightingManager.h diff --git a/examples/lighting-app/qpg6100/src/AppTask.cpp b/examples/lighting-app/qpg/src/AppTask.cpp similarity index 99% rename from examples/lighting-app/qpg6100/src/AppTask.cpp rename to examples/lighting-app/qpg/src/AppTask.cpp index d8d7e8d23b8416..1e183d0a447635 100644 --- a/examples/lighting-app/qpg6100/src/AppTask.cpp +++ b/examples/lighting-app/qpg/src/AppTask.cpp @@ -40,7 +40,7 @@ using namespace chip::DeviceLayer; #if CHIP_ENABLE_OPENTHREAD #include #include -#include +#include #define JOINER_START_TRIGGER_TIMEOUT 1500 #endif diff --git a/examples/lighting-app/qpg6100/src/LightingManager.cpp b/examples/lighting-app/qpg/src/LightingManager.cpp similarity index 100% rename from examples/lighting-app/qpg6100/src/LightingManager.cpp rename to examples/lighting-app/qpg/src/LightingManager.cpp diff --git a/examples/lighting-app/qpg6100/src/ZclCallbacks.cpp b/examples/lighting-app/qpg/src/ZclCallbacks.cpp similarity index 100% rename from examples/lighting-app/qpg6100/src/ZclCallbacks.cpp rename to examples/lighting-app/qpg/src/ZclCallbacks.cpp diff --git a/examples/lighting-app/qpg6100/third_party/connectedhomeip b/examples/lighting-app/qpg/third_party/connectedhomeip similarity index 100% rename from examples/lighting-app/qpg6100/third_party/connectedhomeip rename to examples/lighting-app/qpg/third_party/connectedhomeip diff --git a/examples/lock-app/qpg6100/.gn b/examples/lock-app/qpg/.gn similarity index 100% rename from examples/lock-app/qpg6100/.gn rename to examples/lock-app/qpg/.gn diff --git a/examples/lock-app/qpg6100/APPLICATION.md b/examples/lock-app/qpg/APPLICATION.md similarity index 100% rename from examples/lock-app/qpg6100/APPLICATION.md rename to examples/lock-app/qpg/APPLICATION.md diff --git a/examples/lock-app/qpg6100/BUILD.gn b/examples/lock-app/qpg/BUILD.gn similarity index 76% rename from examples/lock-app/qpg6100/BUILD.gn rename to examples/lock-app/qpg/BUILD.gn index fb612d52591046..bbbf67aa5a6569 100644 --- a/examples/lock-app/qpg6100/BUILD.gn +++ b/examples/lock-app/qpg/BUILD.gn @@ -15,31 +15,31 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("//build_overrides/openthread.gni") -import("//build_overrides/qpg6100_sdk.gni") +import("//build_overrides/qpg_sdk.gni") import("${build_root}/config/defaults.gni") -import("${qpg6100_sdk_build_root}/qpg6100_executable.gni") -import("${qpg6100_sdk_build_root}/qpg6100_sdk.gni") +import("${qpg_sdk_build_root}/qpg_executable.gni") +import("${qpg_sdk_build_root}/qpg_sdk.gni") assert(current_os == "freertos") -qpg6100_project_dir = "${chip_root}/examples/lock-app/qpg6100" -examples_plat_dir = "${chip_root}/examples/platform/qpg6100" +qpg_project_dir = "${chip_root}/examples/lock-app/qpg" +examples_plat_dir = "${chip_root}/examples/platform/qpg" -qpg6100_sdk("sdk") { +qpg_sdk("sdk") { sources = [ "${examples_plat_dir}/app/include/Service.h", "${examples_plat_dir}/project_include/CHIPProjectConfig.h", ] include_dirs = [ - "${chip_root}/src/platform/qpg6100", + "${chip_root}/src/platform/qpg", "${examples_plat_dir}/project_include", ] } -qpg6100_executable("lock_app") { - output_name = "chip-qpg6100-lock-example.out" +qpg_executable("lock_app") { + output_name = "chip-${qpg_target_ic}-lock-example.out" sources = [ "${examples_plat_dir}/app/main.cpp", @@ -60,14 +60,14 @@ qpg6100_executable("lock_app") { ] include_dirs = [ - "${qpg6100_project_dir}/include", + "${qpg_project_dir}/include", "${examples_plat_dir}", "${examples_plat_dir}/app/include", ] cflags = [ "-Wconversion" ] - ldscript = "${qpg6100_sdk_root}/qpg6100/ldscripts/chip-qpg6100-example.ld" + ldscript = "${qpg_sdk_root}/${qpg_target_ic}/ldscripts/chip-${qpg_target_ic}-example.ld" inputs = [ ldscript ] @@ -76,10 +76,10 @@ qpg6100_executable("lock_app") { output_dir = root_out_dir } -group("qpg6100") { +group("qpg") { deps = [ ":lock_app" ] } group("default") { - deps = [ ":qpg6100" ] + deps = [ ":qpg" ] } diff --git a/examples/lock-app/qpg/README.md b/examples/lock-app/qpg/README.md new file mode 120000 index 00000000000000..dfb11955dc29c0 --- /dev/null +++ b/examples/lock-app/qpg/README.md @@ -0,0 +1 @@ +../../platform/qpg/README.md \ No newline at end of file diff --git a/examples/lock-app/qpg6100/args.gni b/examples/lock-app/qpg/args.gni similarity index 83% rename from examples/lock-app/qpg6100/args.gni rename to examples/lock-app/qpg/args.gni index 38f955bb59c89b..8a90e0c6e66dbc 100644 --- a/examples/lock-app/qpg6100/args.gni +++ b/examples/lock-app/qpg/args.gni @@ -13,6 +13,6 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("${chip_root}/examples/platform/qpg6100/args.gni") +import("${chip_root}/examples/platform/qpg/args.gni") -qpg6100_sdk_target = get_label_info(":sdk", "label_no_toolchain") +qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") diff --git a/examples/lock-app/qpg6100/build_overrides b/examples/lock-app/qpg/build_overrides similarity index 100% rename from examples/lock-app/qpg6100/build_overrides rename to examples/lock-app/qpg/build_overrides diff --git a/examples/lock-app/qpg6100/include/AppConfig.h b/examples/lock-app/qpg/include/AppConfig.h similarity index 100% rename from examples/lock-app/qpg6100/include/AppConfig.h rename to examples/lock-app/qpg/include/AppConfig.h diff --git a/examples/lock-app/qpg6100/include/AppEvent.h b/examples/lock-app/qpg/include/AppEvent.h similarity index 100% rename from examples/lock-app/qpg6100/include/AppEvent.h rename to examples/lock-app/qpg/include/AppEvent.h diff --git a/examples/lock-app/qpg6100/include/AppTask.h b/examples/lock-app/qpg/include/AppTask.h similarity index 100% rename from examples/lock-app/qpg6100/include/AppTask.h rename to examples/lock-app/qpg/include/AppTask.h diff --git a/examples/lock-app/qpg6100/include/BoltLockManager.h b/examples/lock-app/qpg/include/BoltLockManager.h similarity index 100% rename from examples/lock-app/qpg6100/include/BoltLockManager.h rename to examples/lock-app/qpg/include/BoltLockManager.h diff --git a/examples/lock-app/qpg6100/src/AppTask.cpp b/examples/lock-app/qpg/src/AppTask.cpp similarity index 99% rename from examples/lock-app/qpg6100/src/AppTask.cpp rename to examples/lock-app/qpg/src/AppTask.cpp index 51a99718efa5e2..3acb54c3789d7f 100644 --- a/examples/lock-app/qpg6100/src/AppTask.cpp +++ b/examples/lock-app/qpg/src/AppTask.cpp @@ -41,7 +41,7 @@ using namespace chip::DeviceLayer; #if CHIP_ENABLE_OPENTHREAD #include #include -#include +#include #define JOINER_START_TRIGGER_TIMEOUT 1500 #endif diff --git a/examples/lock-app/qpg6100/src/BoltLockManager.cpp b/examples/lock-app/qpg/src/BoltLockManager.cpp similarity index 100% rename from examples/lock-app/qpg6100/src/BoltLockManager.cpp rename to examples/lock-app/qpg/src/BoltLockManager.cpp diff --git a/examples/lock-app/qpg6100/src/ZclCallbacks.cpp b/examples/lock-app/qpg/src/ZclCallbacks.cpp similarity index 100% rename from examples/lock-app/qpg6100/src/ZclCallbacks.cpp rename to examples/lock-app/qpg/src/ZclCallbacks.cpp diff --git a/examples/lock-app/qpg6100/third_party/connectedhomeip b/examples/lock-app/qpg/third_party/connectedhomeip similarity index 100% rename from examples/lock-app/qpg6100/third_party/connectedhomeip rename to examples/lock-app/qpg/third_party/connectedhomeip diff --git a/examples/persistent-storage/qpg6100/.gn b/examples/persistent-storage/qpg/.gn similarity index 100% rename from examples/persistent-storage/qpg6100/.gn rename to examples/persistent-storage/qpg/.gn diff --git a/examples/persistent-storage/qpg6100/APPLICATION.md b/examples/persistent-storage/qpg/APPLICATION.md similarity index 89% rename from examples/persistent-storage/qpg6100/APPLICATION.md rename to examples/persistent-storage/qpg/APPLICATION.md index c7b95028aa1872..56483fcd04515e 100644 --- a/examples/persistent-storage/qpg6100/APPLICATION.md +++ b/examples/persistent-storage/qpg/APPLICATION.md @@ -4,7 +4,7 @@ An example application showing the use of key value storage API on the Qorvo QPG6100. More detailed information to be included in -[SDK Documentation](../../platform/qpg6100/README.md). +[SDK Documentation](../../platform/qpg/README.md). ## Persistent-storage-app @@ -25,8 +25,7 @@ This application does not have any LED output. ## Logging Output -- See - [View Logging Output](../../platform/qpg6100/README.md#view-logging-output) +- See [View Logging Output](../../platform/qpg/README.md#view-logging-output) - At startup you will see: ``` diff --git a/examples/persistent-storage/qpg6100/BUILD.gn b/examples/persistent-storage/qpg/BUILD.gn similarity index 61% rename from examples/persistent-storage/qpg6100/BUILD.gn rename to examples/persistent-storage/qpg/BUILD.gn index ab7a7da80c8a01..907dfba90e9a1b 100644 --- a/examples/persistent-storage/qpg6100/BUILD.gn +++ b/examples/persistent-storage/qpg/BUILD.gn @@ -14,33 +14,33 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") -import("//build_overrides/qpg6100_sdk.gni") +import("//build_overrides/qpg_sdk.gni") import("${build_root}/config/defaults.gni") -import("${qpg6100_sdk_build_root}/qpg6100_executable.gni") -import("${qpg6100_sdk_build_root}/qpg6100_sdk.gni") +import("${qpg_sdk_build_root}/qpg_executable.gni") +import("${qpg_sdk_build_root}/qpg_sdk.gni") assert(current_os == "freertos") -qpg6100_project_dir = "${chip_root}/examples/persistent-storage/qpg6100" -examples_plat_dir = "${chip_root}/examples/platform/qpg6100" +qpg_project_dir = "${chip_root}/examples/persistent-storage/qpg" +examples_plat_dir = "${chip_root}/examples/platform/qpg" -qpg6100_sdk("sdk") { +qpg_sdk("sdk") { include_dirs = [ - "${chip_root}/src/platform/qpg6100", + "${chip_root}/src/platform/qpg", "${examples_plat_dir}/project_include", ] - sources = [ "${qpg6100_project_dir}/include/CHIPProjectConfig.h" ] + sources = [ "${examples_plat_dir}/project_include/CHIPProjectConfig.h" ] defines = [] } -qpg6100_executable("persistent_storage") { - include_dirs = [ "${qpg6100_project_dir}/.." ] +qpg_executable("persistent_storage") { + include_dirs = [ "${qpg_project_dir}/.." ] defines = [] - output_name = "chip-qpg6100-persistent_storage-example.out" + output_name = "chip-${qpg_target_ic}-persistent_storage-example.out" deps = [] @@ -51,29 +51,29 @@ qpg6100_executable("persistent_storage") { ] include_dirs += [ - "${qpg6100_project_dir}/include", + "${qpg_project_dir}/include", "${examples_plat_dir}", "${examples_plat_dir}/app/include", ] sources = [ - "${qpg6100_project_dir}/../KeyValueStorageTest.cpp", + "${qpg_project_dir}/../KeyValueStorageTest.cpp", "main.cpp", ] output_dir = root_out_dir - ldscript = "${qpg6100_sdk_root}/qpg6100/ldscripts/chip-qpg6100-example.ld" + ldscript = "${qpg_sdk_root}/${qpg_target_ic}/ldscripts/chip-${qpg_target_ic}-example.ld" inputs = [ ldscript ] ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] } -group("qpg6100") { +group("qpg") { deps = [ ":persistent_storage" ] } group("default") { - deps = [ ":qpg6100" ] + deps = [ ":qpg" ] } diff --git a/examples/persistent-storage/qpg/README.md b/examples/persistent-storage/qpg/README.md new file mode 120000 index 00000000000000..dfb11955dc29c0 --- /dev/null +++ b/examples/persistent-storage/qpg/README.md @@ -0,0 +1 @@ +../../platform/qpg/README.md \ No newline at end of file diff --git a/examples/persistent-storage/qpg6100/args.gni b/examples/persistent-storage/qpg/args.gni similarity index 83% rename from examples/persistent-storage/qpg6100/args.gni rename to examples/persistent-storage/qpg/args.gni index 468fee824fccfb..b0d121b1029802 100644 --- a/examples/persistent-storage/qpg6100/args.gni +++ b/examples/persistent-storage/qpg/args.gni @@ -14,5 +14,5 @@ import("//build_overrides/chip.gni") -import("${chip_root}/examples/platform/qpg6100/args.gni") -qpg6100_sdk_target = get_label_info(":sdk", "label_no_toolchain") +import("${chip_root}/examples/platform/qpg/args.gni") +qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") diff --git a/examples/persistent-storage/qpg6100/build_overrides b/examples/persistent-storage/qpg/build_overrides similarity index 100% rename from examples/persistent-storage/qpg6100/build_overrides rename to examples/persistent-storage/qpg/build_overrides diff --git a/examples/persistent-storage/qpg6100/main.cpp b/examples/persistent-storage/qpg/main.cpp similarity index 100% rename from examples/persistent-storage/qpg6100/main.cpp rename to examples/persistent-storage/qpg/main.cpp diff --git a/examples/persistent-storage/qpg6100/third_party/connectedhomeip b/examples/persistent-storage/qpg/third_party/connectedhomeip similarity index 100% rename from examples/persistent-storage/qpg6100/third_party/connectedhomeip rename to examples/persistent-storage/qpg/third_party/connectedhomeip diff --git a/examples/persistent-storage/qpg6100/README.md b/examples/persistent-storage/qpg6100/README.md deleted file mode 100644 index c32a75b0c45547..00000000000000 --- a/examples/persistent-storage/qpg6100/README.md +++ /dev/null @@ -1,130 +0,0 @@ -# CHIP QPG6100 Example Application - -An example application showing the use -[CHIP](https://github.com/project-chip/connectedhomeip) on the Qorvo QPG6100. - ---- - -- [CHIP QPG6100 Example Application](#chip-qpg6100-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/QPG6100_DK_Board.jpg) - -Several example applications are provided to demonstrate a CHIP -device, with Thread connectivity, using BLE to perform CHIP provisioning -on the Qorvo QPG6100 SDK. More information about each application can be -found in the APPLICATION.md file found in the qpg6100 directory of the -example application directory - -Currently supported example applications - -- [~/examples/lighting-app/](../../../examples/lighting-app/qpg6100/APPLICATION.md) -- [~/examples/lock-app/](../../../examples/lock-app/qpg6100/APPLICATION.md) -- [~/examples/persistent-storage/](../../../examples/persistent-storage/qpg6100/APPLICATION.md) - -For more information on Qorvo and the platforms, please visit -[the Qorvo website](http://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 -``` - -- Optionally, to use a different version of the QPG6100 SDK from the one - bundled with CHIP: - -``` -export QPG6100_SDK_ROOT=${HOME}/qpg-connectedhomeip -``` - -- All builds are GN/ninja based - -``` -cd ~/connectedhomeip/examples/[lighting|lock]-app/qpg6100 -source third_party/connectedhomeip/scripts/activate.sh -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 [Application Name] Launching -[P][-] ================================== -[D][DL] CHIP task running -``` diff --git a/examples/platform/cc13x2_26x2/BUILD.gn b/examples/platform/cc13x2_26x2/BUILD.gn index 11b4a300755c60..a886bd6ee48c63 100644 --- a/examples/platform/cc13x2_26x2/BUILD.gn +++ b/examples/platform/cc13x2_26x2/BUILD.gn @@ -18,14 +18,7 @@ config("chip_examples_project_config") { include_dirs = [ "project_include" ] } -# TODO - create OpenThread portion of build flow -# https://github.com/project-chip/connectedhomeip/issues/2939 - source_set("openthread_core_config_cc13x2_26x2_chip_examples") { sources = [ "project_include/OpenThreadConfig.h" ] - - # public_deps = [ - # "${chip_root}/third_party/openthread/platforms/qpg6100:openthread_core_config_qpg6100" - # ] public_configs = [ ":chip_examples_project_config" ] } diff --git a/examples/platform/qpg6100/BUILD.gn b/examples/platform/qpg/BUILD.gn similarity index 70% rename from examples/platform/qpg6100/BUILD.gn rename to examples/platform/qpg/BUILD.gn index 05451c6d6f1905..49f2be28f2c616 100644 --- a/examples/platform/qpg6100/BUILD.gn +++ b/examples/platform/qpg/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-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. @@ -13,20 +13,20 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("//build_overrides/qpg6100_sdk.gni") +import("//build_overrides/qpg_sdk.gni") -import("${qpg6100_sdk_build_root}/qpg6100_sdk.gni") +import("${qpg_sdk_build_root}/qpg_sdk.gni") config("chip_examples_project_config") { include_dirs = [ "project_include" ] } -source_set("openthread_core_config_qpg6100_chip_examples") { +source_set("openthread_core_config_qpg_chip_examples") { sources = [ "project_include/OpenThreadConfig.h" ] public_deps = [ - "${chip_root}/third_party/openthread/platforms/qpg6100:openthread_core_config_qpg6100", - "${qpg6100_sdk_build_root}:qpg6100_sdk", + "${chip_root}/third_party/openthread/platforms/qpg:openthread_core_config_qpg", + "${qpg_sdk_build_root}:qpg_sdk", ] public_configs = [ ":chip_examples_project_config" ] diff --git a/examples/platform/qpg6100/README.md b/examples/platform/qpg/README.md similarity index 100% rename from examples/platform/qpg6100/README.md rename to examples/platform/qpg/README.md diff --git a/examples/platform/qpg6100/app/include/Service.h b/examples/platform/qpg/app/include/Service.h similarity index 100% rename from examples/platform/qpg6100/app/include/Service.h rename to examples/platform/qpg/app/include/Service.h diff --git a/examples/platform/qpg6100/app/main.cpp b/examples/platform/qpg/app/main.cpp similarity index 100% rename from examples/platform/qpg6100/app/main.cpp rename to examples/platform/qpg/app/main.cpp diff --git a/examples/platform/qpg6100/args.gni b/examples/platform/qpg/args.gni similarity index 85% rename from examples/platform/qpg6100/args.gni rename to examples/platform/qpg/args.gni index cd96c241aa2715..9f1b2b2607d092 100644 --- a/examples/platform/qpg6100/args.gni +++ b/examples/platform/qpg/args.gni @@ -14,11 +14,13 @@ import("//build_overrides/chip.gni") -import("${chip_root}/src/platform/qpg6100/args.gni") +import("${chip_root}/src/platform/qpg/args.gni") openthread_project_core_config_file = "OpenThreadConfig.h" openthread_core_config_deps = [] -openthread_core_config_deps = [ "${chip_root}/examples/platform/qpg6100:openthread_core_config_qpg6100_chip_examples" ] +openthread_core_config_deps = [ + "${chip_root}/examples/platform/qpg:openthread_core_config_qpg_chip_examples", +] chip_ble_project_config_include = "" chip_device_project_config_include = "" diff --git a/examples/platform/qpg6100/doc/QPG6100_DK_Board.jpg b/examples/platform/qpg/doc/QPG6100_DK_Board.jpg similarity index 100% rename from examples/platform/qpg6100/doc/QPG6100_DK_Board.jpg rename to examples/platform/qpg/doc/QPG6100_DK_Board.jpg diff --git a/examples/platform/qpg6100/project_include/CHIPProjectConfig.h b/examples/platform/qpg/project_include/CHIPProjectConfig.h similarity index 99% rename from examples/platform/qpg6100/project_include/CHIPProjectConfig.h rename to examples/platform/qpg/project_include/CHIPProjectConfig.h index 283678014212eb..0979059af69f48 100644 --- a/examples/platform/qpg6100/project_include/CHIPProjectConfig.h +++ b/examples/platform/qpg/project_include/CHIPProjectConfig.h @@ -64,7 +64,7 @@ /** * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID * - * 0x514C: qpg6100 lighting-app + * 0x514C: qpg lighting-app */ #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x514C diff --git a/examples/platform/qpg6100/project_include/OpenThreadConfig.h b/examples/platform/qpg/project_include/OpenThreadConfig.h similarity index 98% rename from examples/platform/qpg6100/project_include/OpenThreadConfig.h rename to examples/platform/qpg/project_include/OpenThreadConfig.h index 30bcab86e97bf3..05a2d2ce8333c0 100644 --- a/examples/platform/qpg6100/project_include/OpenThreadConfig.h +++ b/examples/platform/qpg/project_include/OpenThreadConfig.h @@ -26,7 +26,7 @@ // Disable the Qorvo-supplied OpenThread logging facilities and use // the facilities provided by the Device Layer (see -// src/platform/qpg6100/Logging.cpp). +// src/platform/qpg/Logging.cpp). #define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_APP // Turn on a moderate level of logging in OpenThread diff --git a/gn_build.sh b/gn_build.sh index a1a918e492fa9f..fb80957a6dbf88 100755 --- a/gn_build.sh +++ b/gn_build.sh @@ -97,8 +97,8 @@ shift $((OPTIND - 1)) for arg; do case $arg in - enable_qpg6100_builds=true) - qpg6100_enabled=1 + enable_qpg_builds=true) + qpg_enabled=1 ;; enable_efr32_builds=true) efr32_enabled=1 @@ -147,11 +147,11 @@ else fi echo -if [[ -z "$qpg6100_enabled" ]]; then - echo "Hint: Pass enable_qpg6100_builds=true to this script to enable building for QPG6100" +if [[ -z "$qpg_enabled" ]]; then + echo "Hint: Pass enable_qpg_builds=true to this script to enable building for QPG" else echo 'To build the QPG6100 lock sample as a standalone project:' - echo "(cd $CHIP_ROOT/examples/lock-app/qpg6100; gn gen out/debug; ninja -C out/debug)" + echo "(cd $CHIP_ROOT/examples/lock-app/qpg; gn gen out/debug; ninja -C out/debug)" fi echo diff --git a/scripts/flashing/qpg6100_firmware_utils.py b/scripts/flashing/qpg_firmware_utils.py similarity index 92% rename from scripts/flashing/qpg6100_firmware_utils.py rename to scripts/flashing/qpg_firmware_utils.py index 0d04baa61d49f4..7f0fd697e7e31f 100644 --- a/scripts/flashing/qpg6100_firmware_utils.py +++ b/scripts/flashing/qpg_firmware_utils.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2020 Project CHIP Authors +# Copyright (c) 2020-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. @@ -12,11 +12,11 @@ # 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. -"""Flash an QPG6100 device. +"""Flash a QPG device on a DK board. Currently only support CMSIS mBed Drag and Drop for public use. -usage: qpg6100_firmware_utils.py [-h] [--application FILE] [--drive DRIVE] +usage: qpg_firmware_utils.py [-h] [--application FILE] [--drive DRIVE] optional arguments: -h, --help show this help message and exit @@ -37,7 +37,7 @@ # Additional options that can be use to configure an `Flasher` # object (as dictionary keys) and/or passed as command line options. -QPG6100_OPTIONS = { +QPG_OPTIONS = { # Configuration options define properties used in flashing operations. 'configuration': { # Tool configuration options. @@ -57,8 +57,8 @@ class Flasher(firmware_utils.Flasher): """Manage flashing.""" def __init__(self, **options): - super().__init__(platform='QPG6100', module=__name__, **options) - self.define_options(QPG6100_OPTIONS) + super().__init__(platform='QPG', module=__name__, **options) + self.define_options(QPG_OPTIONS) def erase(self): """Not supported""" diff --git a/scripts/tools/memory/platform/qpg6100.cfg b/scripts/tools/memory/platform/qpg.cfg similarity index 97% rename from scripts/tools/memory/platform/qpg6100.cfg rename to scripts/tools/memory/platform/qpg.cfg index 842dfe6ceed0a2..97aea63fdfa051 100644 --- a/scripts/tools/memory/platform/qpg6100.cfg +++ b/scripts/tools/memory/platform/qpg.cfg @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Memory tools default configuation for Qorvo QPG6100. +# Memory tools default configuration for Qorvo QPG. { 'section': { diff --git a/src/lwip/BUILD.gn b/src/lwip/BUILD.gn index c60c1af985382b..26d7f9699f640a 100644 --- a/src/lwip/BUILD.gn +++ b/src/lwip/BUILD.gn @@ -30,7 +30,7 @@ if (lwip_platform == "") { assert(lwip_platform == "external" || lwip_platform == "standalone" || lwip_platform == "cc13x2_26x2" || lwip_platform == "efr32" || - lwip_platform == "k32w" || lwip_platform == "qpg6100" || + lwip_platform == "k32w" || lwip_platform == "qpg" || lwip_platform == "mbed", "Unsupported lwIP platform: ${lwip_platform}") @@ -45,8 +45,8 @@ if (lwip_platform == "cc13x2_26x2") { import("//build_overrides/ti_simplelink_sdk.gni") } else if (lwip_platform == "efr32") { import("//build_overrides/efr32_sdk.gni") -} else if (lwip_platform == "qpg6100") { - import("//build_overrides/qpg6100_sdk.gni") +} else if (lwip_platform == "qpg") { + import("//build_overrides/qpg_sdk.gni") } else if (lwip_platform == "k32w") { import("//build_overrides/k32w_sdk.gni") } @@ -113,8 +113,8 @@ if (current_os == "zephyr" || current_os == "mbed") { public_deps += [ "${ti_simplelink_sdk_build_root}:ti_simplelink_sdk" ] } else if (lwip_platform == "efr32") { public_deps += [ "${efr32_sdk_build_root}:efr32_sdk" ] - } else if (lwip_platform == "qpg6100") { - public_deps += [ "${qpg6100_sdk_build_root}:qpg6100_sdk" ] + } else if (lwip_platform == "qpg") { + public_deps += [ "${qpg_sdk_build_root}:qpg_sdk" ] } else if (lwip_platform == "standalone") { public_deps += [ "${chip_root}/src/lib/support" ] } else if (lwip_platform == "k32w") { diff --git a/src/lwip/qpg6100/arch/cc.h b/src/lwip/qpg/arch/cc.h similarity index 100% rename from src/lwip/qpg6100/arch/cc.h rename to src/lwip/qpg/arch/cc.h diff --git a/src/lwip/qpg6100/arch/perf.h b/src/lwip/qpg/arch/perf.h similarity index 100% rename from src/lwip/qpg6100/arch/perf.h rename to src/lwip/qpg/arch/perf.h diff --git a/src/lwip/qpg6100/lwipopts.h b/src/lwip/qpg/lwipopts.h similarity index 98% rename from src/lwip/qpg6100/lwipopts.h rename to src/lwip/qpg/lwipopts.h index 0c824891d880ce..1db3ccb248e874 100644 --- a/src/lwip/qpg6100/lwipopts.h +++ b/src/lwip/qpg/lwipopts.h @@ -18,7 +18,7 @@ /** * @file - * Compile-time configuration for LwIP on QPG6100 platforms. + * Compile-time configuration for LwIP on QPG platforms. * */ diff --git a/src/lwip/qpg6100/lwippools.h b/src/lwip/qpg/lwippools.h similarity index 100% rename from src/lwip/qpg6100/lwippools.h rename to src/lwip/qpg/lwippools.h diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 4c8fd3b8f32d99..3a18315173f8ac 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -154,10 +154,10 @@ if (chip_device_platform != "none") { "CHIP_DEVICE_LAYER_TARGET_NRFCONNECT=1", "CHIP_DEVICE_LAYER_TARGET=nrfconnect", ] - } else if (chip_device_platform == "qpg6100") { + } else if (chip_device_platform == "qpg") { defines += [ - "CHIP_DEVICE_LAYER_TARGET_QPG6100=1", - "CHIP_DEVICE_LAYER_TARGET=qpg6100", + "CHIP_DEVICE_LAYER_TARGET_QPG=1", + "CHIP_DEVICE_LAYER_TARGET=qpg", ] } else if (chip_device_platform == "k32w") { defines += [ @@ -599,44 +599,44 @@ if (chip_device_platform != "none" && chip_device_platform != "external") { "nrfconnect/NFCManagerImpl.h", ] } - } else if (chip_device_platform == "qpg6100") { + } else if (chip_device_platform == "qpg") { sources += [ "FreeRTOS/SystemTimeSupport.cpp", - "qpg6100/BLEManagerImpl.cpp", - "qpg6100/BLEManagerImpl.h", - "qpg6100/BlePlatformConfig.h", - "qpg6100/CHIPDevicePlatformConfig.h", - "qpg6100/CHIPDevicePlatformEvent.h", - "qpg6100/CHIPPlatformConfig.h", - "qpg6100/ConfigurationManagerImpl.cpp", - "qpg6100/ConfigurationManagerImpl.h", - "qpg6100/ConnectivityManagerImpl.cpp", - "qpg6100/ConnectivityManagerImpl.h", - "qpg6100/DeviceNetworkProvisioningDelegateImpl.cpp", - "qpg6100/DeviceNetworkProvisioningDelegateImpl.h", - "qpg6100/InetPlatformConfig.h", - "qpg6100/Logging.cpp", - "qpg6100/PlatformManagerImpl.cpp", - "qpg6100/PlatformManagerImpl.h", - "qpg6100/SystemPlatformConfig.h", - "qpg6100/qpg6100Config.cpp", - "qpg6100/qpg6100Config.h", + "qpg/BLEManagerImpl.cpp", + "qpg/BLEManagerImpl.h", + "qpg/BlePlatformConfig.h", + "qpg/CHIPDevicePlatformConfig.h", + "qpg/CHIPDevicePlatformEvent.h", + "qpg/CHIPPlatformConfig.h", + "qpg/ConfigurationManagerImpl.cpp", + "qpg/ConfigurationManagerImpl.h", + "qpg/ConnectivityManagerImpl.cpp", + "qpg/ConnectivityManagerImpl.h", + "qpg/DeviceNetworkProvisioningDelegateImpl.cpp", + "qpg/DeviceNetworkProvisioningDelegateImpl.h", + "qpg/InetPlatformConfig.h", + "qpg/Logging.cpp", + "qpg/PlatformManagerImpl.cpp", + "qpg/PlatformManagerImpl.h", + "qpg/SystemPlatformConfig.h", + "qpg/qpgConfig.cpp", + "qpg/qpgConfig.h", ] sources += [ - "qpg6100/KeyValueStoreManagerImpl.cpp", - "qpg6100/KeyValueStoreManagerImpl.h", + "qpg/KeyValueStoreManagerImpl.cpp", + "qpg/KeyValueStoreManagerImpl.h", ] if (chip_enable_openthread) { public_deps += [ "${openthread_root}:libopenthread-mtd" ] - public_configs += [ "${chip_root}/third_party/openthread/platforms/qpg6100:openthread_qpg6100_config" ] + public_configs += [ "${chip_root}/third_party/openthread/platforms/qpg:openthread_qpg_config" ] sources += [ "OpenThread/OpenThreadUtils.cpp", - "qpg6100/ThreadStackManagerImpl.cpp", - "qpg6100/ThreadStackManagerImpl.h", + "qpg/ThreadStackManagerImpl.cpp", + "qpg/ThreadStackManagerImpl.h", ] } } else if (chip_device_platform == "telink") { diff --git a/src/platform/device.gni b/src/platform/device.gni index 7cda71261b03c7..d5a3bbd5107c04 100644 --- a/src/platform/device.gni +++ b/src/platform/device.gni @@ -16,7 +16,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/src/ble/ble.gni") declare_args() { - # Device platform layer: cc13x2_26x2, darwin, efr32, esp32, external, freertos, linux, nrfconnect, k32w, qpg6100, none. + # Device platform layer: cc13x2_26x2, darwin, efr32, esp32, external, freertos, linux, nrfconnect, k32w, qpg, none. chip_device_platform = "auto" chip_platform_target = "" } @@ -34,7 +34,7 @@ if (chip_device_platform == "auto") { declare_args() { # Enable openthread support. chip_enable_openthread = - chip_device_platform == "linux" || chip_device_platform == "qpg6100" || + chip_device_platform == "linux" || chip_device_platform == "qpg" || chip_device_platform == "cc13x2_26x2" || chip_device_platform == "k32w" # Enable wifi support. @@ -76,8 +76,8 @@ if (chip_device_platform == "cc13x2_26x2") { _chip_device_layer = "Linux" } else if (chip_device_platform == "nrfconnect") { _chip_device_layer = "nrfconnect" -} else if (chip_device_platform == "qpg6100") { - _chip_device_layer = "qpg6100" +} else if (chip_device_platform == "qpg") { + _chip_device_layer = "qpg" } else if (chip_device_platform == "k32w") { _chip_device_layer = "K32W" } else if (chip_device_platform == "telink") { @@ -122,6 +122,6 @@ assert( chip_device_platform == "esp32" || chip_device_platform == "external" || chip_device_platform == "linux" || chip_device_platform == "nrfconnect" || - chip_device_platform == "k32w" || chip_device_platform == "qpg6100" || + chip_device_platform == "k32w" || chip_device_platform == "qpg" || chip_device_platform == "telink" || chip_device_platform == "mbed", "Please select a valid value for chip_device_platform") diff --git a/src/platform/qpg6100/BLEManagerImpl.cpp b/src/platform/qpg/BLEManagerImpl.cpp similarity index 99% rename from src/platform/qpg6100/BLEManagerImpl.cpp rename to src/platform/qpg/BLEManagerImpl.cpp index 24d4757f4b5d33..5b449e35ba5675 100644 --- a/src/platform/qpg6100/BLEManagerImpl.cpp +++ b/src/platform/qpg/BLEManagerImpl.cpp @@ -18,7 +18,7 @@ /** * @file * Provides an implementation of the BLEManager singleton object - * for the QPG6100 platform. + * for the Qorvo QPG platforms. */ /* this file behaves like a config.h, comes first */ #include diff --git a/src/platform/qpg6100/BLEManagerImpl.h b/src/platform/qpg/BLEManagerImpl.h similarity index 99% rename from src/platform/qpg6100/BLEManagerImpl.h rename to src/platform/qpg/BLEManagerImpl.h index e52e561e978d4b..4aefa0ae1a070e 100644 --- a/src/platform/qpg6100/BLEManagerImpl.h +++ b/src/platform/qpg/BLEManagerImpl.h @@ -18,7 +18,7 @@ /** * @file * Provides an implementation of the BLEManager singleton object - * for the QPG6100 platforms. + * for the Qorvo QPG platforms. */ #pragma once diff --git a/src/platform/qpg6100/BlePlatformConfig.h b/src/platform/qpg/BlePlatformConfig.h similarity index 96% rename from src/platform/qpg6100/BlePlatformConfig.h rename to src/platform/qpg/BlePlatformConfig.h index 4e7fd64b3d3391..44f4979e7035eb 100644 --- a/src/platform/qpg6100/BlePlatformConfig.h +++ b/src/platform/qpg/BlePlatformConfig.h @@ -18,7 +18,7 @@ /** * @file * Platform-specific configuration overrides for the CHIP BLE - * Layer on QPG6100 platforms. + * Layer on Qorvo QPG platforms. * */ diff --git a/src/platform/qpg6100/CHIPDevicePlatformConfig.h b/src/platform/qpg/CHIPDevicePlatformConfig.h similarity index 98% rename from src/platform/qpg6100/CHIPDevicePlatformConfig.h rename to src/platform/qpg/CHIPDevicePlatformConfig.h index 9a55d627293b99..69cadc40dd0615 100644 --- a/src/platform/qpg6100/CHIPDevicePlatformConfig.h +++ b/src/platform/qpg/CHIPDevicePlatformConfig.h @@ -18,7 +18,7 @@ /** * @file * Platform-specific configuration overrides for the chip Device Layer - * on QPG6100 platforms. + * on Qorvo QPG platforms. */ #pragma once diff --git a/src/platform/qpg6100/CHIPDevicePlatformEvent.h b/src/platform/qpg/CHIPDevicePlatformEvent.h similarity index 97% rename from src/platform/qpg6100/CHIPDevicePlatformEvent.h rename to src/platform/qpg/CHIPDevicePlatformEvent.h index d62a458a144345..49cfb611f96dff 100644 --- a/src/platform/qpg6100/CHIPDevicePlatformEvent.h +++ b/src/platform/qpg/CHIPDevicePlatformEvent.h @@ -18,7 +18,7 @@ /** * @file * Defines platform-specific event types and data for the chip - * Device Layer on QPG6100 platforms. + * Device Layer on Qorvo QPG platforms. */ #pragma once diff --git a/src/platform/qpg6100/CHIPPlatformConfig.h b/src/platform/qpg/CHIPPlatformConfig.h similarity index 99% rename from src/platform/qpg6100/CHIPPlatformConfig.h rename to src/platform/qpg/CHIPPlatformConfig.h index 9b3f9d442eddd4..70644382ea9513 100644 --- a/src/platform/qpg6100/CHIPPlatformConfig.h +++ b/src/platform/qpg/CHIPPlatformConfig.h @@ -18,7 +18,7 @@ /** * @file * Platform-specific configuration overrides for CHIP on - * QPG6100 platforms. + * Qorvo QPG platforms. */ #pragma once diff --git a/src/platform/qpg6100/ConfigurationManagerImpl.cpp b/src/platform/qpg/ConfigurationManagerImpl.cpp similarity index 98% rename from src/platform/qpg6100/ConfigurationManagerImpl.cpp rename to src/platform/qpg/ConfigurationManagerImpl.cpp index eea5826b90822d..f6af8fc81bcb1c 100644 --- a/src/platform/qpg6100/ConfigurationManagerImpl.cpp +++ b/src/platform/qpg/ConfigurationManagerImpl.cpp @@ -18,7 +18,7 @@ /** * @file * Provides the implementation of the Device Layer ConfigurationManager object - * for QPG6100 platforms . + * for Qorvo QPG platforms. */ /* this file behaves like a config.h, comes first */ #include @@ -27,7 +27,7 @@ #include #include -#include +#include #if CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING #include diff --git a/src/platform/qpg6100/ConfigurationManagerImpl.h b/src/platform/qpg/ConfigurationManagerImpl.h similarity index 95% rename from src/platform/qpg6100/ConfigurationManagerImpl.h rename to src/platform/qpg/ConfigurationManagerImpl.h index 95ae6ce6c96007..f80ee3ee5363a7 100644 --- a/src/platform/qpg6100/ConfigurationManagerImpl.h +++ b/src/platform/qpg/ConfigurationManagerImpl.h @@ -18,13 +18,13 @@ /** * @file * Provides an implementation of the ConfigurationManager object - * for QPG6100 platforms. + * for Qorvo QPG platforms. */ #pragma once #include -#include +#include namespace chip { namespace DeviceLayer { @@ -34,7 +34,7 @@ namespace DeviceLayer { */ class ConfigurationManagerImpl final : public ConfigurationManager, public Internal::GenericConfigurationManagerImpl, - private Internal::QPG6100Config + private Internal::QPGConfig { // Allow the ConfigurationManager interface class to delegate method calls to // the implementation methods provided by this class. diff --git a/src/platform/qpg6100/ConnectivityManagerImpl.cpp b/src/platform/qpg/ConnectivityManagerImpl.cpp similarity index 100% rename from src/platform/qpg6100/ConnectivityManagerImpl.cpp rename to src/platform/qpg/ConnectivityManagerImpl.cpp diff --git a/src/platform/qpg6100/ConnectivityManagerImpl.h b/src/platform/qpg/ConnectivityManagerImpl.h similarity index 99% rename from src/platform/qpg6100/ConnectivityManagerImpl.h rename to src/platform/qpg/ConnectivityManagerImpl.h index 1a4489f8205107..72e2511871bbbe 100644 --- a/src/platform/qpg6100/ConnectivityManagerImpl.h +++ b/src/platform/qpg/ConnectivityManagerImpl.h @@ -41,7 +41,7 @@ namespace chip { namespace DeviceLayer { /** - * Concrete implementation of the ConnectivityManager singleton object for Qorvo QPG6100 platforms. + * Concrete implementation of the ConnectivityManager singleton object for Qorvo QPG platforms. */ class ConnectivityManagerImpl final : public ConnectivityManager, public Internal::GenericConnectivityManagerImpl, diff --git a/src/platform/qpg6100/DeviceNetworkProvisioningDelegateImpl.cpp b/src/platform/qpg/DeviceNetworkProvisioningDelegateImpl.cpp similarity index 100% rename from src/platform/qpg6100/DeviceNetworkProvisioningDelegateImpl.cpp rename to src/platform/qpg/DeviceNetworkProvisioningDelegateImpl.cpp diff --git a/src/platform/qpg6100/DeviceNetworkProvisioningDelegateImpl.h b/src/platform/qpg/DeviceNetworkProvisioningDelegateImpl.h similarity index 100% rename from src/platform/qpg6100/DeviceNetworkProvisioningDelegateImpl.h rename to src/platform/qpg/DeviceNetworkProvisioningDelegateImpl.h diff --git a/src/platform/qpg6100/Entropy.cpp b/src/platform/qpg/Entropy.cpp similarity index 97% rename from src/platform/qpg6100/Entropy.cpp rename to src/platform/qpg/Entropy.cpp index 9c6f87bbf5ff72..0851593ba2abd2 100644 --- a/src/platform/qpg6100/Entropy.cpp +++ b/src/platform/qpg/Entropy.cpp @@ -18,7 +18,7 @@ /** * @file * Provides implementations for the chip entropy sourcing functions - * on QPG6100 platforms. + * on Qorvo QPG platforms. */ // @@ -50,7 +50,7 @@ using namespace ::chip; #if !CHIP_CONFIG_RNG_IMPLEMENTATION_CHIPDRBG -#error "CHIP DRBG implementation must be enabled on QPG6100 platforms" +#error "CHIP DRBG implementation must be enabled on Qorvo QPG platforms" #endif // !CHIP_CONFIG_RNG_IMPLEMENTATION_CHIPDRBG namespace chip { diff --git a/src/platform/qpg6100/GroupKeyStoreImpl.cpp b/src/platform/qpg/GroupKeyStoreImpl.cpp similarity index 99% rename from src/platform/qpg6100/GroupKeyStoreImpl.cpp rename to src/platform/qpg/GroupKeyStoreImpl.cpp index 79da3495f63ac3..79be589f96e4c8 100644 --- a/src/platform/qpg6100/GroupKeyStoreImpl.cpp +++ b/src/platform/qpg/GroupKeyStoreImpl.cpp @@ -18,12 +18,12 @@ /** * @file * Provides an implementation of the CHIP GroupKeyStore interface - * for Qorvo platforms. + * for Qorvo QPG platforms. */ #include -#include +#include using namespace ::chip; using namespace ::chip::Profiles::Security::AppKeys; diff --git a/src/platform/qpg6100/GroupKeyStoreImpl.h b/src/platform/qpg/GroupKeyStoreImpl.h similarity index 95% rename from src/platform/qpg6100/GroupKeyStoreImpl.h rename to src/platform/qpg/GroupKeyStoreImpl.h index 5d755563deb4b4..86ecfa01c0cdcc 100644 --- a/src/platform/qpg6100/GroupKeyStoreImpl.h +++ b/src/platform/qpg/GroupKeyStoreImpl.h @@ -18,12 +18,12 @@ /** * @file * Provides an implementation of the chip Group Key Store interface - * for Qorvo QPG6100 platforms. + * for Qorvo QPG platforms. */ #include #include -#include +#include namespace chip { namespace DeviceLayer { @@ -49,7 +49,7 @@ class ChipGroupKey /** * An implementation of the chip GroupKeyStoreBase API for this platform. */ -class GroupKeyStoreImpl final : public ::chip::Profiles::Security::AppKeys::GroupKeyStoreBase, private QPG6100Config +class GroupKeyStoreImpl final : public ::chip::Profiles::Security::AppKeys::GroupKeyStoreBase, private QPGConfig { using ChipGroupKey = ::chip::Profiles::Security::AppKeys::ChipGroupKey; diff --git a/src/platform/qpg6100/InetPlatformConfig.h b/src/platform/qpg/InetPlatformConfig.h similarity index 96% rename from src/platform/qpg6100/InetPlatformConfig.h rename to src/platform/qpg/InetPlatformConfig.h index 037aebb4ad8461..fdef7e89e985e8 100644 --- a/src/platform/qpg6100/InetPlatformConfig.h +++ b/src/platform/qpg/InetPlatformConfig.h @@ -18,7 +18,7 @@ /** * @file * Platform-specific configuration overrides for the Openchip Inet - * Layer on QPG6100 platforms. + * Layer on Qorvo QPG platforms. * */ diff --git a/src/platform/qpg6100/KeyValueStoreManagerImpl.cpp b/src/platform/qpg/KeyValueStoreManagerImpl.cpp similarity index 96% rename from src/platform/qpg6100/KeyValueStoreManagerImpl.cpp rename to src/platform/qpg/KeyValueStoreManagerImpl.cpp index b363edc43d2761..393a2887a77c3e 100644 --- a/src/platform/qpg6100/KeyValueStoreManagerImpl.cpp +++ b/src/platform/qpg/KeyValueStoreManagerImpl.cpp @@ -18,7 +18,8 @@ /** * @file - * Platform-specific key value storage implementation for QPG6100 + * Platform-specific key value storage implementation + * for Qorvo QPG platforms */ #include diff --git a/src/platform/qpg6100/KeyValueStoreManagerImpl.h b/src/platform/qpg/KeyValueStoreManagerImpl.h similarity index 96% rename from src/platform/qpg6100/KeyValueStoreManagerImpl.h rename to src/platform/qpg/KeyValueStoreManagerImpl.h index e80759e050af6a..f44bf34d0279e3 100644 --- a/src/platform/qpg6100/KeyValueStoreManagerImpl.h +++ b/src/platform/qpg/KeyValueStoreManagerImpl.h @@ -18,7 +18,8 @@ /** * @file - * Platform-specific key value storage implementation for QPG6100. + * Platform-specific key value storage implementation + * for Qorvo QPG platforms */ #pragma once diff --git a/src/platform/qpg6100/Logging.cpp b/src/platform/qpg/Logging.cpp similarity index 100% rename from src/platform/qpg6100/Logging.cpp rename to src/platform/qpg/Logging.cpp diff --git a/src/platform/qpg6100/PlatformManagerImpl.cpp b/src/platform/qpg/PlatformManagerImpl.cpp similarity index 95% rename from src/platform/qpg6100/PlatformManagerImpl.cpp rename to src/platform/qpg/PlatformManagerImpl.cpp index dba3664d243c9c..1820914c306e58 100644 --- a/src/platform/qpg6100/PlatformManagerImpl.cpp +++ b/src/platform/qpg/PlatformManagerImpl.cpp @@ -18,7 +18,7 @@ /** * @file * Provides an implementation of the PlatformManager object - * for QPG6100 platforms + * for Qorvo QPG platforms */ /* this file behaves like a config.h, comes first */ #include @@ -38,7 +38,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) CHIP_ERROR err; // Initialize the configuration system. - err = Internal::QPG6100Config::Init(); + err = Internal::QPGConfig::Init(); SuccessOrExit(err); // Initialize LwIP. diff --git a/src/platform/qpg6100/PlatformManagerImpl.h b/src/platform/qpg/PlatformManagerImpl.h similarity index 98% rename from src/platform/qpg6100/PlatformManagerImpl.h rename to src/platform/qpg/PlatformManagerImpl.h index ae47d3402d700c..ba8403486c4af7 100644 --- a/src/platform/qpg6100/PlatformManagerImpl.h +++ b/src/platform/qpg/PlatformManagerImpl.h @@ -17,7 +17,8 @@ /** * @file - * Provides an implementation of the PlatformManager object for the QPG6100 platform. + * Provides an implementation of the PlatformManager object + * for the Qorvo QPG platforms. */ #pragma once diff --git a/src/platform/qpg6100/README.md b/src/platform/qpg/README.md similarity index 97% rename from src/platform/qpg6100/README.md rename to src/platform/qpg/README.md index 53ea83af843f26..723aefd1904351 100644 --- a/src/platform/qpg6100/README.md +++ b/src/platform/qpg/README.md @@ -1,9 +1,9 @@ -# Overview of CHIP QPG6100 Adaption +# Overview of CHIP Qorvo QPG Adaption The following is an overview of the Qorvo adaptation of CHIP. Most of this code will have parallels in any new adaptation. -(All file names are relative to `connectedhomeip/src/platform/qpg6100...`). +(All file names are relative to `connectedhomeip/src/platform/qpg...`). `PlatformManagerImpl.h`
`PlatformManagerImpl.cpp` diff --git a/src/platform/qpg6100/SoftwareUpdateManagerImpl.cpp b/src/platform/qpg/SoftwareUpdateManagerImpl.cpp similarity index 100% rename from src/platform/qpg6100/SoftwareUpdateManagerImpl.cpp rename to src/platform/qpg/SoftwareUpdateManagerImpl.cpp diff --git a/src/platform/qpg6100/SystemPlatformConfig.h b/src/platform/qpg/SystemPlatformConfig.h similarity index 97% rename from src/platform/qpg6100/SystemPlatformConfig.h rename to src/platform/qpg/SystemPlatformConfig.h index 2e12c72ae2fbe7..2b6114ff5fc56a 100644 --- a/src/platform/qpg6100/SystemPlatformConfig.h +++ b/src/platform/qpg/SystemPlatformConfig.h @@ -18,7 +18,7 @@ /** * @file * Platform-specific configuration overrides for the CHIP System - * Layer on QPG6100 platforms. + * Layer on Qorvo QPG platforms. * */ diff --git a/src/platform/qpg6100/ThreadStackManagerImpl.cpp b/src/platform/qpg/ThreadStackManagerImpl.cpp similarity index 95% rename from src/platform/qpg6100/ThreadStackManagerImpl.cpp rename to src/platform/qpg/ThreadStackManagerImpl.cpp index 8bf8a9e8a81502..28422ec4c509a1 100644 --- a/src/platform/qpg6100/ThreadStackManagerImpl.cpp +++ b/src/platform/qpg/ThreadStackManagerImpl.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2020-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. @@ -18,7 +18,7 @@ /** * @file * Provides an implementation of the ThreadStackManager object for the - * QPG6100 platform using the Qorvo QPG6100 library and the OpenThread + * Qorvo QPG platform using the Qorvo QPG library and the OpenThread * stack. * */ diff --git a/src/platform/qpg6100/ThreadStackManagerImpl.h b/src/platform/qpg/ThreadStackManagerImpl.h similarity index 100% rename from src/platform/qpg6100/ThreadStackManagerImpl.h rename to src/platform/qpg/ThreadStackManagerImpl.h diff --git a/src/platform/qpg6100/args.gni b/src/platform/qpg/args.gni similarity index 72% rename from src/platform/qpg6100/args.gni rename to src/platform/qpg/args.gni index 0b351c7ad9ded6..ecb114318a83b0 100644 --- a/src/platform/qpg6100/args.gni +++ b/src/platform/qpg/args.gni @@ -13,17 +13,17 @@ # limitations under the License. import("//build_overrides/chip.gni") -import("//build_overrides/qpg6100_sdk.gni") +import("//build_overrides/qpg_sdk.gni") -# ARM architecture flags will be set for QPG6100. -arm_platform_config = "${qpg6100_sdk_build_root}/qpg6100_arm.gni" +# ARM architecture flags will be set for QPG family. +arm_platform_config = "${qpg_sdk_build_root}/qpg_arm.gni" -mbedtls_target = "${qpg6100_sdk_build_root}:qpg6100_sdk" +mbedtls_target = "${qpg_sdk_build_root}:qpg_sdk" -chip_device_platform = "qpg6100" +chip_device_platform = "qpg" chip_mdns = "platform" -lwip_platform = "qpg6100" +lwip_platform = "qpg" chip_inet_config_enable_ipv4 = false chip_inet_config_enable_dns_resolver = false @@ -48,6 +48,9 @@ openthread_external_mbedtls = mbedtls_target openthread_project_core_config_file = "openthread-core-qpg6100-config.h" openthread_core_config_platform_check_file = "openthread-core-qpg6100-config-check.h" -openthread_core_config_deps = [ "${chip_root}/third_party/openthread/platforms/qpg6100:libopenthread-qpg6100-config" ] +openthread_core_config_deps = [ + "${chip_root}/third_party/openthread/platforms/qpg:libopenthread-qpg-config", +] -openthread_external_platform = "${chip_root}/third_party/openthread/platforms/qpg6100:libopenthread-qpg6100" +openthread_external_platform = + "${chip_root}/third_party/openthread/platforms/qpg:libopenthread-qpg" diff --git a/src/platform/qpg6100/qpg6100Config.cpp b/src/platform/qpg/qpgConfig.cpp similarity index 79% rename from src/platform/qpg6100/qpg6100Config.cpp rename to src/platform/qpg/qpgConfig.cpp index dc8dae949cadab..d25444fa64f1ba 100644 --- a/src/platform/qpg6100/qpg6100Config.cpp +++ b/src/platform/qpg/qpgConfig.cpp @@ -18,12 +18,12 @@ /** * @file * Utilities for accessing persisted device configuration on - * platforms based on the Qorvo QPG6100 SDK. + * platforms based on the Qorvo QPG platforms. */ /* this file behaves like a config.h, comes first */ #include -#include +#include #include #include @@ -38,21 +38,21 @@ namespace chip { namespace DeviceLayer { namespace Internal { -CHIP_ERROR QPG6100Config::Init() +CHIP_ERROR QPGConfig::Init() { qvCHIP_Nvm_Init(); return CHIP_NO_ERROR; } -uint16_t QPG6100Config::GetSettingsMaxValueLength(Key key) +uint16_t QPGConfig::GetSettingsMaxValueLength(Key key) { uint16_t keyLen; return (qvCHIP_Nvm_GetMaxKeyLen(key, &keyLen) == QV_STATUS_NO_ERROR) ? keyLen : 0; } -CHIP_ERROR QPG6100Config::ReadConfigValue(Key key, bool & val) +CHIP_ERROR QPGConfig::ReadConfigValue(Key key, bool & val) { uint16_t length; @@ -61,7 +61,7 @@ CHIP_ERROR QPG6100Config::ReadConfigValue(Key key, bool & val) return MapNVMError(qvCHIP_Nvm_Restore(key, reinterpret_cast(&val), &length)); } -CHIP_ERROR QPG6100Config::ReadConfigValue(Key key, uint32_t & val) +CHIP_ERROR QPGConfig::ReadConfigValue(Key key, uint32_t & val) { uint16_t length; @@ -70,7 +70,7 @@ CHIP_ERROR QPG6100Config::ReadConfigValue(Key key, uint32_t & val) return MapNVMError(qvCHIP_Nvm_Restore(key, reinterpret_cast(&val), &length)); } -CHIP_ERROR QPG6100Config::ReadConfigValue(Key key, uint64_t & val) +CHIP_ERROR QPGConfig::ReadConfigValue(Key key, uint64_t & val) { uint16_t length; @@ -79,7 +79,7 @@ CHIP_ERROR QPG6100Config::ReadConfigValue(Key key, uint64_t & val) return MapNVMError(qvCHIP_Nvm_Restore(key, reinterpret_cast(&val), &length)); } -CHIP_ERROR QPG6100Config::ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen) +CHIP_ERROR QPGConfig::ReadConfigValueStr(Key key, char * buf, size_t bufSize, size_t & outLen) { qvStatus_t res; uint16_t length; @@ -104,7 +104,7 @@ CHIP_ERROR QPG6100Config::ReadConfigValueStr(Key key, char * buf, size_t bufSize return MapNVMError(res); } -CHIP_ERROR QPG6100Config::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen) +CHIP_ERROR QPGConfig::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufSize, size_t & outLen) { uint8_t buffer[255]; uint16_t length; @@ -133,7 +133,7 @@ CHIP_ERROR QPG6100Config::ReadConfigValueBin(Key key, uint8_t * buf, size_t bufS return MapNVMError(res); } -CHIP_ERROR QPG6100Config::WriteConfigValue(Key key, bool val) +CHIP_ERROR QPGConfig::WriteConfigValue(Key key, bool val) { uint16_t length; @@ -142,7 +142,7 @@ CHIP_ERROR QPG6100Config::WriteConfigValue(Key key, bool val) return MapNVMError(qvCHIP_Nvm_Backup(key, reinterpret_cast(&val), length)); } -CHIP_ERROR QPG6100Config::WriteConfigValue(Key key, uint32_t val) +CHIP_ERROR QPGConfig::WriteConfigValue(Key key, uint32_t val) { uint16_t length; @@ -151,7 +151,7 @@ CHIP_ERROR QPG6100Config::WriteConfigValue(Key key, uint32_t val) return MapNVMError(qvCHIP_Nvm_Backup(key, reinterpret_cast(&val), length)); } -CHIP_ERROR QPG6100Config::WriteConfigValue(Key key, uint64_t val) +CHIP_ERROR QPGConfig::WriteConfigValue(Key key, uint64_t val) { uint16_t length; @@ -160,12 +160,12 @@ CHIP_ERROR QPG6100Config::WriteConfigValue(Key key, uint64_t val) return MapNVMError(qvCHIP_Nvm_Backup(key, reinterpret_cast(&val), length)); } -CHIP_ERROR QPG6100Config::WriteConfigValueStr(Key key, const char * str) +CHIP_ERROR QPGConfig::WriteConfigValueStr(Key key, const char * str) { return WriteConfigValueStr(key, str, (str != NULL) ? strlen(str) : 0); } -CHIP_ERROR QPG6100Config::WriteConfigValueStr(Key key, const char * str, size_t strLen) +CHIP_ERROR QPGConfig::WriteConfigValueStr(Key key, const char * str, size_t strLen) { if (strLen > UINT16_MAX) { @@ -183,7 +183,7 @@ CHIP_ERROR QPG6100Config::WriteConfigValueStr(Key key, const char * str, size_t return CHIP_NO_ERROR; } -CHIP_ERROR QPG6100Config::WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) +CHIP_ERROR QPGConfig::WriteConfigValueBin(Key key, const uint8_t * data, size_t dataLen) { if (dataLen > UINT16_MAX) { @@ -201,18 +201,18 @@ CHIP_ERROR QPG6100Config::WriteConfigValueBin(Key key, const uint8_t * data, siz return CHIP_NO_ERROR; } -CHIP_ERROR QPG6100Config::ClearConfigValue(Key key) +CHIP_ERROR QPGConfig::ClearConfigValue(Key key) { qvCHIP_Nvm_ClearValue(key); return CHIP_NO_ERROR; } -bool QPG6100Config::ConfigValueExists(Key key) +bool QPGConfig::ConfigValueExists(Key key) { return qvCHIP_Nvm_ValueExists(key, NULL); } -CHIP_ERROR QPG6100Config::FactoryResetConfig(void) +CHIP_ERROR QPGConfig::FactoryResetConfig(void) { for (Key key = kMinConfigKey_ChipConfig; key <= kMaxConfigKey_ChipConfig; key++) { @@ -222,7 +222,7 @@ CHIP_ERROR QPG6100Config::FactoryResetConfig(void) return CHIP_NO_ERROR; } -CHIP_ERROR QPG6100Config::ForEachRecord(Key firstKey, Key lastKey, bool addNewRecord, ForEachRecordFunct funct) +CHIP_ERROR QPGConfig::ForEachRecord(Key firstKey, Key lastKey, bool addNewRecord, ForEachRecordFunct funct) { CHIP_ERROR err = CHIP_NO_ERROR; uint16_t length; @@ -255,7 +255,7 @@ CHIP_ERROR QPG6100Config::ForEachRecord(Key firstKey, Key lastKey, bool addNewRe return err; } -CHIP_ERROR QPG6100Config::MapNVMError(qvStatus_t aStatus) +CHIP_ERROR QPGConfig::MapNVMError(qvStatus_t aStatus) { switch (aStatus) { @@ -275,10 +275,10 @@ CHIP_ERROR QPG6100Config::MapNVMError(qvStatus_t aStatus) return CHIP_ERROR_INTERNAL; } -void QPG6100Config::RunConfigUnitTest() +void QPGConfig::RunConfigUnitTest() { // Run common unit test - ::chip::DeviceLayer::Internal::RunConfigUnitTest(); + ::chip::DeviceLayer::Internal::RunConfigUnitTest(); } } // namespace Internal diff --git a/src/platform/qpg6100/qpg6100Config.h b/src/platform/qpg/qpgConfig.h similarity index 99% rename from src/platform/qpg6100/qpg6100Config.h rename to src/platform/qpg/qpgConfig.h index 328378c547d78e..4fc274de58d679 100644 --- a/src/platform/qpg6100/qpg6100Config.h +++ b/src/platform/qpg/qpgConfig.h @@ -18,7 +18,7 @@ /** * @file * Utilities for accessing persisted device configuration on - * platforms based on the Qorvo QPG6100 SDK. + * platforms based on the Qorvo QPG platforms. */ #pragma once @@ -50,7 +50,7 @@ constexpr inline uint16_t QorvoConfigKey(uint8_t categoryId, uint8_t id) * naturally provides implementations for the delegated members referenced by * the template class (e.g. the ReadConfigValue() method). */ -class QPG6100Config +class QPGConfig { public: // Category ids used by the CHIP Device Layer diff --git a/third_party/openthread/platforms/qpg6100/BUILD.gn b/third_party/openthread/platforms/qpg/BUILD.gn similarity index 78% rename from third_party/openthread/platforms/qpg6100/BUILD.gn rename to third_party/openthread/platforms/qpg/BUILD.gn index 7b6bfa32b29321..3f0aafe118ea4c 100644 --- a/third_party/openthread/platforms/qpg6100/BUILD.gn +++ b/third_party/openthread/platforms/qpg/BUILD.gn @@ -14,35 +14,36 @@ import("//build_overrides/chip.gni") import("//build_overrides/openthread.gni") -import("//build_overrides/qpg6100_sdk.gni") +import("//build_overrides/qpg_sdk.gni") -import("${qpg6100_sdk_build_root}/qpg6100_sdk.gni") +import("${qpg_sdk_build_root}/qpg_sdk.gni") -openthread_qpg_family = "qpg6100" +# QPGxxxx settings and OT glue code +openthread_qpg_family = "${qpg_target_ic}" openthread_qpg_root = "${chip_root}/third_party/openthread/ot-qorvo" -config("openthread_qpg6100_config") { +config("openthread_qpg_config") { include_dirs = [ "${openthread_qpg_root}/src/${openthread_qpg_family}" ] - include_dirs += [ "${chip_root}/examples/platform/qpg6100" ] + include_dirs += [ "${chip_root}/examples/platform/qpg" ] } -source_set("openthread_core_config_qpg6100") { +source_set("openthread_core_config_qpg") { sources = [ "${openthread_qpg_root}/src/${openthread_qpg_family}/openthread-core-${openthread_qpg_family}-config-check.h", "${openthread_qpg_root}/src/${openthread_qpg_family}/openthread-core-${openthread_qpg_family}-config.h", ] - public_deps = [ "${qpg6100_sdk_build_root}:qpg6100_sdk" ] + public_deps = [ "${qpg_sdk_build_root}:qpg_sdk" ] - public_configs = [ ":openthread_qpg6100_config" ] + public_configs = [ ":openthread_qpg_config" ] } -source_set("openthread_mbedtls_config_qpg6100") { +source_set("openthread_mbedtls_config_qpg") { sources = [ "${openthread_qpg_root}/src/${openthread_qpg_family}/crypto/${openthread_qpg_family}-mbedtls-config.h" ] } -source_set("libopenthread-qpg6100") { +source_set("libopenthread-qpg") { sources = [ "${openthread_qpg_root}/src/${openthread_qpg_family}/alarm.c", "${openthread_qpg_root}/src/${openthread_qpg_family}/diag.c", @@ -63,10 +64,12 @@ source_set("libopenthread-qpg6100") { ] include_dirs += [ "${openthread_root}/examples/apps" ] - libs = [ "${qpg6100_sdk_root}/qpg6100/lib/libOpenThread_qpg6100_mtd.a" ] + libs = [ + "${qpg_sdk_root}/${qpg_target_ic}/lib/libOpenThread_${qpg_target_ic}_mtd.a", + ] public_deps = [ - ":openthread_core_config_qpg6100", + ":openthread_core_config_qpg", "${openthread_root}/src/core:libopenthread_core_headers", "..:libopenthread-platform", "..:libopenthread-platform-utils", diff --git a/third_party/qpg_sdk/BUILD.gn b/third_party/qpg_sdk/BUILD.gn index 088c29b2e1a77d..99864856d8b630 100644 --- a/third_party/qpg_sdk/BUILD.gn +++ b/third_party/qpg_sdk/BUILD.gn @@ -12,16 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//build_overrides/qpg6100_sdk.gni") -import("${qpg6100_sdk_build_root}/qpg6100_sdk.gni") +import("//build_overrides/qpg_sdk.gni") +import("${qpg_sdk_build_root}/qpg_sdk.gni") declare_args() { - # Build target to use for QPG6100 SDK. Use this to set global SDK defines. - qpg6100_sdk_target = "" + # Build target to use for QPG SDK. Use this to set global SDK defines. + qpg_sdk_target = "" } -assert(qpg6100_sdk_target != "", "qpg6100_sdk_target must be specified") +assert(qpg_sdk_target != "", "qpg_sdk_target must be specified") -group("qpg6100_sdk") { - public_deps = [ qpg6100_sdk_target ] +group("qpg_sdk") { + public_deps = [ qpg_sdk_target ] } diff --git a/third_party/qpg_sdk/qpg6100_arm.gni b/third_party/qpg_sdk/qpg_arm.gni similarity index 100% rename from third_party/qpg_sdk/qpg6100_arm.gni rename to third_party/qpg_sdk/qpg_arm.gni diff --git a/third_party/qpg_sdk/qpg6100_executable.gni b/third_party/qpg_sdk/qpg_executable.gni similarity index 92% rename from third_party/qpg_sdk/qpg6100_executable.gni rename to third_party/qpg_sdk/qpg_executable.gni index 52fcbe152c146f..ab9b6a1461065a 100644 --- a/third_party/qpg_sdk/qpg6100_executable.gni +++ b/third_party/qpg_sdk/qpg_executable.gni @@ -17,7 +17,7 @@ import("//build_overrides/chip.gni") import("${build_root}/toolchain/flashable_executable.gni") -template("qpg6100_executable") { +template("qpg_executable") { output_base_name = get_path_info(invoker.output_name, "name") objcopy_image_name = invoker.output_name + ".hex" @@ -33,7 +33,7 @@ template("qpg6100_executable") { copy(flashing_runtime_target) { sources = [ "${chip_root}/scripts/flashing/firmware_utils.py", - "${chip_root}/scripts/flashing/qpg6100_firmware_utils.py", + "${chip_root}/scripts/flashing/qpg_firmware_utils.py", ] outputs = [ "${root_out_dir}/{{source_file_part}}" ] } @@ -41,7 +41,7 @@ template("qpg6100_executable") { flashing_script_generator = "${chip_root}/scripts/flashing/gen_flashing_script.py" flashing_script_name = output_base_name + ".flash.py" - flashing_options = [ "qpg6100" ] + flashing_options = [ "qpg" ] flashable_executable(target_name) { forward_variables_from(invoker, "*") diff --git a/third_party/qpg_sdk/qpg6100_sdk.gni b/third_party/qpg_sdk/qpg_sdk.gni similarity index 70% rename from third_party/qpg_sdk/qpg6100_sdk.gni rename to third_party/qpg_sdk/qpg_sdk.gni index 3b59a710dfa83a..c958cd0137572c 100644 --- a/third_party/qpg_sdk/qpg6100_sdk.gni +++ b/third_party/qpg_sdk/qpg_sdk.gni @@ -16,31 +16,35 @@ import("//build_overrides/chip.gni") import("//build_overrides/jlink.gni") import("//build_overrides/mbedtls.gni") import("//build_overrides/openthread.gni") -import("//build_overrides/qpg6100_sdk.gni") +import("//build_overrides/qpg_sdk.gni") declare_args() { - # Location of the QPG6100 SDK. - qpg6100_sdk_root = "${chip_root}/third_party/qpg_sdk/repo" -} + # Location of the QPG SDK. + qpg_sdk_root = "${chip_root}/third_party/qpg_sdk/repo" -qpg6100_sdk_root_env = getenv("QPG6100_SDK_ROOT") -if (qpg6100_sdk_root_env != "") { - qpg6100_sdk_root = qpg6100_sdk_root_env + # Target IC for QPG SDK + qpg_target_ic = "qpg6100" } -assert(qpg6100_sdk_root != "", "qpg6100_sdk_root must be specified") +assert(qpg_sdk_root != "", "qpg_sdk_root must be specified") +assert(qpg_target_ic != "", "qpg_target_ic must be specified") -# Defines an QPG6100 SDK build target. +# Defines an QPG SDK build target. # # Parameters: -# qpg6100_sdk_root - The location of the QPG6100 SDK. +# qpg_sdk_root - The location of the QPG SDK. # sources - The sources files to build. -template("qpg6100_sdk") { - if (defined(invoker.qpg6100_sdk_root)) { - qpg6100_sdk_root = invoker.qpg6100_sdk_root +template("qpg_sdk") { + if (defined(invoker.qpg_sdk_root)) { + qpg_sdk_root = invoker.qpg_sdk_root + } + + if (defined(invoker.qpg_target_ic)) { + qpg_target_ic = invoker.qpg_target_ic } - assert(qpg6100_sdk_root != "", "qpg6100_sdk_root must be specified") + assert(qpg_sdk_root != "", "qpg_sdk_root must be specified") + assert(qpg_target_ic != "", "qpg_target_ic must be specified") sdk_target_name = target_name @@ -53,11 +57,11 @@ template("qpg6100_sdk") { } include_dirs += [ - "${qpg6100_sdk_root}/qpg6100/comps/qvCHIP/inc", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/config", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/Portable/GCC/ARM_CM3", - "${qpg6100_sdk_root}/qpg6100/comps/libmbedtls", + "${qpg_sdk_root}/${qpg_target_ic}/comps/qvCHIP/inc", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/config", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/Portable/GCC/ARM_CM3", + "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls", "${mbedtls_root}/repo/include", "${openthread_root}/include", ] @@ -65,14 +69,14 @@ template("qpg6100_sdk") { lib_dirs = [] libs += [ - "${qpg6100_sdk_root}/qpg6100/lib/libCHIP_qpg6100.a", - "${qpg6100_sdk_root}/qpg6100/lib/libmbedtls_alt_qpg6100.a", + "${qpg_sdk_root}/${qpg_target_ic}/lib/libCHIP_${qpg_target_ic}.a", + "${qpg_sdk_root}/${qpg_target_ic}/lib/libmbedtls_alt_${qpg_target_ic}.a", ] #MBed TLS built from third_party/mbedtls tree - OT config not used defines = [ "QORVO_CRYPTO_ENGINE", - "MBEDTLS_CONFIG_FILE=\"qpg6100-mbedtls-config.h\"", + "MBEDTLS_CONFIG_FILE=\"${qpg_target_ic}-mbedtls-config.h\"", ] cflags = [] @@ -173,29 +177,30 @@ template("qpg6100_sdk") { "${chip_root}/third_party/mbedtls/repo/library/x509write_crt.c", "${chip_root}/third_party/mbedtls/repo/library/x509write_csr.c", "${chip_root}/third_party/mbedtls/repo/library/xtea.c", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/Portable/GCC/ARM_CM3/portmacro.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/FreeRTOS.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/deprecated_definitions.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/list.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/mpu_wrappers.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/portable.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/projdefs.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/queue.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/semphr.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/stack_macros.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/task.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/Source/include/timers.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/config/FreeRTOSConfig.h", - "${qpg6100_sdk_root}/qpg6100/comps/gpFreeRTOS/config/hooks.c", - "${qpg6100_sdk_root}/qpg6100/comps/libmbedtls/aes_alt.h", - "${qpg6100_sdk_root}/qpg6100/comps/libmbedtls/ccm_alt.h", - "${qpg6100_sdk_root}/qpg6100/comps/libmbedtls/ecjpake_alt.h", - "${qpg6100_sdk_root}/qpg6100/comps/libmbedtls/ecp_alt.h", - "${qpg6100_sdk_root}/qpg6100/comps/libmbedtls/qpg6100-mbedtls-config.h", - "${qpg6100_sdk_root}/qpg6100/comps/libmbedtls/sha256_alt.h", - "${qpg6100_sdk_root}/qpg6100/comps/libmbedtls/trng.c", #add this for - # mbedtls_hardware_poll - "${qpg6100_sdk_root}/qpg6100/comps/qvCHIP/inc/qvCHIP.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/Portable/GCC/ARM_CM3/portmacro.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/FreeRTOS.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/deprecated_definitions.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/list.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/mpu_wrappers.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/portable.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/projdefs.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/queue.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/semphr.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/stack_macros.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/task.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/Source/include/timers.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/config/FreeRTOSConfig.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/gpFreeRTOS/config/hooks.c", + "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/${qpg_target_ic}-mbedtls-config.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/aes_alt.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/ccm_alt.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/ecjpake_alt.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/ecp_alt.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/sha256_alt.h", + "${qpg_sdk_root}/${qpg_target_ic}/comps/libmbedtls/trng.c", #add this for + + # mbedtls_hardware_poll + "${qpg_sdk_root}/${qpg_target_ic}/comps/qvCHIP/inc/qvCHIP.h", ] if (defined(invoker.sources)) {