Skip to content

Commit

Permalink
Add MG12 for SLC build (#27245)
Browse files Browse the repository at this point in the history
  • Loading branch information
jepenven-silabs authored and pull[bot] committed Sep 14, 2023
1 parent f6c59c9 commit 1052626
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
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
Expand Down
1 change: 1 addition & 0 deletions examples/lighting-app/silabs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ if (slc_generate) {
"${use_wstk_buttons}",
"${use_wstk_leds}",
"${use_external_flash}",
"${silabs_mcu}",
],
"list lines"))
}
Expand Down
7 changes: 1 addition & 6 deletions examples/platform/silabs/matter-platform.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ component:
- {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:
Expand Down Expand Up @@ -83,7 +78,7 @@ requires:
- condition: [device_series_2]
name: uartdrv_eusart
- condition: [device_series_2]
name: device_init_dpll
name: device_init_dpll

ui_hints:
highlight:
Expand Down
16 changes: 15 additions & 1 deletion third_party/silabs/slc_gen/run_slc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -13,19 +13,33 @@ def asBoolean(valueToTest):
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/")
output_path = template_path + sys.argv[2] + '/'

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,"
Expand Down

0 comments on commit 1052626

Please sign in to comment.