Skip to content

Commit 8c56baf

Browse files
mspangwoody-apple
andauthored
Add cc13x2_26x2 build to unified build (project-chip#4572)
* Add cc13x2_26x2 build to unified build There are some missing files in build_overrides to build TI in the unified build, as well as some missing dependencies diagnosed by gn --check --fail-on-unused-args. Fix those issues so that cc13x2_26x2 can be built together with the other examples. Also despam the sysconfig generator so we don't drown out important diagnostics. Tested via ./gn_build.sh enable_cc13x2_26x2_builds=true ti_simplelink_sdk_root=\"$HOME/ti/simplelink_cc13x2_26x2_sdk_4_40_00_44\" ti_sysconfig_root=\"$HOME/ti/sysconfig_1.7.0\" * Use braces in substitution Co-authored-by: Justin Wood <woody@apple.com>
1 parent f416244 commit 8c56baf

File tree

5 files changed

+66
-3
lines changed

5 files changed

+66
-3
lines changed

build_overrides/freertos.gni

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
declare_args() {
16+
# Root directory for FreeRTOS
17+
freertos_root = "//third_party/freertos"
18+
}

build_overrides/ti_simplelink_sdk.gni

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
declare_args() {
16+
# Root directory for TI SimpleLink SDK build helpers.
17+
ti_simplelink_sdk_build_root = "//third_party/ti_simplelink_sdk"
18+
}

config/cc13x2_26x2/toolchain/BUILD.gn

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
18+
import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni")
19+
20+
arm_toolchain("cc13x2_26x2_lock_app") {
21+
toolchain_args = {
22+
current_os = "freertos"
23+
import("${chip_root}/examples/lock-app/cc13x2_26x2/args.gni")
24+
}
25+
}

src/platform/cc13x2_26x2/args.gni

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ arm_platform_config =
2121

2222
chip_device_platform = "cc13x2_26x2"
2323

24-
freertos_target = "${chip_root}/third_party/ti_simplelink_sdk:freertos"
25-
2624
mbedtls_target = "${chip_root}/third_party/ti_simplelink_sdk:mbedtls"
2725
openthread_external_mbedtls = mbedtls_target
2826
openthread_external_platform =

third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ import("//build_overrides/build.gni")
1616
import("//build_overrides/chip.gni")
1717
import("//build_overrides/freertos.gni")
1818
import("//build_overrides/mbedtls.gni")
19+
import("//build_overrides/openthread.gni")
20+
import("//build_overrides/pigweed.gni")
1921
import("//build_overrides/ti_simplelink_sdk.gni")
2022

23+
import("${dir_pw_build}/python.gni")
2124
import("${freertos_root}/freertos.gni")
2225
import("${mbedtls_root}/mbedtls.gni")
2326
import("ti_simplelink_board.gni")
@@ -63,7 +66,7 @@ template("ti_sysconfig") {
6366
}
6467
}
6568

66-
action("${target_name}_gen") {
69+
pw_python_action("${target_name}_gen") {
6770
script = "${ti_simplelink_sdk_build_root}/run_sysconfig.py"
6871
sources = invoker.sources
6972
outputs = gen_outputs
@@ -227,6 +230,7 @@ template("ti_simplelink_sdk") {
227230
"${chip_root}/third_party/ti_simplelink_sdk:freertos",
228231
"${chip_root}/third_party/ti_simplelink_sdk:mbedtls",
229232
"${chip_root}/third_party/ti_simplelink_sdk:ti_simplelink_sysconfig",
233+
"${openthread_root}/src/core:libopenthread_core_headers",
230234
]
231235

232236
configs -= [ "${build_root}/config/compiler:std_default" ]

0 commit comments

Comments
 (0)