Skip to content

Commit

Permalink
[Silabs] Update silabs CI (#25729)
Browse files Browse the repository at this point in the history
* Use container sdk

* fix wifi
  • Loading branch information
jepenven-silabs authored and pull[bot] committed Oct 17, 2023
1 parent 7bd191e commit 4042991
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 67 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-efr32:0.6.47
image: connectedhomeip/chip-build-efr32:0.6.50
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand All @@ -52,7 +52,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform efr32
run: scripts/checkout_submodules.py --shallow --platform silabs_docker

# - name: Out of Tree verification
# run: third_party/silabs/out_of_tree_verification.sh
Expand Down Expand Up @@ -114,15 +114,15 @@ jobs:
- name: Build example EFR32+WF200 WiFi Lock app for BRD4161A
timeout-minutes: 15
run: |
scripts/examples/gn_efr32_example.sh examples/lock-app/silabs/efr32/ out/lock_app_wifi_wf200 BRD4161A is_debug=false chip_logging=false --wifi wf200
scripts/examples/gn_efr32_example.sh examples/lock-app/silabs/efr32/ out/lock_app_wifi_wf200 BRD4161A is_debug=false chip_logging=false --wifi wf200 --docker
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+wf200 lock-app \
out/lock_app_wifi_wf200/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
- name: Build example EFR32+RS9116 WiFi Lighting app for BRD4161A
timeout-minutes: 15
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_wifi_rs9116 BRD4161A --wifi rs9116
scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_wifi_rs9116 BRD4161A --wifi rs9116 --docker
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs9116 lighting-app \
out/lighting_app_wifi_rs9116/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
- name: Clean out build output
Expand Down
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
path = third_party/freertos/repo
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git
branch = V10.3.1-kernel-only
platforms = ameba,cc13x2_26x2,bouffalolab,efr32,esp32,k32w0,infineon,qpg,cc32xx
platforms = ameba,cc13x2_26x2,bouffalolab,efr32,esp32,k32w0,infineon,qpg,cc32xx,silabs_docker
[submodule "simw-top-mini"]
path = third_party/simw-top-mini/repo
url = https://github.com/NXP/plug-and-trust.git
Expand All @@ -76,7 +76,7 @@
path = third_party/openthread/ot-efr32
url = https://github.com/SiliconLabs/ot-efr32.git
branch = matter_sve
platforms = efr32
platforms = efr32,silabs_docker
[submodule "third_party/openthread/ot-ifx"]
path = third_party/openthread/ot-ifx
url = https://github.com/Infineon/ot-ifx-release.git
Expand Down Expand Up @@ -238,7 +238,7 @@
path = third_party/silabs/matter_support
url = https://github.com/SiliconLabs/sdk_support.git
branch = main
platforms = efr32
platforms = efr32,silabs_docker
[submodule "third_party/silabs/gecko_sdk"]
path = third_party/silabs/gecko_sdk
url = https://github.com/SiliconLabs/gecko_sdk.git
Expand All @@ -248,7 +248,7 @@
path = third_party/silabs/wiseconnect-wifi-bt-sdk
url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git
branch = master
platforms = efr32
platforms = efr32,silabs_docker
[submodule "editline"]
path = third_party/editline/repo
url = https://github.com/troglobit/editline.git
Expand Down
17 changes: 0 additions & 17 deletions build_overrides/ot_efr32.gni

This file was deleted.

17 changes: 0 additions & 17 deletions examples/build_overrides/ot_efr32.gni

This file was deleted.

1 change: 1 addition & 0 deletions scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def __init__(self,
# case for pre-installed images), use it directly.
sdk_path = shlex.quote(os.environ['GSDK_ROOT'])
self.extra_gn_options.append(f"efr32_sdk_root=\"{sdk_path}\"")
self.extra_gn_options.append(f"openthread_root=\"{sdk_path}/util/third_party/openthread\"")

def GnBuildArgs(self):
return self.extra_gn_options
Expand Down
1 change: 1 addition & 0 deletions scripts/checkout_submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
'mw320',
'genio',
'openiotsdk',
'silabs_docker',
])

