Skip to content

Commit

Permalink
[Silabs] Enabling CI on the BRD4338A board (#29261)
Browse files Browse the repository at this point in the history
* enabling brd4338a to github ci

* Restyled by autopep8

* renaming 917-soc to 917_soc

* reverting the linux file

* fixing the linux test case

* adding the suggestion from the linux to fix that ci

* adding the rps flag only for soc

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
chirag-silabs and restyled-commits authored Jan 9, 2024
1 parent 158502f commit 6ae3e2a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ jobs:
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
- name: Build BRD4338A variants
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--enable-flashbundle \
--target efr32-brd4338a-light-wifi-917_soc-skip_rps_generation \
build \
--copy-artifacts-to out/artifacts \
"
- name: Clean out build output
run: rm -rf ./out
- name: Build example EFR32+WF200 WiFi Lock app for BRD4161A
run: |
scripts/examples/gn_silabs_example.sh examples/lock-app/silabs out/lock_app_wifi_wf200 BRD4161A is_debug=false chip_logging=false --wifi wf200 --docker
Expand Down
1 change: 1 addition & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,7 @@
"efr32-brd4186a-window-covering",
"efr32-brd4187a-window-covering",
"efr32-brd4304a-window-covering",
"efr32-brd4338a-light-wifi-917_soc-skip_rps_generation",
"esp32-c3devkit-all-clusters",
"esp32-devkitc-all-clusters",
"esp32-devkitc-all-clusters-ipv6only",
Expand Down
3 changes: 3 additions & 0 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def BuildEfr32Target():
TargetPart('brd4186a', board=Efr32Board.BRD4186A),
TargetPart('brd4187a', board=Efr32Board.BRD4187A),
TargetPart('brd4304a', board=Efr32Board.BRD4304A),
TargetPart('brd4338a', board=Efr32Board.BRD4338A),
])

# apps
Expand Down Expand Up @@ -262,13 +263,15 @@ def BuildEfr32Target():
target.AppendModifier('rs911x', enable_rs911x=True).OnlyIfRe('-wifi')
target.AppendModifier('wf200', enable_wf200=True).OnlyIfRe('-wifi')
target.AppendModifier('wifi_ipv4', enable_wifi_ipv4=True).OnlyIfRe('-wifi')
target.AppendModifier('917_soc', enable_917_soc=True).OnlyIfRe('-wifi')
target.AppendModifier('additional_data_advertising',
enable_additional_data_advertising=True)
target.AppendModifier('use_ot_lib', enable_ot_lib=True).ExceptIfRe(
'-(wifi|use_ot_coap_lib)')
target.AppendModifier('use_ot_coap_lib', enable_ot_coap_lib=True).ExceptIfRe(
'-(wifi|use_ot_lib)')
target.AppendModifier('no-version', no_version=True)
target.AppendModifier('skip_rps_generation', use_rps_extension=False).OnlyIfRe('-wifi')

return target

Expand Down
16 changes: 15 additions & 1 deletion scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class Efr32Board(Enum):
BRD4304A = 8
BRD4187C = 9
BRD4186C = 10
BRD4338A = 11

def GnArgName(self):
if self == Efr32Board.BRD4161A:
Expand All @@ -121,6 +122,8 @@ def GnArgName(self):
return 'BRD4186C'
elif self == Efr32Board.BRD4187C:
return 'BRD4187C'
elif self == Efr32Board.BRD4338A:
return 'BRD4338A'
else:
raise Exception('Unknown board #: %r' % self)

Expand Down Expand Up @@ -149,7 +152,9 @@ def __init__(self,
enable_additional_data_advertising: bool = False,
enable_ot_lib: bool = False,
enable_ot_coap_lib: bool = False,
no_version: bool = False
no_version: bool = False,
enable_917_soc: bool = False,
use_rps_extension: bool = True
):
super(Efr32Builder, self).__init__(
root=app.BuildRoot(root),
Expand Down Expand Up @@ -200,6 +205,8 @@ def __init__(self,
self.extra_gn_options.append('use_rs911x=true')
elif enable_wf200:
self.extra_gn_options.append('use_wf200=true')
elif enable_917_soc:
self.extra_gn_options.append('chip_device_platform=\"SiWx917\"')
else:
raise Exception('Wifi usage: ...-wifi-[rs911x|wf200]-...')

Expand All @@ -224,6 +231,9 @@ def __init__(self,
branchName = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).decode('ascii').strip()
self.extra_gn_options.append(
'sl_matter_version_str="v1.2-%s-%s"' % (branchName, shortCommitSha))
if enable_917_soc:
if use_rps_extension is False:
self.extra_gn_options.append('use_rps_extension=false')

if "GSDK_ROOT" in os.environ:
# EFR32 SDK is very large. If the SDK path is already known (the
Expand All @@ -238,6 +248,10 @@ def __init__(self,
wiseconnect_sdk_path = shlex.quote(os.environ['WISECONNECT_SDK_ROOT'])
self.extra_gn_options.append(f"wiseconnect_sdk_root=\"{wiseconnect_sdk_path}\"")

if "WIFI_SDK_ROOT" in os.environ and enable_917_soc:
wifi_sdk_path = shlex.quote(os.environ['WIFI_SDK_ROOT'])
self.extra_gn_options.append(f"wifi_sdk_root=\"{wifi_sdk_path}\"")

def GnBuildArgs(self):
return self.extra_gn_options

Expand Down
2 changes: 1 addition & 1 deletion scripts/build/testdata/all_targets_linux_x64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cc32xx-{lock,air-purifier}
ti-cc13x2x7_26x2x7-{lighting,lock,pump,pump-controller}[-mtd]
ti-cc13x4_26x4-{all-clusters,lighting,lock,pump,pump-controller}[-mtd][-ftd]
cyw30739-cyw930739m2evb_01-{light,lock,ota-requestor,switch}
efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,brd4187a,brd4304a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no_logging][-openthread_mtd][-enable_heap_monitoring][-no_openthread_cli][-show_qr_code][-wifi][-rs911x][-wf200][-wifi_ipv4][-additional_data_advertising][-use_ot_lib][-use_ot_coap_lib][-no-version]
efr32-{brd4161a,brd4187c,brd4186c,brd4163a,brd4164a,brd4166a,brd4170a,brd4186a,brd4187a,brd4304a,brd4338a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no_logging][-openthread_mtd][-enable_heap_monitoring][-no_openthread_cli][-show_qr_code][-wifi][-rs911x][-wf200][-wifi_ipv4][-917_soc][-additional_data_advertising][-use_ot_lib][-use_ot_coap_lib][-no-version][-skip_rps_generation]
esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing]
genio-lighting-app
linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang]
Expand Down

0 comments on commit 6ae3e2a

Please sign in to comment.