Skip to content

Commit

Permalink
[BEKEN] update examples build files for BEKEN (project-chip#21993)
Browse files Browse the repository at this point in the history
* update examples build files for BEKEN
* use lighting-common/lighting-app.zap
  • Loading branch information
zhengyaohan authored and isiu-apple committed Sep 16, 2022
1 parent 63ca501 commit 8f34c9a
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 2 deletions.
5 changes: 4 additions & 1 deletion config/beken/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ import("//build_overrides/chip.gni")
#import("${chip_root}/build/chip/tests.gni")

group("beken") {
deps = [ "${chip_root}/src/lib" ]
deps = [
"${chip_root}/examples/lighting-app/beken:MatterApp",
"${chip_root}/src/lib",
]
}
group("default") {
deps = [ ":beken" ]
Expand Down
29 changes: 29 additions & 0 deletions examples/lighting-app/beken/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2022 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")
import("//build_overrides/chip.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 = "risc-v"
target_os = "freertos"

import("//args.gni")
}
38 changes: 38 additions & 0 deletions examples/lighting-app/beken/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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.

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

static_library("MatterApp") {
public_deps = [
"${chip_root}/examples/lighting-app/lighting-common",
"${chip_root}/src/lib",
]

sources = [
"main/CHIPDeviceManager.cpp",
"main/DeviceCallbacks.cpp",
"main/DsoHack.cpp",
"main/chipinterface.cpp",
]

output_name = "libMatterApp"
output_dir = "${root_out_dir}/lib"
complete_static_lib = true
}

group("default") {
deps = [ ":MatterApp" ]
}
40 changes: 40 additions & 0 deletions examples/lighting-app/beken/args.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (c) 2022 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.

# Options from standalone-chip.mk that differ from configure defaults. These
# options are used from examples/.

import("//build_overrides/chip.gni")

chip_device_platform = "beken"

chip_project_config_include = ""
chip_system_project_config_include = ""
chip_ble_project_config_include = ""

mbedtls_target = "${chip_root}/config/beken/mbedtls:mbedtls"
lwip_platform = "external"

chip_build_tests = false

chip_inet_config_enable_tcp_endpoint = true
chip_inet_config_enable_udp_endpoint = true

chip_config_network_layer_ble = true
chip_config_memory_management = "platform"
chip_enable_additional_data_advertising = true
chip_enable_rotating_device_id = true
chip_enable_ota_requestor = true

custom_toolchain = "${chip_root}/config/beken/toolchain:beken"
1 change: 1 addition & 0 deletions examples/lighting-app/beken/build_overrides
1 change: 1 addition & 0 deletions examples/lighting-app/beken/third_party/connectedhomeip
2 changes: 1 addition & 1 deletion src/platform/Beken/OTAImageProcessorImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include "flash_namespace_value.h"
#include <app/clusters/ota-requestor/BDXDownloader.h>

#include <cstring>
#include <lib/core/OTAImageHeader.h>
#include <platform/CHIPDeviceLayer.h>
Expand Down

0 comments on commit 8f34c9a

Please sign in to comment.