Skip to content

Commit a8dd074

Browse files
committed
First commit
1 parent cb9a6fb commit a8dd074

File tree

125 files changed

+35499
-2
lines changed

Some content is hidden

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

125 files changed

+35499
-2
lines changed

BUILD.gn

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
272272
# Set this to true to enable bl602 builds by default.
273273
enable_bl602_builds = false
274274

275+
# Set this to true to enable qcc743 builds by default.
276+
enable_qcc743_builds = false
277+
275278
# Set this to true to enable bl702 builds by default.
276279
enable_bl702_builds = false
277280

@@ -402,6 +405,9 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
402405
# Build the bl602 lighting app example.
403406
enable_bl602_lighting_app_build = enable_bl602_builds
404407

408+
# Build the qcc743 lighting app example.
409+
enable_qcc743_lighting_app_build = enable_qcc743_builds
410+
405411
# Build the bl702 lighting app example.
406412
enable_bl702_lighting_app_build = enable_bl702_builds
407413

build_overrides/qcc74x_iot_sdk.gni

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) 2021 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+
qcc74x_iot_sdk_build_root = "//third_party/qcc74x/"
17+
18+
qcc74x_sdk_root = "/opt/qcc74x_sdk"
19+
}

config/qcc74x/args.gni

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) 2022 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+
# Options from standalone-chip.mk that differ from configure defaults. These
16+
# options are used from examples/.
17+
18+
custom_toolchain =
19+
"//third_party/connectedhomeip/config/qcc74x/toolchain:riscv_gcc"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright (c) 2021 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/chip.gni")
16+
import("//build_overrides/pigweed.gni")
17+
import("$dir_pw_build/target_types.gni")
18+
19+
config("pw_string_config") {
20+
defines = [
21+
"_GLIBCXX_USE_C99_MATH_TR1",
22+
"_LDBL_EQ_DBL",
23+
]
24+
}
25+
26+
pw_source_set("pw_string_dep") {
27+
public_configs = [ ":pw_string_config" ]
28+
}
29+
30+
static_library("pw_rpc") {
31+
output_name = "libPwRpc"
32+
33+
public_configs = [ "${dir_pigweed}/pw_hdlc:default_config" ]
34+
35+
public_deps = [
36+
"$dir_pw_rpc:server",
37+
"$dir_pw_rpc/nanopb:echo_service",
38+
"${chip_root}/examples/platform/qcc74x/common/rpc/pw_sys_io:pw_sys_io",
39+
dir_pw_assert,
40+
dir_pw_checksum,
41+
dir_pw_hdlc,
42+
dir_pw_log,
43+
]
44+
45+
output_dir = "${root_out_dir}/lib"
46+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2021 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/chip.gni")
16+
import("//build_overrides/pigweed.gni")
17+
18+
pw_log_BACKEND = "$dir_pw_log_basic"
19+
pw_assert_BACKEND = "$dir_pw_assert_log"
20+
pw_sys_io_BACKEND =
21+
"${chip_root}/examples/platform/qcc74x/common/rpc/pw_sys_io:pw_sys_io"
22+
23+
pw_string_CONFIG =
24+
"${chip_root}/config/qcc74x/common/lib/pw_rpc:pw_string_dep"
25+
26+
pw_build_LINK_DEPS = [
27+
"$dir_pw_assert:impl",
28+
"$dir_pw_log:impl",
29+
]
30+
31+
dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"

config/qcc74x/toolchain/BUILD.gn

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2021 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("riscv_toolchain.gni")
16+
17+
riscv_toolchain("riscv_gcc") {
18+
toolchain_args = {
19+
}
20+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright (c) 2021 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_overrides/qcc74x_iot_sdk.gni")
19+
import("${build_root}/toolchain/gcc_toolchain.gni")
20+
import("${chip_root}/src/platform/device.gni")
21+
22+
template("riscv_toolchain") {
23+
gcc_toolchain(target_name) {
24+
_tool_name_root = ""
25+
26+
if ("linux" == host_os) {
27+
if (chip_device_platform == "qcc743") {
28+
_tool_name_root = "${qcc74x_sdk_root}/toolchain/t-head-riscv/gcc_t-head_v2.6.1/bin/riscv64-unknown-elf-"
29+
} else {
30+
_tool_name_root = "${qcc74x_sdk_root}/toolchain/riscv/Linux/bin/riscv64-unknown-elf-"
31+
}
32+
} else if ("mac" == host_os || "darwin" == host_os) {
33+
_tool_name_root = "${qcc74x_sdk_root}/toolchain/riscv/Darwin/bin/riscv64-unknown-elf-"
34+
}
35+
36+
ar = _tool_name_root + "ar"
37+
cc = _tool_name_root + "gcc"
38+
cxx = _tool_name_root + "g++"
39+
40+
toolchain_args = {
41+
current_cpu = "riscv"
42+
current_os = invoker.current_os
43+
is_clang = false
44+
45+
forward_variables_from(invoker.toolchain_args, "*")
46+
}
47+
}
48+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2021 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+
qcc74x_iot_sdk_build_root =
17+
"//third_party/connectedhomeip/third_party/qcc74x"
18+
19+
qcc74x_sdk_root = "/opt/qcc74x_sdk"
20+
}

0 commit comments

Comments
 (0)