Skip to content

Commit daf2c42

Browse files
wy-hhrestyled-commitsandy31415
authored
[bouffalo lab] add bl616 lighting example with Wi-Fi and Thread suppo… (project-chip#36954)
* [bouffalo lab] add bl616 lighting example with Wi-Fi and Thread supported * Restyled by gn --------- Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Andrei Litvin <andy314@gmail.com>
1 parent 6ea3666 commit daf2c42

File tree

77 files changed

+5970
-332
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+5970
-332
lines changed

.github/workflows/examples-bouffalolab.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ jobs:
5858
run: |
5959
./scripts/run_in_build_env.sh \
6060
"./scripts/build/build_examples.py \
61-
--target bouffalolab-bl602dk-light-mfd-littlefs-rpc-115200 \
61+
--target bouffalolab-bl602dk-light-wifi-littlefs-mfd-rpc \
6262
build \
6363
--copy-artifacts-to out/artifacts \
6464
"
6565
- name: Prepare some bloat report from the previous builds
6666
run: |
6767
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
6868
bl602 bl602+mfd+littlefs+rpc lighting-app \
69-
out/artifacts/bouffalolab-bl602dk-light-mfd-littlefs-rpc-115200/chip-bl602-lighting-example.out \
69+
out/artifacts/bouffalolab-bl602dk-light-wifi-littlefs-mfd-rpc/chip-bl602-lighting-example.out \
7070
/tmp/bloat_reports/
7171
- name: Clean out build output
7272
run: rm -rf ./out
@@ -77,7 +77,7 @@ jobs:
7777
"./scripts/build/build_examples.py \
7878
--target bouffalolab-bl706dk-light-ethernet-easyflash \
7979
--target bouffalolab-bl706dk-light-wifi-littlefs \
80-
--target bouffalolab-bl706dk-light-mfd-rpc-littlefs-115200 \
80+
--target bouffalolab-bl706dk-light-thread-littlefs-mfd-rpc \
8181
build \
8282
--copy-artifacts-to out/artifacts \
8383
"
@@ -93,7 +93,7 @@ jobs:
9393
/tmp/bloat_reports/
9494
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
9595
bl702 bl706+mfd+rpc+littlefs lighting-app \
96-
out/artifacts/bouffalolab-bl706dk-light-mfd-rpc-littlefs-115200/chip-bl702-lighting-example.out \
96+
out/artifacts/bouffalolab-bl706dk-light-thread-littlefs-mfd-rpc/chip-bl702-lighting-example.out \
9797
/tmp/bloat_reports/
9898
- name: Clean out build output
9999
run: rm -rf ./out
@@ -103,15 +103,15 @@ jobs:
103103
run: |
104104
./scripts/run_in_build_env.sh \
105105
"./scripts/build/build_examples.py \
106-
--target bouffalolab-bl704ldk-light-mfd-littlefs \
106+
--target bouffalolab-bl704ldk-light-thread-littlefs-mfd \
107107
build \
108108
--copy-artifacts-to out/artifacts \
109109
"
110110
- name: Prepare some bloat report from the previous builds
111111
run: |
112112
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
113113
bl702l bl702l+mfd+littlefs lighting-app \
114-
out/artifacts/bouffalolab-bl704ldk-light-mfd-littlefs/chip-bl702l-lighting-example.out \
114+
out/artifacts/bouffalolab-bl704ldk-light-thread-littlefs-mfd/chip-bl702l-lighting-example.out \
115115
/tmp/bloat_reports/
116116
- name: Clean out build output
117117
run: rm -rf ./out

config/bouffalolab/toolchain/riscv_toolchain.gni

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@ import("//build_overrides/chip.gni")
1717

1818
import("//build_overrides/bouffalolab_iot_sdk.gni")
1919
import("${build_root}/toolchain/gcc_toolchain.gni")
20+
import("${chip_root}/src/platform/device.gni")
2021

2122
template("riscv_toolchain") {
2223
gcc_toolchain(target_name) {
2324
_tool_name_root = ""
2425

2526
if ("linux" == host_os) {
26-
_tool_name_root = "${bouffalolab_sdk_root}/toolchain/riscv/Linux/bin/riscv64-unknown-elf-"
27+
if (chip_device_platform == "bl616") {
28+
_tool_name_root = "${bouffalolab_sdk_root}/toolchain/t-head-riscv/gcc_t-head_v2.6.1/bin/riscv64-unknown-elf-"
29+
} else {
30+
_tool_name_root = "${bouffalolab_sdk_root}/toolchain/riscv/Linux/bin/riscv64-unknown-elf-"
31+
}
2732
} else if ("mac" == host_os || "darwin" == host_os) {
2833
_tool_name_root = "${bouffalolab_sdk_root}/toolchain/riscv/Darwin/bin/riscv64-unknown-elf-"
2934
}

examples/lighting-app/bouffalolab/bl602/BUILD.gn

-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ bouffalolab_executable("lighting_app") {
107107
defines += [ "BOOT_PIN_RESET=8" ]
108108
}
109109

110-
defines += [ "CONF_ENABLE_FRAME_PTR=${enable_debug_frame_ptr}" ]
111110
defines +=
112111
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]
113112

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (c) 2021 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/build.gni")
16+
17+
# The location of the build configuration file.
18+
buildconfig = "${build_root}/config/BUILDCONFIG.gn"
19+
20+
# CHIP uses angle bracket includes.
21+
check_system_includes = true
22+
23+
default_args = {
24+
target_cpu = "riscv"
25+
target_os = "freertos"
26+
27+
import("//args.gni")
28+
}

0 commit comments

Comments
 (0)