|
| 1 | +# Copyright (c) 2020 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 | +import("//build_overrides/chip.gni") |
| 17 | +import("//build_overrides/lwip.gni") |
| 18 | +import("//build_overrides/mw320_sdk.gni") |
| 19 | + |
| 20 | +import("${mw320_sdk_build_root}/mw320_executable.gni") |
| 21 | +import("${mw320_sdk_build_root}/mw320_sdk.gni") |
| 22 | + |
| 23 | +assert(current_os == "freertos") |
| 24 | + |
| 25 | +examples_plat_dir = "${chip_root}/examples/platform/nxp/mw320" |
| 26 | + |
| 27 | +mw320_sdk("sdk") { |
| 28 | + include_dirs = [ |
| 29 | + "${chip_root}/src/platform/nxp/mw320", |
| 30 | + "${examples_plat_dir}/app/project_include", |
| 31 | + "${chip_root}/src/app/util", |
| 32 | + "${chip_root}/examples/all-clusters-app/nxp/mw320/include", |
| 33 | + ] |
| 34 | + |
| 35 | + sources = [ |
| 36 | + "include/CHIPProjectConfig.h", |
| 37 | + "include/FreeRTOSConfig.h", |
| 38 | + ] |
| 39 | + |
| 40 | + defines = [] |
| 41 | + |
| 42 | + if (is_debug) { |
| 43 | + defines += [ "BUILD_RELEASE=0" ] |
| 44 | + } else { |
| 45 | + defines += [ "BUILD_RELEASE=1" ] |
| 46 | + } |
| 47 | +} |
| 48 | + |
| 49 | +mw320_executable("shell_mw320") { |
| 50 | + include_dirs = [] |
| 51 | + defines = [] |
| 52 | + output_name = "all-cluster-mw320.out" |
| 53 | + |
| 54 | + public_deps = [ |
| 55 | + ":sdk", |
| 56 | + "${chip_root}/examples/all-clusters-app/all-clusters-common", |
| 57 | + "${chip_root}/examples/shell/shell_common:shell_common", |
| 58 | + "${chip_root}/src/lib", |
| 59 | + "${chip_root}/src/lib/shell", |
| 60 | + "${chip_root}/src/setup_payload", |
| 61 | + ] |
| 62 | + |
| 63 | + include_dirs = [ |
| 64 | + "${chip_root}/src/platform/nxp/mw320", |
| 65 | + "${examples_plat_dir}/app/project_include", |
| 66 | + "${chip_root}/src/app/util", |
| 67 | + "${chip_root}/examples/all-clusters-app/all-clusters-common/include", |
| 68 | + "${chip_root}/examples/all-clusters-app/nxp/mw320/include", |
| 69 | + ] |
| 70 | + sources = [ |
| 71 | + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", |
| 72 | + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", |
| 73 | + "${chip_root}/src/lib/shell/streamer_mw320.cpp", |
| 74 | + "binding-handler.cpp", |
| 75 | + "include/CHIPProjectConfig.h", |
| 76 | + "include/FreeRTOSConfig.h", |
| 77 | + "main.cpp", |
| 78 | + ] |
| 79 | + |
| 80 | + output_dir = root_out_dir |
| 81 | + |
| 82 | + ldscript = "${examples_plat_dir}/app/ldscripts/88MW320_xx_xxxx_flash.ld" |
| 83 | + |
| 84 | + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] |
| 85 | + defines = [ |
| 86 | + "MW320_SHELL_STREAMER", |
| 87 | + "SHELL_STREAMER_APP_SPECIFIC", |
| 88 | + ] |
| 89 | +} |
| 90 | + |
| 91 | +group("mw320") { |
| 92 | + deps = [ ":shell_mw320" ] |
| 93 | +} |
| 94 | + |
| 95 | +group("default") { |
| 96 | + deps = [ ":mw320" ] |
| 97 | +} |
0 commit comments