-
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.
[gn] add zephyr platform to gn build system (#2320)
* [gn] add nRF Connect SDK support with gn * [nrfconnect] include missing header in device layer * [core] fix signed/unsigned comparison * [thread] use proper sprintf format for uint32_t * [zephyr] remove uses of deprecated types and fix casting * [nrfconnect] clean up unused include * [github] move nRF Connect build configuration
- Loading branch information
Showing
24 changed files
with
374 additions
and
214 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 |
---|---|---|
|
@@ -64,49 +64,3 @@ jobs: | |
${{ env.BUILD_TYPE }}-example-build-${{ | ||
steps.outsuffix.outputs.value }} | ||
path: /tmp/output_binaries/${{ env.BUILD_TYPE }}-build | ||
|
||
nrfconnect: | ||
name: nRF Connect SDK | ||
|
||
env: | ||
BUILD_TYPE: nrfconnect | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: connectedhomeip/chip-build-nrf-platform:0.4.2 | ||
volumes: | ||
- "/tmp/bloat_reports:/tmp/bloat_reports" | ||
- "/tmp/output_binaries:/tmp/output_binaries" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# Fetch depth 0 to get all history and be able to check mergepoint for bloat report | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Build example nRF Connect SDK Lock App | ||
run: scripts/examples/nrfconnect_lock_app.sh | ||
- name: Copy aside build products | ||
run: | | ||
mkdir -p example_binaries/$BUILD_TYPE-build | ||
cp examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \ | ||
example_binaries/$BUILD_TYPE-build/chip-nrf52840-lock-example.elf | ||
- name: Binary artifact suffix | ||
id: outsuffix | ||
uses: haya14busa/[email protected] | ||
with: | ||
cond: ${{ github.event.pull_request.number == '' }} | ||
if_true: "${{ github.sha }}" | ||
if_false: "pull-${{ github.event.pull_request.number }}" | ||
- name: Copy aside bloat report & binaries | ||
run: | | ||
cp -r example_binaries/$BUILD_TYPE-build /tmp/output_binaries/ | ||
- name: Uploading Binaries | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: | ||
${{ env.BUILD_TYPE }}-example-build-${{ | ||
steps.outsuffix.outputs.value }} | ||
path: /tmp/output_binaries/${{ env.BUILD_TYPE }}-build |
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 |
---|---|---|
|
@@ -158,3 +158,48 @@ jobs: | |
steps.outsuffix.outputs.value }} | ||
path: | | ||
out/lock_app_debug/BRD4161A/chip-efr32-lock-example.out | ||
nrfconnect: | ||
name: nRF Connect SDK | ||
env: | ||
BUILD_TYPE: nrfconnect | ||
|
||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: connectedhomeip/chip-build-nrf-platform:0.4.2 | ||
volumes: | ||
- "/tmp/bloat_reports:/tmp/bloat_reports" | ||
- "/tmp/output_binaries:/tmp/output_binaries" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# Fetch depth 0 to get all history and be able to check mergepoint for bloat report | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Build example nRF Connect SDK Lock App | ||
run: scripts/examples/nrfconnect_lock_app.sh | ||
- name: Copy aside build products | ||
run: | | ||
mkdir -p example_binaries/$BUILD_TYPE-build | ||
cp examples/lock-app/nrfconnect/build/zephyr/zephyr.elf \ | ||
example_binaries/$BUILD_TYPE-build/chip-nrf52840-lock-example.elf | ||
- name: Binary artifact suffix | ||
id: outsuffix | ||
uses: haya14busa/[email protected] | ||
with: | ||
cond: ${{ github.event.pull_request.number == '' }} | ||
if_true: "${{ github.sha }}" | ||
if_false: "pull-${{ github.event.pull_request.number }}" | ||
- name: Copy aside bloat report & binaries | ||
run: | | ||
cp -r example_binaries/$BUILD_TYPE-build /tmp/output_binaries/ | ||
- name: Uploading Binaries | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: | ||
${{ env.BUILD_TYPE }}-example-build-${{ | ||
steps.outsuffix.outputs.value }} | ||
path: /tmp/output_binaries/${{ env.BUILD_TYPE }}-build |
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) 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. | ||
|
||
# The location of the build configuration file. | ||
buildconfig = "//build/config/BUILDCONFIG.gn" | ||
|
||
# CHIP uses angle bracket includes. | ||
check_system_includes = true | ||
|
||
# Allow loading paths relative to //gn. | ||
secondary_source = "//third_party/connectedhomeip/gn/" | ||
|
||
default_args = { | ||
target_cpu = "arm" | ||
target_os = "zephyr" | ||
|
||
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,30 @@ | ||
# 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/chip.gni") | ||
|
||
import("//${chip_root}/gn/chip/tests.gni") | ||
|
||
assert(current_os == "zephyr") | ||
|
||
group("dummy") { | ||
} | ||
|
||
group("nrfconnect") { | ||
deps = [ "${chip_root}/src/lib" ] | ||
} | ||
|
||
group("default") { | ||
deps = [ ":nrfconnect" ] | ||
} |
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,38 @@ | ||
# 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/chip.gni") | ||
|
||
nrfconnect_target = get_label_info(":nrfconnect", "label_no_toolchain") | ||
|
||
chip_device_platform = "nrfconnect" | ||
chip_logging_style = "external" | ||
|
||
chip_config_network_layer_ble = true | ||
|
||
chip_project_config_include = "<CHIPProjectConfig.h>" | ||
chip_ble_project_config_include = chip_project_config_include | ||
chip_device_project_config_include = chip_project_config_include | ||
chip_inet_project_config_include = chip_project_config_include | ||
chip_system_project_config_include = chip_project_config_include | ||
|
||
chip_build_tests = false | ||
chip_inet_config_enable_tun_endpoint = chip_build_tests | ||
chip_inet_config_enable_raw_endpoint = chip_build_tests | ||
chip_inet_config_enable_tcp_endpoint = chip_build_tests | ||
chip_inet_config_enable_dns_resolver = chip_build_tests | ||
chip_inet_config_enable_ipv4 = chip_build_tests | ||
custom_toolchain = "//toolchain:zephyr" | ||
|
||
mbedtls_target = "//:dummy" |
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 @@ | ||
../../examples/build_overrides |
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
Oops, something went wrong.