Skip to content

Commit

Permalink
Merge 457cb23 into fba066d
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-hh authored Sep 11, 2023
2 parents fba066d + 457cb23 commit 9344597
Show file tree
Hide file tree
Showing 82 changed files with 11,997 additions and 1,842 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/examples-bouffalolab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ jobs:
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target bouffalolab-bl706-night-light-light \
--target bouffalolab-bl706-eth-light \
--target bouffalolab-bl706-wifi-light \
--target bouffalolab-bl706dk-light-ethernet \
--target bouffalolab-bl706dk-light-wifi-fp \
--target bouffalolab-xt-zb6-devkit-light-115200-rpc \
build \
--copy-artifacts-to out/artifacts \
Expand All @@ -92,11 +92,11 @@ jobs:
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
bl702 bl706-eth lighting-app \
out/artifacts/bouffalolab-bl706-eth-light/chip-bl702-lighting-example.out \
out/artifacts/bouffalolab-bl706dk-light-ethernet/chip-bl702-lighting-example.out \
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
bl702 bl706-wifi lighting-app \
out/artifacts/bouffalolab-bl706-wifi-light/chip-bl702-lighting-example.out \
out/artifacts/bouffalolab-bl706dk-light-wifi-fp/chip-bl702-lighting-example.out \
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
bl702 bl702+rpc lighting-app \
Expand All @@ -110,15 +110,15 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--target bouffalolab-bl704l-dvk-light \
--target bouffalolab-bl704ldk-light \
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 lighting-app \
out/artifacts/bouffalolab-bl704l-dvk-light/chip-bl702l-lighting-example.out \
out/artifacts/bouffalolab-bl704ldk-light/chip-bl702l-lighting-example.out \
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
Expand Down
79 changes: 48 additions & 31 deletions examples/lighting-app/bouffalolab/bl602/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@ if (chip_enable_pw_rpc) {

assert(current_os == "freertos")

example_common_dir = "${chip_root}/examples/lighting-app/bouffalolab/common"
example_dir = "${chip_root}/examples/lighting-app/bouffalolab/bl602"
examples_plat_common_dir = "${chip_root}/examples/platform/bouffalolab/common"
examples_plat_dir = "${chip_root}/examples/platform/bouffalolab/bl602"
example_dir = "${chip_root}/examples/lighting-app/bouffalolab"
examples_plat_dir = "${chip_root}/examples/platform/bouffalolab"

declare_args() {
# Dump memory usage at link time.
Expand All @@ -60,12 +58,15 @@ declare_args() {

bl_iot_sdk("sdk") {
include_dirs = [
"${example_dir}/bl602",
"${examples_plat_dir}/bl602",
"${examples_plat_dir}/bl602/lwipopts",
"${examples_plat_dir}/common/route_hook",
"${chip_root}/src/platform/bouffalolab/BL602",
"${example_dir}",
"${example_dir}/include",
"${chip_root}/src/platform/bouffalolab/common",
]

freertos_config = "${examples_plat_dir}/FreeRTOSConfig.h"
freertos_config = "${examples_plat_dir}/bl602/FreeRTOSConfig.h"

defines = [
"INCLUDE_xSemaphoreGetMutexHolder=1",
Expand All @@ -75,19 +76,20 @@ bl_iot_sdk("sdk") {
"OTA_AUTO_REBOOT_DELAY=${ota_auto_reboot_delay_seconds}",
"CHIP_UART_BAUDRATE=${baudrate}",
"SYS_AOS_LOOP_ENABLE",
"CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE=48",
]

if (chip_enable_pw_rpc) {
include_dirs += [ "${examples_plat_common_dir}/rpc" ]
include_dirs += [ "${examples_plat_dir}/common/rpc" ]
defines += [ "PW_RPC_ENABLED=1" ]
defines += [ "DISABLE_PRINT=1" ]
} else if (chip_build_libshell) {
include_dirs += [ "${examples_plat_common_dir}/plat" ]
include_dirs += [ "${examples_plat_dir}/common/plat" ]
}
}

chip_data_model("bouffalolab-lighting") {
zap_file = "${example_dir}/../data_model/lighting-app-wifi.zap"
zap_file = "${example_dir}/data_model/lighting-app-wifi.zap"

zap_pregenerated_dir = "${chip_root}/zzz_generated/lighting-app/zap-generated"
is_server = true
Expand All @@ -99,19 +101,31 @@ bouffalolab_executable("lighting_app") {
defines = [
"APP_TASK_STACK_SIZE=2044",
"CHIP_UART_BAUDRATE=${baudrate}",
"BL602_ENABLE",
"BL602_ENABLE=1",
"START_ENTRY=bfl_main",
"SYS_AOS_LOOP_ENABLE",
]

if (enable_debug_frame_ptr) {
defines += [ "CONF_ENABLE_FRAME_PTR=1" ]
}

if (false == enable_reset_counter) {
defines += [ "BOOT_PIN_RESET=8" ]
}

if (chip_enable_factory_data) {
defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_ENABLE" ]
}

if (chip_enable_factory_data_test) {
defines += [ "CONFIG_BOUFFALOLAB_FACTORY_DATA_TEST" ]
}

bl_plat_name = "bl602"
sources = [
"${examples_plat_common_dir}/route_hook/bl_route_hook.c",
"${examples_plat_common_dir}/route_hook/bl_route_table.c",
"${examples_plat_dir}/common/route_hook/bl_route_hook.c",
"${examples_plat_dir}/common/route_hook/bl_route_table.c",
]

if ("BL602-IoT-Matter-V1" == board) {
Expand All @@ -122,15 +136,16 @@ bouffalolab_executable("lighting_app") {

sources += [
"${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp",
"${example_common_dir}/AppTask.cpp",
"${example_common_dir}/ZclCallbacks.cpp",
"${examples_plat_common_dir}/plat/LEDWidget.cpp",
"${examples_plat_common_dir}/plat/OTAConfig.cpp",
"${examples_plat_common_dir}/plat/aos_task.c",
"${examples_plat_common_dir}/plat/demo_pwm.c",
"${examples_plat_common_dir}/plat/main.cpp",
"${examples_plat_common_dir}/plat/platform.cpp",
"${examples_plat_common_dir}/plat/uart.c",
"${example_dir}/common/AppTask.cpp",
"${example_dir}/common/ZclCallbacks.cpp",
"${examples_plat_dir}/common/iot_sdk/aos_task.c",
"${examples_plat_dir}/common/iot_sdk/demo_pwm.c",
"${examples_plat_dir}/common/iot_sdk/platform_port.c",
"${examples_plat_dir}/common/iot_sdk/uart.c",
"${examples_plat_dir}/common/plat/LEDWidget.cpp",
"${examples_plat_dir}/common/plat/OTAConfig.cpp",
"${examples_plat_dir}/common/plat/main.cpp",
"${examples_plat_dir}/common/plat/platform.cpp",
]

deps = [
Expand All @@ -144,10 +159,12 @@ bouffalolab_executable("lighting_app") {

include_dirs = [
"${chip_root}/src/platform/bouffalolab/BL602",
"${example_common_dir}",
"${examples_plat_common_dir}/route_hook",
"${examples_plat_common_dir}/plat",
"${examples_plat_dir}",
"${example_dir}/common",
"${example_dir}/bl602",
"${examples_plat_dir}/bl602/lwipopts",
"${examples_plat_dir}/common/route_hook",
"${examples_plat_dir}/common/plat",
"${examples_plat_dir}/common/iot_sdk",
]

if (chip_enable_pw_rpc) {
Expand All @@ -165,8 +182,8 @@ bouffalolab_executable("lighting_app") {
sources += [
"${chip_root}/examples/common/pigweed/RpcService.cpp",
"${chip_root}/examples/common/pigweed/bouffalolab/PigweedLoggerMutex.cpp",
"${examples_plat_common_dir}/rpc/PigweedLogger.cpp",
"${examples_plat_common_dir}/rpc/Rpc.cpp",
"${examples_plat_dir}/common/rpc/PigweedLogger.cpp",
"${examples_plat_dir}/common/rpc/Rpc.cpp",
]

deps += [
Expand All @@ -184,7 +201,7 @@ bouffalolab_executable("lighting_app") {
"${chip_root}/examples/common/pigweed:descriptor_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:device_service.nanopb_rpc",
"${chip_root}/examples/common/pigweed:lighting_service.nanopb_rpc",
"${examples_plat_common_dir}/rpc/pw_sys_io:pw_sys_io",
"${examples_plat_dir}/common/rpc/pw_sys_io:pw_sys_io",
]

public_deps = [
Expand All @@ -210,12 +227,12 @@ bouffalolab_executable("lighting_app") {
}

if (enable_heap_monitoring) {
sources += [ "${examples_plat_common_dir}/plat/MemMonitoring.cpp" ]
sources += [ "${examples_plat_dir}/common/plat/MemMonitoring.cpp" ]
defines += [ "HEAP_MONITORING=1" ]
}

cflags_c = [ "-Wno-sign-compare" ]
ldscript = "${examples_plat_dir}/ldscripts/flash_rom.ld"
ldscript = "${examples_plat_dir}/bl602/ldscripts/flash_rom.ld"

ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ]

Expand Down
2 changes: 0 additions & 2 deletions examples/lighting-app/bouffalolab/bl602/CHIPProjectConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,4 @@

#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1

#define CHIP_SYSTEM_CRYPTO_HEADER_RESERVE_SIZE 128

#define CHIP_BLE_DEVICE_NAME "MatterLight"
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
#endif

#define CHIP_UART_PIN_RX 7
#define CHIP_UART_PIN_TX 16
#define CHIP_UART_PIN_TX 16
Loading

0 comments on commit 9344597

Please sign in to comment.