Skip to content

Commit

Permalink
[Silabs] Enabling custom board support for matter (project-chip#35809)
Browse files Browse the repository at this point in the history
* [Silabs] Enabling custom board support for matter

* Restyled to Make Pretty

* Streamline printing to make pretty

* Put the assert at the end and add silabs board descriptions

* Restyled
  • Loading branch information
fuxiaoming-lumi authored Oct 4, 2024
1 parent 5cf80d7 commit 78f489d
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion third_party/silabs/silabs_board.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@
# limitations under the License.

declare_args() {
# EFR32 board used
# Silabs wireless starter kit plug-in boards featuring specific mcu family and mcu model.
# Find more information at https://www.silabs.com/development-tools/wireless.
# A board tailored for specific mcu family and mcu model can be created with "CUSTOM".
silabs_board = ""

# Silabs mcu family used
silabs_family = ""

# Silabs mcu model used
silabs_mcu = ""

# LCD is enabled by default
# Boards BRD4166A, BRD2601B, BRD2703A and BRD4319A do not have a LCD so they disable it explicitly
disable_lcd = false
Expand Down Expand Up @@ -150,6 +158,12 @@ if (silabs_board == "BRD4338A" || silabs_board == "BRD2605A") {
# ThunderBoards don't have a LCD,
show_qr_code = false
disable_lcd = true

# Custom Board ----------
} else if (silabs_board == "CUSTOM") {
print("Using custom board configuration")
print("silabs_family:", silabs_family)
print("silabs_mcu:", silabs_mcu)
} else {
assert(
false,
Expand All @@ -168,5 +182,9 @@ declare_args() {
sl_uart_log_output = wifi_soc
}

# Silabs mcu family and mcu model must be specified
assert(silabs_family != "", "Must specify silabs_family")
assert(silabs_mcu != "", "Must specify silabs_mcu")

# qr code cannot be true if lcd is disabled
assert(!(disable_lcd && show_qr_code))

0 comments on commit 78f489d

Please sign in to comment.