Skip to content

Commit

Permalink
[bouffalo lab] add bl616 lighting example with Wi-Fi and Thread suppo… (
Browse files Browse the repository at this point in the history
project-chip#36954)

* [bouffalo lab] add bl616 lighting example with Wi-Fi and Thread supported

* Restyled by gn

---------

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2025
1 parent 6ea3666 commit daf2c42
Show file tree
Hide file tree
Showing 77 changed files with 5,970 additions and 332 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/examples-bouffalolab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target bouffalolab-bl602dk-light-mfd-littlefs-rpc-115200 \
--target bouffalolab-bl602dk-light-wifi-littlefs-mfd-rpc \
build \
--copy-artifacts-to out/artifacts \
"
- name: Prepare some bloat report from the previous builds
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
bl602 bl602+mfd+littlefs+rpc lighting-app \
out/artifacts/bouffalolab-bl602dk-light-mfd-littlefs-rpc-115200/chip-bl602-lighting-example.out \
out/artifacts/bouffalolab-bl602dk-light-wifi-littlefs-mfd-rpc/chip-bl602-lighting-example.out \
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
Expand All @@ -77,7 +77,7 @@ jobs:
"./scripts/build/build_examples.py \
--target bouffalolab-bl706dk-light-ethernet-easyflash \
--target bouffalolab-bl706dk-light-wifi-littlefs \
--target bouffalolab-bl706dk-light-mfd-rpc-littlefs-115200 \
--target bouffalolab-bl706dk-light-thread-littlefs-mfd-rpc \
build \
--copy-artifacts-to out/artifacts \
"
Expand All @@ -93,7 +93,7 @@ jobs:
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
bl702 bl706+mfd+rpc+littlefs lighting-app \
out/artifacts/bouffalolab-bl706dk-light-mfd-rpc-littlefs-115200/chip-bl702-lighting-example.out \
out/artifacts/bouffalolab-bl706dk-light-thread-littlefs-mfd-rpc/chip-bl702-lighting-example.out \
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
Expand All @@ -103,15 +103,15 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target bouffalolab-bl704ldk-light-mfd-littlefs \
--target bouffalolab-bl704ldk-light-thread-littlefs-mfd \
build \
--copy-artifacts-to out/artifacts \
"
- name: Prepare some bloat report from the previous builds
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
bl702l bl702l+mfd+littlefs lighting-app \
out/artifacts/bouffalolab-bl704ldk-light-mfd-littlefs/chip-bl702l-lighting-example.out \
out/artifacts/bouffalolab-bl704ldk-light-thread-littlefs-mfd/chip-bl702l-lighting-example.out \
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
Expand Down
7 changes: 6 additions & 1 deletion config/bouffalolab/toolchain/riscv_toolchain.gni
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,18 @@ import("//build_overrides/chip.gni")

import("//build_overrides/bouffalolab_iot_sdk.gni")
import("${build_root}/toolchain/gcc_toolchain.gni")
import("${chip_root}/src/platform/device.gni")

template("riscv_toolchain") {
gcc_toolchain(target_name) {
_tool_name_root = ""

if ("linux" == host_os) {
_tool_name_root = "${bouffalolab_sdk_root}/toolchain/riscv/Linux/bin/riscv64-unknown-elf-"
if (chip_device_platform == "bl616") {
_tool_name_root = "${bouffalolab_sdk_root}/toolchain/t-head-riscv/gcc_t-head_v2.6.1/bin/riscv64-unknown-elf-"
} else {
_tool_name_root = "${bouffalolab_sdk_root}/toolchain/riscv/Linux/bin/riscv64-unknown-elf-"
}
} else if ("mac" == host_os || "darwin" == host_os) {
_tool_name_root = "${bouffalolab_sdk_root}/toolchain/riscv/Darwin/bin/riscv64-unknown-elf-"
}
Expand Down
1 change: 0 additions & 1 deletion examples/lighting-app/bouffalolab/bl602/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ bouffalolab_executable("lighting_app") {
defines += [ "BOOT_PIN_RESET=8" ]
}

defines += [ "CONF_ENABLE_FRAME_PTR=${enable_debug_frame_ptr}" ]
defines +=
[ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE=${chip_enable_factory_data}" ]

Expand Down
28 changes: 28 additions & 0 deletions examples/lighting-app/bouffalolab/bl616/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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/build.gni")

# The location of the build configuration file.
buildconfig = "${build_root}/config/BUILDCONFIG.gn"

# CHIP uses angle bracket includes.
check_system_includes = true

default_args = {
target_cpu = "riscv"
target_os = "freertos"

import("//args.gni")
}
Loading

0 comments on commit daf2c42

Please sign in to comment.