-
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.
Implement the Pigweed-app example on EFR32 (#4630)
* Implement the Pigweed-app example on EFR32 - Init uart driver and create function to read and write a character - link those functions with pigweed backend - move some files that can be shared for all EFR32 examples to efr32/platform - create GN build structure for pigweed usage with EFR32 platform Implement the Pigweed-app example on EFR32 - Init uart driver and create function to read and write a character - link those functions with pigweed backend - move some files that can be shared for all EFR32 examples to efr32/platform - create GN build structure for pigweed usage with EFR32 platform Change uart driver from uartdrv to retargetSerial, using the dma was causing issues reading with pigweed proto Cleanup in the build GN files Some cleanup for the build * Restyled by whitespace * Restyled by gn * Restyled by prettier-markdown * Fix the new symlink to be relative paths Change copyright to 2021 for new files * Restyled by gn * Move config cpp17 -> std_cpp17 to lib/pw_rpc/BUILD.gn so it can be use for all examples. That config is only used when pw_rpc is build Create a with_pw_rpc.gni file in efr examples. This gni file need to be imported in the build args when we will want to build a example with pw_rpc (this is still a WIP) This doesn't impact pigweed-app example because it always runs the pw_rpc * Restyled by gn Co-authored-by: Restyled.io <[email protected]>
- Loading branch information
1 parent
571738d
commit f295f98
Showing
47 changed files
with
1,820 additions
and
806 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Copyright (c) 2021 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/chip.gni") | ||
import("//build_overrides/pigweed.gni") | ||
import("$dir_pw_build/target_types.gni") | ||
|
||
config("cpp17") { | ||
cflags_cc = [ "-std=gnu++17" ] | ||
cflags_c = [ "-std=gnu11" ] | ||
cflags_objc = [ "-std=gnu11" ] | ||
cflags_objcc = [ "-std=gnu++17" ] | ||
} | ||
|
||
config("std_cpp17") { | ||
configs = [ ":cpp17" ] | ||
} | ||
|
||
static_library("pw_rpc") { | ||
output_name = "libPwRpc" | ||
|
||
public_configs = [ "${dir_pigweed}/pw_hdlc:default_config" ] | ||
sources = [ "${dir_pigweed}/pw_hdlc/rpc_example/hdlc_rpc_server.cc" ] | ||
deps = [ | ||
"$dir_pw_rpc:server", | ||
"$dir_pw_rpc/nanopb:echo_service", | ||
"$dir_pw_rpc/system_server", | ||
"${chip_root}/examples/platform/efr32/pw_sys_io:pw_sys_io_efr32", | ||
"${dir_pigweed}/pw_hdlc:pw_rpc", | ||
dir_pw_assert, | ||
dir_pw_hdlc, | ||
dir_pw_log, | ||
] | ||
|
||
output_dir = "${root_out_dir}/lib" | ||
} |
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) 2021 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/chip.gni") | ||
import("//build_overrides/pigweed.gni") | ||
|
||
pw_log_BACKEND = "$dir_pw_log_basic" | ||
pw_assert_BACKEND = "$dir_pw_assert_log" | ||
pw_sys_io_BACKEND = | ||
"${chip_root}/examples/platform/efr32/pw_sys_io:pw_sys_io_efr32" | ||
pw_rpc_system_server_BACKEND = | ||
"${chip_root}/examples/common/pigweed:system_rpc_server" | ||
|
||
dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo" |
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,29 @@ | ||
# Copyright (c) 2021 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. | ||
|
||
# add this gni as import in your build args to use pigweed in the example | ||
# 'import("//with_pw_rpc.gni")' | ||
# *WIP* pigweed is not fully integrated in this EFR example yet | ||
|
||
import("//build_overrides/chip.gni") | ||
import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") | ||
import("${chip_root}/examples/platform/efr32/args.gni") | ||
|
||
efr32_sdk_target = get_label_info(":sdk", "label_no_toolchain") | ||
|
||
declare_args() { | ||
chip_build_pw_rpc_lib = true | ||
} | ||
|
||
default_configs_std = [ "${chip_root}/config/efr32/lib/pw_rpc:std_cpp17" ] |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.