diff --git a/build_overrides/freertos.gni b/build_overrides/freertos.gni new file mode 100644 index 00000000000000..61a44edfb45174 --- /dev/null +++ b/build_overrides/freertos.gni @@ -0,0 +1,18 @@ +# 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. + +declare_args() { + # Root directory for FreeRTOS + freertos_root = "//third_party/freertos" +} diff --git a/build_overrides/ti_simplelink_sdk.gni b/build_overrides/ti_simplelink_sdk.gni new file mode 100644 index 00000000000000..cc3a9a514dd20a --- /dev/null +++ b/build_overrides/ti_simplelink_sdk.gni @@ -0,0 +1,18 @@ +# 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. + +declare_args() { + # Root directory for TI SimpleLink SDK build helpers. + ti_simplelink_sdk_build_root = "//third_party/ti_simplelink_sdk" +} diff --git a/config/cc13x2_26x2/toolchain/BUILD.gn b/config/cc13x2_26x2/toolchain/BUILD.gn new file mode 100644 index 00000000000000..e62b1fba7452f8 --- /dev/null +++ b/config/cc13x2_26x2/toolchain/BUILD.gn @@ -0,0 +1,25 @@ +# 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_root}/toolchain/arm_gcc/arm_toolchain.gni") + +arm_toolchain("cc13x2_26x2_lock_app") { + toolchain_args = { + current_os = "freertos" + import("${chip_root}/examples/lock-app/cc13x2_26x2/args.gni") + } +} diff --git a/src/platform/cc13x2_26x2/args.gni b/src/platform/cc13x2_26x2/args.gni index 8b2a11137dff18..d32cae2b69690c 100644 --- a/src/platform/cc13x2_26x2/args.gni +++ b/src/platform/cc13x2_26x2/args.gni @@ -21,8 +21,6 @@ arm_platform_config = chip_device_platform = "cc13x2_26x2" -freertos_target = "${chip_root}/third_party/ti_simplelink_sdk:freertos" - mbedtls_target = "${chip_root}/third_party/ti_simplelink_sdk:mbedtls" openthread_external_mbedtls = mbedtls_target openthread_external_platform = diff --git a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni index 8d82ed44576625..b089217c9ea762 100644 --- a/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni +++ b/third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni @@ -16,8 +16,11 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("//build_overrides/freertos.gni") import("//build_overrides/mbedtls.gni") +import("//build_overrides/openthread.gni") +import("//build_overrides/pigweed.gni") import("//build_overrides/ti_simplelink_sdk.gni") +import("${dir_pw_build}/python.gni") import("${freertos_root}/freertos.gni") import("${mbedtls_root}/mbedtls.gni") import("ti_simplelink_board.gni") @@ -63,7 +66,7 @@ template("ti_sysconfig") { } } - action("${target_name}_gen") { + pw_python_action("${target_name}_gen") { script = "${ti_simplelink_sdk_build_root}/run_sysconfig.py" sources = invoker.sources outputs = gen_outputs @@ -227,6 +230,7 @@ template("ti_simplelink_sdk") { "${chip_root}/third_party/ti_simplelink_sdk:freertos", "${chip_root}/third_party/ti_simplelink_sdk:mbedtls", "${chip_root}/third_party/ti_simplelink_sdk:ti_simplelink_sysconfig", + "${openthread_root}/src/core:libopenthread_core_headers", ] configs -= [ "${build_root}/config/compiler:std_default" ]