Module = namedtuple('Module', 'name path platforms')
Expand Down
15 changes: 13 additions & 2 deletions scripts/examples/gn_efr32_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ source "$CHIP_ROOT/scripts/activate.sh"
set -x
env
USE_WIFI=false
USE_DOCKER=false
USE_GIT_SHA_FOR_VERSION=true

SILABS_THREAD_TARGET=\""../silabs:ot-efr32-cert"\"
Expand Down Expand Up @@ -120,6 +121,8 @@ if [ "$#" == "0" ]; then
Currently : v1.0-<branchName>-<ShortCommitSha>
--release
Remove all logs and debugs features (including the LCD). Yield the smallest image size possible
--docker
Change GSDK root for docker builds
"
elif [ "$#" -lt "2" ]; then
Expand Down Expand Up @@ -199,6 +202,11 @@ else
optArgs+="is_debug=false disable_lcd=true chip_build_libshell=false enable_openthread_cli=false use_external_flash=false chip_logging=false silabs_log_enabled=false "
shift
;;
--docker)
optArgs+="efr32_sdk_root=\"$GSDK_ROOT\" "
USE_DOCKER=true
shift
;;
*)
if [ "$1" =~ *"use_rs9116=true"* ] || [ "$1" =~ *"use_SiWx917=true"* ] || [ "$1" =~ *"use_wf200=true"* ]; then
USE_WIFI=true
Expand Down Expand Up @@ -228,8 +236,11 @@ else
if [ "$USE_WIFI" == true ]; then
gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --dotfile="$ROOT"/build_for_wifi_gnfile.gn --args="silabs_board=\"$SILABS_BOARD\" $optArgs" "$BUILD_DIR"
else
# thread build
#
# OpenThread build
if [ "$USE_DOCKER" == true ]; then
optArgs+="openthread_root=\"$GSDK_ROOT/util/third_party/openthread\" "
fi

if [ -z "$optArgs" ]; then
gn gen --check --fail-on-unused-args --export-compile-commands --root="$ROOT" --args="silabs_board=\"$SILABS_BOARD\"" "$BUILD_DIR"
else
Expand Down
25 changes: 12 additions & 13 deletions third_party/openthread/platforms/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import("//build_overrides/efr32_sdk.gni")
import("//build_overrides/openthread.gni")

import("//build_overrides/openthread.gni")
import("//build_overrides/ot_efr32.gni")

