Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TI] initial cc32xx support #18822

Merged
merged 15 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ auth
AuthMode
autoApplyImage
autocompletion
AutoConf
autoconnect
autocrlf
autogenerated
Expand Down Expand Up @@ -1304,6 +1305,7 @@ trackFree
TransferSession
transitionTime
TransportMgrBase
TRNG
TrustedRootCertificates
tsan
TSG
Expand Down
5 changes: 5 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@
url = https://github.com/bouffalolab/bl_iot_sdk_matter.git
branch = bl602_release
platforms = bl602
[submodule "third_party/ti_simplelink_sdk/repo_cc32xx"]
path = third_party/ti_simplelink_sdk/repo_cc32xx
url = https://github.com/TexasInstruments/cc32xx_open_sdk.git
branch = main
platform = cc32xx
[submodule "third_party/nxp/mw320_sdk/repo"]
path = third_party/nxp/mw320_sdk/repo
url = https://github.com/nxptest/mw320_sdk
Expand Down
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@
"ratio": "cpp",
"set": "cpp",
"stack": "cpp",
"regex": "cpp"
"regex": "cpp",
"condition_variable": "cpp",
"numeric": "cpp",
"random": "cpp",
"thread": "cpp"
},
"files.eol": "\n",
"editor.formatOnSave": true,
Expand Down
25 changes: 25 additions & 0 deletions config/cc32xx/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
@@ -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("cc32xx_lock_app") {
toolchain_args = {
current_os = "freertos"
import("${chip_root}/examples/lock-app/cc32xx/args.gni")
}
}
28 changes: 28 additions & 0 deletions examples/lock-app/cc32xx/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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")

# The location of the build configuration file.
buildconfig = "${build_root}/config/BUILDCONFIG.gn"

# CHIP uses angle bracket includes.
check_system_includes = true

default_args = {
target_cpu = "arm"
target_os = "freertos"

import("//args.gni")
}
119 changes: 119 additions & 0 deletions examples/lock-app/cc32xx/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# 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/ti_simplelink_sdk.gni")
import("${build_root}/config/defaults.gni")
import("${chip_root}/src/platform/device.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/lock-app/cc32xx"

ti_simplelink_sdk("sdk") {
include_dirs = [ "${project_dir}/main/include" ]

defines = []
if (is_debug) {
defines += [ "BUILD_RELEASE=0" ]
} else {
defines += [ "BUILD_RELEASE=1" ]
}
}

ti_sysconfig("sysconfig") {
sources = [ "${project_dir}/chip.syscfg" ]
outputs = [
"ti_drivers_net_wifi_config.c",
"ti_net_config.c",
"ti_drivers_config.c",
"ti_drivers_config.h",
]
}

source_set("lock_app_sdk") {
defines = []

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

sources = [
"${chip_root}/src/platform/cc32xx/Logging.cpp",
"${project_dir}/main/cc32xxWifiInit.c",
"${project_dir}/main/main.cpp",
"${ti_simplelink_sdk_root}/examples/rtos/common/ifmod/lwip_if.c",
"${ti_simplelink_sdk_root}/examples/rtos/common/ifmod/utils_if.c",
"${ti_simplelink_sdk_root}/examples/rtos/common/ifmod/wifi_if.c",
]

include_dirs = [
"${project_dir}/include",
"${project_dir}/main",
"${project_dir}/main/ifmod/",
"${chip_root}/src/platform/cc32xx",
]

deps = [
":sdk",
":sysconfig",
"${chip_root}/examples/lock-app/lock-common",
"${chip_root}/src/lib",
"${chip_root}/src/setup_payload",
]
}

ti_simplelink_executable("lock_app") {
defines = []
output_name = "chip-${ti_simplelink_board}-lock-example.out"

sources = [
"${project_dir}/main/AppTask.cpp",
"${project_dir}/main/BoltLockManager.cpp",
"${project_dir}/main/CXXExceptionStubs.cpp",
"${project_dir}/main/ZclCallbacks.cpp",
]

deps = [
":lock_app_sdk",
":sdk",
":sysconfig",
"${chip_root}/examples/lock-app/lock-common",
"${chip_root}/src/lib",
"${chip_root}/src/setup_payload",
]

include_dirs = [
"${project_dir}",
"${project_dir}/main",
]

cflags = [
"-Wno-implicit-fallthrough",
"-Wno-sign-compare",
"-Wconversion",
]

output_dir = root_out_dir
}

group("cc32xx") {
deps = [ ":lock_app" ]
}

group("default") {
deps = [ ":cc32xx" ]
}
Loading