Skip to content

Commit f496784

Browse files
abiradartis-jain2022kobil10restyled-commitsandy31415
authored
[TI] initial cc32xx support (#18822)
* inital cc32xx commit Co-authored-by: Suyash Jain <s-jain@ti.com> Co-authored-by: Kobi Leibovitch <kobile@ti.com> * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by prettier-markdown * check-spellcheck and misspell fixes * Restyled by gn * Restyled by prettier-markdown * added terms to .wordlist * backticks for code terms * dummy commit * dummy commit Co-authored-by: Suyash Jain <s-jain@ti.com> Co-authored-by: Kobi Leibovitch <kobile@ti.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Andrei Litvin <andy314@gmail.com>
1 parent ef6a53c commit f496784

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+5475
-115
lines changed

.github/.wordlist.txt

+2
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ auth
100100
AuthMode
101101
autoApplyImage
102102
autocompletion
103+
AutoConf
103104
autoconnect
104105
autocrlf
105106
autogenerated
@@ -1304,6 +1305,7 @@ trackFree
13041305
TransferSession
13051306
transitionTime
13061307
TransportMgrBase
1308+
TRNG
13071309
TrustedRootCertificates
13081310
tsan
13091311
TSG

.gitmodules

+5
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,11 @@
237237
url = https://github.com/bouffalolab/bl_iot_sdk_matter.git
238238
branch = bl602_release
239239
platforms = bl602
240+
[submodule "third_party/ti_simplelink_sdk/repo_cc32xx"]
241+
path = third_party/ti_simplelink_sdk/repo_cc32xx
242+
url = https://github.com/TexasInstruments/cc32xx_open_sdk.git
243+
branch = main
244+
platform = cc32xx
240245
[submodule "third_party/nxp/mw320_sdk/repo"]
241246
path = third_party/nxp/mw320_sdk/repo
242247
url = https://github.com/nxptest/mw320_sdk

.vscode/settings.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@
111111
"ratio": "cpp",
112112
"set": "cpp",
113113
"stack": "cpp",
114-
"regex": "cpp"
114+
"regex": "cpp",
115+
"condition_variable": "cpp",
116+
"numeric": "cpp",
117+
"random": "cpp",
118+
"thread": "cpp"
115119
},
116120
"files.eol": "\n",
117121
"editor.formatOnSave": true,

config/cc32xx/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("cc32xx_lock_app") {
21+
toolchain_args = {
22+
current_os = "freertos"
23+
import("${chip_root}/examples/lock-app/cc32xx/args.gni")
24+
}
25+
}

examples/lock-app/cc32xx/.gn

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
17+
# The location of the build configuration file.
18+
buildconfig = "${build_root}/config/BUILDCONFIG.gn"
19+
20+
# CHIP uses angle bracket includes.
21+
check_system_includes = true
22+
23+
default_args = {
24+
target_cpu = "arm"
25+
target_os = "freertos"
26+
27+
import("//args.gni")
28+
}

examples/lock-app/cc32xx/BUILD.gn

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
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/ti_simplelink_sdk.gni")
18+
import("${build_root}/config/defaults.gni")
19+
import("${chip_root}/src/platform/device.gni")
20+
import("${ti_simplelink_sdk_build_root}/ti_simplelink_executable.gni")
21+
import("${ti_simplelink_sdk_build_root}/ti_simplelink_sdk.gni")
22+
23+
assert(current_os == "freertos")
24+
25+
project_dir = "${chip_root}/examples/lock-app/cc32xx"
26+
27+
ti_simplelink_sdk("sdk") {
28+
include_dirs = [ "${project_dir}/main/include" ]
29+
30+
defines = []
31+
if (is_debug) {
32+
defines += [ "BUILD_RELEASE=0" ]
33+
} else {
34+
defines += [ "BUILD_RELEASE=1" ]
35+
}
36+
}
37+
38+
ti_sysconfig("sysconfig") {
39+
sources = [ "${project_dir}/chip.syscfg" ]
40+
outputs = [
41+
"ti_drivers_net_wifi_config.c",
42+
"ti_net_config.c",
43+
"ti_drivers_config.c",
44+
"ti_drivers_config.h",
45+
]
46+
}
47+
48+
source_set("lock_app_sdk") {
49+
defines = []
50+
51+
configs -= [ "${build_root}/config/compiler:std_default" ]
52+
configs += [ ":sdk_posix_config" ]
53+
54+
sources = [
55+
"${chip_root}/src/platform/cc32xx/Logging.cpp",
56+
"${project_dir}/main/cc32xxWifiInit.c",
57+
"${project_dir}/main/main.cpp",
58+
"${ti_simplelink_sdk_root}/examples/rtos/common/ifmod/lwip_if.c",
59+
"${ti_simplelink_sdk_root}/examples/rtos/common/ifmod/utils_if.c",
60+
"${ti_simplelink_sdk_root}/examples/rtos/common/ifmod/wifi_if.c",
61+
]
62+
63+
include_dirs = [
64+
"${project_dir}/include",
65+
"${project_dir}/main",
66+
"${project_dir}/main/ifmod/",
67+
"${chip_root}/src/platform/cc32xx",
68+
]
69+
70+
deps = [
71+
":sdk",
72+
":sysconfig",
73+
"${chip_root}/examples/lock-app/lock-common",
74+
"${chip_root}/src/lib",
75+
"${chip_root}/src/setup_payload",
76+
]
77+
}
78+
79+
ti_simplelink_executable("lock_app") {
80+
defines = []
81+
output_name = "chip-${ti_simplelink_board}-lock-example.out"
82+
83+
sources = [
84+
"${project_dir}/main/AppTask.cpp",
85+
"${project_dir}/main/BoltLockManager.cpp",
86+
"${project_dir}/main/CXXExceptionStubs.cpp",
87+
"${project_dir}/main/ZclCallbacks.cpp",
88+
]
89+
90+
deps = [
91+
":lock_app_sdk",
92+
":sdk",
93+
":sysconfig",
94+
"${chip_root}/examples/lock-app/lock-common",
95+
"${chip_root}/src/lib",
96+
"${chip_root}/src/setup_payload",
97+
]
98+
99+
include_dirs = [
100+
"${project_dir}",
101+
"${project_dir}/main",
102+
]
103+
104+
cflags = [
105+
"-Wno-implicit-fallthrough",
106+
"-Wno-sign-compare",
107+
"-Wconversion",
108+
]
109+
110+
output_dir = root_out_dir
111+
}
112+
113+
group("cc32xx") {
114+
deps = [ ":lock_app" ]
115+
}
116+
117+
group("default") {
118+
deps = [ ":cc32xx" ]
119+
}

0 commit comments

Comments
 (0)