import("${efr32_sdk_build_root}/efr32_sdk.gni")
import("${efr32_sdk_build_root}/silabs_board.gni")
Expand All @@ -32,7 +31,7 @@ config("openthread_efr32_config") {
include_dirs = [
"${chip_root}/examples/platform/efr32",
"${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}",
"${openthread_efr32_root}",
"${sl_ot_efr32_root}",
]

# temporarily disable check until gsdk pulls in a more recent version of openthread
Expand All @@ -41,9 +40,9 @@ config("openthread_efr32_config") {

source_set("openthread_core_config_efr32") {
sources = [
"${openthread_efr32_root}/openthread-core-efr32-config-check.h",
"${openthread_efr32_root}/openthread-core-efr32-config.h",
"${openthread_root}/src/cli/cli_config.h",
"${sl_ot_efr32_root}/openthread-core-efr32-config-check.h",
"${sl_ot_efr32_root}/openthread-core-efr32-config.h",
]

public_deps = [ "${efr32_sdk_build_root}:efr32_sdk" ]
Expand All @@ -53,16 +52,16 @@ source_set("openthread_core_config_efr32") {

source_set("libopenthread-efr32") {
sources = [
"${openthread_efr32_root}/alarm.c",
"${openthread_efr32_root}/crypto.c",
"${openthread_efr32_root}/entropy.c",
"${openthread_efr32_root}/flash.c",
"${openthread_efr32_root}/ieee802154-packet-utils.cpp",
"${openthread_efr32_root}/misc.c",
"${openthread_efr32_root}/radio.c",
"${openthread_efr32_root}/sleep.c",
"${openthread_efr32_root}/system.c",
"${openthread_root}/examples/apps/cli/cli_uart.cpp",
"${sl_ot_efr32_root}/alarm.c",
"${sl_ot_efr32_root}/crypto.c",
"${sl_ot_efr32_root}/entropy.c",
"${sl_ot_efr32_root}/flash.c",
"${sl_ot_efr32_root}/ieee802154-packet-utils.cpp",
"${sl_ot_efr32_root}/misc.c",
"${sl_ot_efr32_root}/radio.c",
"${sl_ot_efr32_root}/sleep.c",
"${sl_ot_efr32_root}/system.c",
]

public_deps = [
Expand Down
15 changes: 6 additions & 9 deletions third_party/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ if (silabs_board == "BRD4325B") { # CCP board
declare_args() {
# Build target to use for efr32 SDK. Use this to set global SDK defines.
efr32_sdk_target = ""
sl_ot_efr32_root =
"${chip_root}/third_party/silabs/gecko_sdk/protocol/openthread"
sl_openthread_root =
"${chip_root}/third_party/silabs/gecko_sdk/util/third_party/openthread"

use_thread_coap_lib = false
sl_matter_version_str = ""
}
Expand Down Expand Up @@ -89,7 +86,7 @@ if (use_silabs_thread_lib) {
"${chip_root}/examples/platform/silabs/efr32",
"${chip_root}/examples/platform/silabs",
"${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}",
"${sl_ot_efr32_root}/platform-abstraction/efr32",
"${sl_ot_efr32_root}",
"${sl_openthread_root}/src/",
]

Expand All @@ -99,8 +96,8 @@ if (use_silabs_thread_lib) {

source_set("openthread_core_config_efr32") {
sources = [
"${sl_ot_efr32_root}/platform-abstraction/efr32/openthread-core-efr32-config-check.h",
"${sl_ot_efr32_root}/platform-abstraction/efr32/openthread-core-efr32-config.h",
"${sl_ot_efr32_root}/openthread-core-efr32-config-check.h",
"${sl_ot_efr32_root}/openthread-core-efr32-config.h",
]

public_deps = [
Expand Down Expand Up @@ -176,8 +173,8 @@ if (use_silabs_thread_lib) {
public_configs += [ "${sl_openthread_root}:openthread_${XTD}_config" ]

libs = [
"${sl_ot_efr32_root}/libs/libsl_ot_stack_${XTD}_${COAP_API}${silabs_family}_gcc.a",
"${sl_ot_efr32_root}/libs/libsl_platform_${XTD}_dmp_${silabs_family}_gcc.a",
"${sl_ot_libs_path}/libs/libsl_ot_stack_${XTD}_${COAP_API}${silabs_family}_gcc.a",
"${sl_ot_libs_path}/libs/libsl_platform_${XTD}_dmp_${silabs_family}_gcc.a",
]
}
}
7 changes: 7 additions & 0 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ declare_args() {

assert(efr32_sdk_root != "", "efr32_sdk_root must be specified")

declare_args() {
sl_ot_libs_path = "${efr32_sdk_root}/protocol/openthread"
sl_ot_efr32_root =
"${efr32_sdk_root}/protocol/openthread/platform-abstraction/efr32"
sl_openthread_root = "${efr32_sdk_root}/util/third_party/openthread"
}

# Defines an efr32 SDK build target.
#
# Parameters:
Expand Down
3 changes: 2 additions & 1 deletion third_party/silabs/lwip.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
# limitations under the License.
import("//build_overrides/efr32_sdk.gni")
import("//build_overrides/lwip.gni")
import("${efr32_sdk_build_root}/efr32_sdk.gni")

# Defines a lwIP build target.
#
# lwIP depends on external header files to compile. This template defines
# a combined build of the lwIP sources plus target configuration.
template("lwip_target") {
_lwip_root = "${efr32_sdk_build_root}/gecko_sdk/util/third_party/lwip/lwip"
_lwip_root = "${efr32_sdk_root}/util/third_party/lwip/lwip"

lwip_target_name = target_name

Expand Down

0 comments on commit 4042991

Please sign in to comment.