Add MG12 for SLC build (#27245)
diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml
index 0f5db57..1772f5b 100644
--- a/.github/workflows/examples-efr32.yaml
+++ b/.github/workflows/examples-efr32.yaml
@@ -88,6 +88,7 @@
timeout-minutes: 30
run: |
scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4187C --slc_generate --docker
+ scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4164A --slc_generate --docker
rm -rf ./out/
- name: Build some BRD4187C variants
timeout-minutes: 90
diff --git a/examples/lighting-app/silabs/BUILD.gn b/examples/lighting-app/silabs/BUILD.gn
index a9687bb..ded0e41 100644
--- a/examples/lighting-app/silabs/BUILD.gn
+++ b/examples/lighting-app/silabs/BUILD.gn
@@ -59,6 +59,7 @@
"${use_wstk_buttons}",
"${use_wstk_leds}",
"${use_external_flash}",
+ "${silabs_mcu}",
],
"list lines"))
}
diff --git a/examples/platform/silabs/matter-platform.slcp b/examples/platform/silabs/matter-platform.slcp
index 0eee476..24e7cc5 100644
--- a/examples/platform/silabs/matter-platform.slcp
+++ b/examples/platform/silabs/matter-platform.slcp
@@ -48,11 +48,6 @@
- {id: rail_lib_multiprotocol}
- {id: bluetooth_feature_system}
- {id: bluetooth_feature_scanner}
-- instance: [vcom]
- id: uartdrv_usart
-- instance: [vcom]
- id: uartdrv_eusart
-
config_file:
- override:
@@ -83,7 +78,7 @@
- condition: [device_series_2]
name: uartdrv_eusart
- condition: [device_series_2]
- name: device_init_dpll
+ name: device_init_dpll
ui_hints:
highlight:
diff --git a/third_party/silabs/slc_gen/run_slc.py b/third_party/silabs/slc_gen/run_slc.py
index 5083948..87a481e 100644
--- a/third_party/silabs/slc_gen/run_slc.py
+++ b/third_party/silabs/slc_gen/run_slc.py
@@ -4,7 +4,7 @@
import subprocess
import sys
-if len(sys.argv) != 7:
+if len(sys.argv) != 8:
print("wrong number of arguments")
sys.exit(1)
@@ -13,12 +13,20 @@
return ("true" == valueToTest)
+def isMG24(partnumber):
+ if "EFR32MG24" in partnumber or "MGM240" in partnumber:
+ return True
+ else:
+ return False
+
+
root_path = sys.argv[1]
silabs_board = str(sys.argv[2]).lower()
disable_lcd = asBoolean(sys.argv[3])
use_wstk_buttons = asBoolean(sys.argv[4])
use_wstk_leds = asBoolean(sys.argv[5])
use_external_flash = asBoolean(sys.argv[6])
+silabs_mcu = str(sys.argv[7])
slcp_file_path = os.path.join(root_path, "examples/platform/silabs/matter-platform.slcp")
template_path = os.path.join(root_path, "third_party/silabs/slc_gen/")
@@ -26,6 +34,12 @@
slc_arguments = ""
+# Add Familly specific component
+if isMG24(silabs_mcu):
+ slc_arguments += "uartdrv_eusart:vcom,"
+else:
+ slc_arguments += "uartdrv_usart:vcom,"
+
# Translate GN arguments in SLC arguments
if not disable_lcd:
slc_arguments += "memlcd_usart,dmd_memlcd,"