Skip to content

Commit

Permalink
Merge branch 'master' into alvin_doorlock_9.5
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored Sep 12, 2022
2 parents b513f34 + 0ca9aa4 commit ee6d9e8
Show file tree
Hide file tree
Showing 492 changed files with 19,329 additions and 5,224 deletions.
2 changes: 2 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ bootable
Bootloader
BorderRouterAP
bouffalolab
Bouffalolab
BRD
breakpoint
bredr
Expand Down Expand Up @@ -253,6 +254,7 @@ ClusterTestGeneration
cmake
CMakeLists
CMD
CMS
CMSIS
CMVH
cn
Expand Down
16 changes: 2 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#### Problem
What is being fixed? Examples:
* Fix crash on startup
* Fixes #12345 Frobnozzle is leaky (exactly like that, so GitHub will auto-close the issue).
#### Issue Being Resolved
* Fixes #12345 (exactly like this, so this PR is associated with an issue)

#### Change overview
What's in this PR

#### Testing
How was this tested? (at least one bullet point required)
* If unit tests were added, how do they cover this issue?
* If unit tests existed, how were they fixed/modified to prevent this in future?
* If new unit tests are not added, why not?
* If integration tests were added, how do they verify this change?
* If new integration tests are not added, why not?
* If manually tested, what platforms controller and device platforms were manually tested, and how?
* If no testing is required, why not?
10 changes: 1 addition & 9 deletions .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,7 @@ jobs:
--volume /tmp:/tmp \
-- sh -c '\
git config --global --add safe.directory "*" \
&& ./gn_build.sh \
chip_build_tests=false \
chip_enable_wifi=false \
chip_im_force_fabric_quota_check=true \
enable_default_builds=false \
enable_host_gcc_build=true \
enable_standalone_chip_tool_build=true \
enable_linux_all_clusters_app_build=true \
enable_linux_lighting_app_build=true \
&& scripts/build/gn_gen_cirque.sh
'
- name: Run Tests
timeout-minutes: 25
Expand Down
77 changes: 77 additions & 0 deletions .github/workflows/examples-bouffalolab.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# 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.

name: Build example - Bouffalolab BL702

on:
push:
pull_request:

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

jobs:
bl702:
name: BL702
timeout-minutes: 90

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build:latest
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
- uses: Wandalen/[email protected]
name: Checkout
with:
action: actions/checkout@v3
with: |
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform bouffalolab

- name: Set up environment for size reports
if: ${{ !env.ACT }}
env:
GH_CONTEXT: ${{ toJson(github) }}
run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}"

- name: Build example BL702 Lighting App
timeout-minutes: 30
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target bouffalolab-BL706-IoT-DVK-BL706C-22-light build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py bl702 bl702 lighting-app \
out/bouffalolab-BL706-IoT-DVK-BL706C-22-light/chip-bl702-lighting-example.out /tmp/bloat_reports/
- name: Build example BL702 Lighting App with RPCs
timeout-minutes: 30
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target bouffalolab-BL706-IoT-DVK-BL706C-22-light-rpc build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py bl702 bl702+rpc lighting-app \
out/bouffalolab-BL706-IoT-DVK-BL706C-22-light-rpc/chip-bl702-lighting-example.out /tmp/bloat_reports/
- name: Uploading Size Reports
uses: actions/upload-artifact@v2
if: ${{ !env.ACT }}
with:
name: Size,BL702-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }}
path: |
/tmp/bloat_reports/
45 changes: 39 additions & 6 deletions .github/workflows/full-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ concurrency:
cancel-in-progress: true

jobs:
android:
full_android:
name: Run
timeout-minutes: 75

Expand All @@ -40,14 +40,25 @@ jobs:

steps:
- uses: Wandalen/[email protected]
if: ${{ !env.ACT }}
name: Checkout
with:
action: actions/checkout@v3
with: |
submodules: true
token: ${{ github.token }}
attempt_limit: 3
attempt_delay: 2000
# To use act like:
# act -j full_android
#
# Note you likely still need to have non submodules setup for the
# local machine, like:
# git submodule deinit --all
- uses: actions/checkout@v3
if: ${{ env.ACT }}
name: Checkout (ACT for local build)
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform android
- name: Bootstrap
timeout-minutes: 10
run: scripts/build/gn_bootstrap.sh
Expand All @@ -59,16 +70,38 @@ jobs:
path: |
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build Android CHIPTool and CHIPTest (ARM)
- name: Build Android arm-chip-tool
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm-*' build"
"./scripts/build/build_examples.py --no-log-timestamps --target android-arm-chip-tool build"
- name: Clean out build output
run: rm -rf ./out
- name: Build Android CHIPTool and CHIPTest (ARM64)
- name: Build Android arm-tv-casting-app
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm64-*' build"
"./scripts/build/build_examples.py --no-log-timestamps --target android-arm-tv-casting-app build"
- name: Clean out build output
run: rm -rf ./out
- name: Build Android arm-tv-server
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps --target android-arm-tv-server build"
- name: Clean out build output
run: rm -rf ./out
- name: Build Android arm64-tv-casting-app
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps --target android-arm64-tv-casting-app build"
- name: Clean out build output
run: rm -rf ./out
- name: Build Android arm64-tv-server
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps --target android-arm64-tv-server build"
- name: Build Android arm64-chip-tool
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --no-log-timestamps --target android-arm64-chip-tool build"
- name: Run Android build rule tests
run: |
./scripts/run_in_build_env.sh \
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,4 @@
path = third_party/bouffalolab/repo
url = https://github.com/bouffalolab/bl_iot_sdk.git
branch = master
platforms = bl602
platforms = bouffalolab,bl602
7 changes: 4 additions & 3 deletions .pullapprove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ overrides:
############################################################
# Require Issues
############################################################
- if: "'*issue*' not in statuses.successful"
status: failure
explanation: "An issue is required for all PRs"
# disabling until we have PRs up to date
# - if: "'*issue*' not in statuses.successful"
# status: failure
# explanation: "An issue is required for all PRs"

