-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TI] initial cc32xx support (#18822)
* inital cc32xx commit Co-authored-by: Suyash Jain <[email protected]> Co-authored-by: Kobi Leibovitch <[email protected]> * 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 <[email protected]> Co-authored-by: Kobi Leibovitch <[email protected]> Co-authored-by: Restyled.io <[email protected]> Co-authored-by: Andrei Litvin <[email protected]>
- Loading branch information
1 parent
ef6a53c
commit f496784
Showing
67 changed files
with
5,475 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ] | ||
} |
Oops, something went wrong.