| # 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") |
| import("//build_overrides/openthread.gni") |
| import("//build_overrides/ti_simplelink_sdk.gni") |
| |
| import("${build_root}/config/defaults.gni") |
| |
| import("${ti_simplelink_sdk_build_root}/ti_simplelink_executable.gni") |
| import("${ti_simplelink_sdk_build_root}/ti_simplelink_sdk.gni") |
| |
| assert(current_os == "freertos") |
| |
| project_dir = "${chip_root}/examples/persistent-storage/cc13x2x7_26x2x7" |
| |
| ti_simplelink_sdk("sdk") { |
| include_dirs = [ "${project_dir}/include" ] |
| |
| defines = [] |
| if (is_debug) { |
| defines += [ "BUILD_RELEASE=0" ] |
| } else { |
| defines += [ "BUILD_RELEASE=1" ] |
| } |
| } |
| |
| ti_sysconfig("sysconfig") { |
| sources = [ "${project_dir}/chip.syscfg" ] |
| |
| outputs = [ |
| "ti_devices_config.c", |
| "ti_drivers_config.c", |
| "ti_drivers_config.h", |
| ] |
| |
| public_configs = [ ":sdk_cc13x2x7_26x2x7_dmm_config" ] |
| |
| cflags = [ |
| "-Wno-comment", |
| "@" + rebase_path("${target_gen_dir}/sysconfig/ti_ble_app_config.opt", |
| root_build_dir), |
| "@" + rebase_path("${target_gen_dir}/sysconfig/ti_build_config.opt", |
| root_build_dir), |
| ] |
| } |
| |
| ti_simplelink_executable("persistent_storage") { |
| output_name = "chip-${ti_simplelink_board}-persistent_storage.out" |
| |
| sources = [ |
| "${project_dir}/../KeyValueStorageTest.cpp", |
| "${project_dir}/main.cpp", |
| ] |
| |
| deps = [ |
| ":sdk", |
| ":sysconfig", |
| "${chip_root}/src/lib", |
| ] |
| |
| include_dirs = [ |
| "${project_dir}", |
| "${project_dir}/..", |
| ] |
| |
| cflags = [ |
| "-Wno-implicit-fallthrough", |
| "-Wno-sign-compare", |
| "-Wconversion", |
| ] |
| |
| output_dir = root_out_dir |
| } |
| |
| group("cc13x2x7_26x2x7") { |
| deps = [ ":persistent_storage" ] |
| } |
| |
| group("default") { |
| deps = [ ":cc13x2x7_26x2x7" ] |
| } |