############################################################
# Fast tracking
Expand Down
2 changes: 2 additions & 0 deletions .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ restylers:
- "**/*.c"
- "**/*.cc"
- "**/*.cpp"
- "**/*.ipp"
- "**/*.cxx"
- "**/*.c++"
- "**/*.C"
Expand Down Expand Up @@ -137,6 +138,7 @@ restylers:
- "**/*.c"
- "**/*.cc"
- "**/*.cpp"
- "**/*.ipp"
- "**/*.cxx"
- "**/*.c++"
- "**/*.C"
Expand Down
5 changes: 5 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@
"android-x64-chip-tool",
"android-x86-chip-tool",
"bl602-light",
"bouffalolab-BL702-IoT-DVK-light",
"bouffalolab-BL702-IoT-DVK-light-rpc",
"bouffalolab-BL706-IoT-DVK-BL706C-22-light",
"bouffalolab-BL706-IoT-DVK-BL706C-22-light-rpc",
"bouffalolab-BL706-NIGHT-LIGHT",
"efr32-brd4161a-light",
"efr32-brd4163a-light",
"efr32-brd4164a-light",
Expand Down
14 changes: 14 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
# Set this to true to enable bl602 builds by default.
enable_bl602_builds = false

# Set this to true to enable bl702 builds by default.
enable_bl702_builds = false

# Set this to true to enable mw320 builds by default.
enable_mw320_builds = false
}
Expand Down Expand Up @@ -388,6 +391,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
# Build the bl602 lighting app example.
enable_bl602_lighting_app_build = enable_bl602_builds

# Build the bl702 lighting app example.
enable_bl702_lighting_app_build = enable_bl702_builds

# Build the mw320 shell app example.
enable_mw320_shell_build = enable_mw320_builds

Expand Down Expand Up @@ -682,6 +688,14 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
extra_build_deps += [ ":mw320_shell" ]
}

if (enable_bl702_lighting_app_build) {
group("bl702_lighting_app") {
deps = [ "${chip_root}/examples/lighting-app/bl702(${chip_root}/config/bl702/toolchain:bl702_lighting_app)" ]
}

extra_build_deps += [ ":bl702_shell" ]
}

group("default") {
deps = extra_build_deps + builds
}
Expand Down
4 changes: 2 additions & 2 deletions build/toolchain/riscv_gcc/riscv_toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/bl602_sdk.gni")
import("//build_overrides/build.gni")

import("${build_root}/toolchain/gcc_toolchain.gni")

template("riscv_toolchain") {
gcc_toolchain(target_name) {
_tool_name_root = "${root_build_dir}/../../third_party/bouffalolab/repo/toolchain/riscv/Linux/bin/riscv64-unknown-elf-"
_tool_name_root = "riscv64-unknown-elf-"

ar = _tool_name_root + "ar"
cc = _tool_name_root + "gcc"
cxx = _tool_name_root + "g++"
Expand Down
24 changes: 24 additions & 0 deletions build_overrides/bouffalolab_iot_sdk.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

declare_args() {
# Root directory for bl602 SDK build files.
bl602_sdk_build_root = "//third_party/bouffalolab/bl602"

# Root directory for bl702 SDK build files.
bl702_sdk_build_root = "//third_party/bouffalolab/bl702"

# Root directory of toolchain of Bouffalolab chips
bouffalolab_toolchain = "//third_party/bouffalolab/repo/toolchain/riscv"
}
47 changes: 47 additions & 0 deletions config/bouffalolab/bl702/lib/pw_rpc/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/chip.gni")
import("//build_overrides/pigweed.gni")
import("$dir_pw_build/target_types.gni")

config("pw_string_config") {
defines = [
"_GLIBCXX_USE_C99_MATH_TR1",
"_LDBL_EQ_DBL",
]
}

pw_source_set("pw_string_dep") {
public_configs = [ ":pw_string_config" ]
}

static_library("pw_rpc") {
output_name = "libPwRpc"

public_configs = [ "${dir_pigweed}/pw_hdlc:default_config" ]

public_deps = [
"$dir_pw_rpc:server",
"$dir_pw_rpc/nanopb:echo_service",
"${chip_root}/examples/platform/bouffalolab/bl702/pw_sys_io:pw_sys_io_bl702",
"${dir_pigweed}/pw_hdlc:pw_rpc",
dir_pw_assert,
dir_pw_checksum,
dir_pw_hdlc,
dir_pw_log,
]

output_dir = "${root_out_dir}/lib"
}
Loading

0 comments on commit ee6d9e8

Please sign in to comment.