Skip to content

Commit

Permalink
[EFR32] Add Board Support for efr32 boards (#22099)
Browse files Browse the repository at this point in the history
* add BRD2703A config files

* Add Explorer Board to gn files

* Update sdk build files

* Fix external flash issue

* Update submodule to main

* remove unwanted change

* Add support for BRD4162A
  • Loading branch information
mkardous-silabs authored and pull[bot] committed Aug 25, 2023
1 parent 415cfa8 commit 8260068
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 16 deletions.
5 changes: 3 additions & 2 deletions examples/chef/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ chip_data_model("chef-common") {
is_server = true
}

# ThunderBoards (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B") {
# ThunderBoards and Explorer Kit (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B" ||
efr32_board == "BRD2703A") {
show_qr_code = false
disable_lcd = true
}
Expand Down
5 changes: 3 additions & 2 deletions examples/light-switch-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ if (chip_enable_wifi) {
assert(use_rs911x || use_wf200)
}

# ThunderBoards (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B") {
# ThunderBoards and Explorer Kit (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B" ||
efr32_board == "BRD2703A") {
show_qr_code = false
disable_lcd = true
}
Expand Down
5 changes: 3 additions & 2 deletions examples/lighting-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ if (chip_enable_wifi) {
assert(use_rs911x || use_wf200)
}

# ThunderBoards (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B") {
# ThunderBoards and Explorer Kit (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B" ||
efr32_board == "BRD2703A") {
show_qr_code = false
disable_lcd = true
}
Expand Down
5 changes: 3 additions & 2 deletions examples/lock-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ if (chip_enable_wifi) {
assert(use_rs911x || use_wf200)
}

# ThunderBoards (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B") {
# ThunderBoards and Explorer Kit (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B" ||
efr32_board == "BRD2703A") {
show_qr_code = false
disable_lcd = true
}
Expand Down
5 changes: 3 additions & 2 deletions examples/thermostat/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ if (chip_enable_wifi) {
assert(use_rs911x || use_wf200)
}

# ThunderBoards (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B") {
# ThunderBoards and Explorer Kit (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B" ||
efr32_board == "BRD2703A") {
show_qr_code = false
disable_lcd = true
}
Expand Down
5 changes: 3 additions & 2 deletions examples/window-app/efr32/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ if (chip_enable_wifi) {
assert(use_rs911x || use_wf200)
}

# ThunderBoards (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B") {
# ThunderBoards and Explorer Kit (No LCD)
if (efr32_board == "BRD4166A" || efr32_board == "BRD2601B" ||
efr32_board == "BRD2703A") {
show_qr_code = false
disable_lcd = true
}
Expand Down
8 changes: 7 additions & 1 deletion third_party/silabs/efr32_board.gni
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ if (efr32_board == "BRD4304A") {
} else if (efr32_board == "BRD4161A") {
efr32_family = "efr32mg12"
efr32_mcu = "EFR32MG12P432F1024GL125"
} else if (efr32_board == "BRD4162A") {
efr32_family = "efr32mg12"
efr32_mcu = "EFR32MG12P332F1024GL125"
} else if (efr32_board == "BRD4163A") {
efr32_family = "efr32mg12"
efr32_mcu = "EFR32MG12P433F1024GL125"
Expand Down Expand Up @@ -75,8 +78,11 @@ if (efr32_board == "BRD4304A") {
} else if (efr32_board == "BRD2601B") {
efr32_family = "efr32mg24"
efr32_mcu = "EFR32MG24B310F1536IM48"
} else if (efr32_board == "BRD2703A") {
efr32_family = "efr32mg24"
efr32_mcu = "EFR32MG24B020F1536IM48"
} else {
print(
"Please provide a valid value for EFR32_BOARD env variable (currently supported BRD4304A, BRD4161A, BRD4163A, BRD4164A BRD4166A, BRD4170A, BRD4186C, BRD4187C, BRD2601B)")
"Please provide a valid value for EFR32_BOARD env variable (currently supported BRD4304A, BRD4161A, BRD4163A, BRD4164A BRD4166A, BRD4170A, BRD4186C, BRD4187C, BRD2601B, BRD2703A)")
assert(false, "The board ${efr32_board} is unsupported")
}
17 changes: 15 additions & 2 deletions third_party/silabs/efr32_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ declare_args() {
use_external_flash = true
}

# Explorer Kit does not have external flash
if (efr32_board == "BRD2703A") {
use_external_flash = false
}

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

# Defines an efr32 SDK build target.
Expand Down Expand Up @@ -210,13 +215,14 @@ template("efr32_sdk") {

if (defined(invoker.use_external_flash) && use_external_flash) {
defines += [ "CONFIG_USE_EXTERNAL_FLASH" ]

_include_dirs += [ "${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/inc/sl_mx25_flash_shutdown_usart" ]
}

_include_dirs += [
"${efr32_sdk_root}/platform/emdrv/uartdrv/inc",
"${efr32_sdk_root}/platform/emdrv/uartdrv/config",
"${efr32_sdk_root}/hardware/driver/memlcd/inc/memlcd_usart",
"${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/inc/sl_mx25_flash_shutdown_usart",
]
}

Expand All @@ -226,6 +232,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/platform/radio/rail_lib/chip/efr32/efr32xg1x",
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM4F",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg1x/config",
"${efr32_sdk_root}/platform/service/device_init/config/s1/",
]

libs += [
Expand All @@ -243,6 +250,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg21",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg21/config",
"${efr32_sdk_root}/platform/service/device_init/config/s2/",
]

libs += [
Expand All @@ -263,6 +271,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/util/third_party/freertos/kernel/portable/GCC/ARM_CM33_NTZ/non_secure",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/efr32xg24/config",
"${efr32_sdk_root}/platform/service/device_init/config/s2/",
]

libs += [
Expand Down Expand Up @@ -365,6 +374,7 @@ template("efr32_sdk") {
"${efr32_sdk_root}/platform/radio/rail_lib/hal/efr32/hal_efr.c",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/pa-conversions/pa_conversions_efr32.c",
"${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_pti/sl_rail_util_pti.c",
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_lfrco.c",
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_nvic.c",
"${efr32_sdk_root}/platform/service/hfxo_manager/src/sl_hfxo_manager.c",
"${efr32_sdk_root}/platform/service/legacy_hal/src/token_legacy.c",
Expand Down Expand Up @@ -527,13 +537,16 @@ template("efr32_sdk") {
(defined(invoker.use_external_flash) && use_external_flash)) {
sources += [
"${efr32_sdk_root}/hardware/driver/memlcd/src/memlcd_usart/sl_memlcd_spi.c",
"${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/src/sl_mx25_flash_shutdown_usart/sl_mx25_flash_shutdown.c",
"${efr32_sdk_root}/platform/emdrv/uartdrv/src/uartdrv.c",
"${efr32_sdk_root}/platform/emlib/src/em_eusart.c",
"${efr32_sdk_root}/platform/emlib/src/em_leuart.c",
"${efr32_sdk_root}/platform/emlib/src/em_usart.c",
"${sdk_support_root}/matter/efr32/${efr32_family}/${efr32_board}/autogen/sl_uartdrv_init.c",
]

if (defined(invoker.use_external_flash) && use_external_flash) {
sources += [ "${efr32_sdk_root}/hardware/driver/mx25_flash_shutdown/src/sl_mx25_flash_shutdown_usart/sl_mx25_flash_shutdown.c" ]
}
}

if ((defined(invoker.show_qr_code) && invoker.show_qr_code) ||
Expand Down
2 changes: 1 addition & 1 deletion third_party/silabs/matter_support
Submodule matter_support updated 83 files
+1 −31 .restyled.yaml
+ matter/efr32/efr32mg12/BRD4162A/.DS_Store
+ matter/efr32/efr32mg12/BRD4162A/autogen/.DS_Store
+36 −0 matter/efr32/efr32mg12/BRD4162A/autogen/RTE_Components.h
+8 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_bluetooth.h
+36 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_board_default_init.c
+42 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_component_catalog.h
+49 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_device_init_clocks.c
+88 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_event_handler.c
+15 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_event_handler.h
+73 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_simple_button_instances.c
+34 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_simple_button_instances.h
+61 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_simple_led_instances.c
+39 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_simple_led_instances.h
+91 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_uartdrv_init.c
+35 −0 matter/efr32/efr32mg12/BRD4162A/autogen/sl_uartdrv_instances.h
+ matter/efr32/efr32mg12/BRD4162A/config/.DS_Store
+26 −0 matter/efr32/efr32mg12/BRD4162A/config/dmadrv_config.h
+46 −0 matter/efr32/efr32mg12/BRD4162A/config/emlib_core_debug_config.h
+163 −0 matter/efr32/efr32mg12/BRD4162A/config/pin_config.h
+15 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_bluetooth_advertiser_config.h
+133 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_bluetooth_config.h
+10 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_bluetooth_connection_config.h
+76 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_board_control_config.h
+58 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_device_init_dcdc_config.h
+68 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_device_init_emu_config.h
+68 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_device_init_hfxo_config.h
+67 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_device_init_lfxo_config.h
+55 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_memlcd_usart_config.h
+28 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_memory_config.h
+54 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_mx25_flash_shutdown_usart_config.h
+71 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_power_manager_config.h
+80 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_rail_util_pa_config.h
+75 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_rail_util_pti_config.h
+44 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_rail_util_rssi_config.h
+45 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_simple_button_btn0_config.h
+45 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_simple_button_btn1_config.h
+60 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_simple_button_config.h
+44 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_simple_led_led0_config.h
+44 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_simple_led_led1_config.h
+72 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_sleeptimer_config.h
+103 −0 matter/efr32/efr32mg12/BRD4162A/config/sl_uartdrv_usart_vcom_config.h
+114 −0 matter/efr32/efr32mg12/BRD4162A/config/uartdrv_config.h
+36 −0 matter/efr32/efr32mg24/BRD2703A/autogen/RTE_Components.h
+8 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_bluetooth.h
+32 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_board_default_init.c
+53 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_component_catalog.h
+56 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_device_init_clocks.c
+106 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_event_handler.c
+15 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_event_handler.h
+69 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_simple_button_instances.c
+34 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_simple_button_instances.h
+61 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_simple_led_instances.c
+41 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_simple_led_instances.h
+72 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_uartdrv_init.c
+35 −0 matter/efr32/efr32mg24/BRD2703A/autogen/sl_uartdrv_instances.h
+26 −0 matter/efr32/efr32mg24/BRD2703A/config/dmadrv_config.h
+46 −0 matter/efr32/efr32mg24/BRD2703A/config/emlib_core_debug_config.h
+23 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_bluetooth_advertiser_config.h
+141 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_bluetooth_config.h
+10 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_bluetooth_connection_config.h
+42 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_board_control_config.h
+56 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_device_init_dcdc_config.h
+83 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_device_init_dpll_config.h
+53 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_device_init_emu_config.h
+53 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_device_init_hfxo_config.h
+53 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_device_init_lfrco_config.h
+66 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_device_init_lfxo_config.h
+57 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_hfxo_manager_config.h
+28 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_memory_config.h
+73 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_power_manager_config.h
+81 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_rail_util_pa_config.h
+72 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_rail_util_pti_config.h
+44 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_simple_button_btn0_config.h
+44 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_simple_button_btn1_config.h
+61 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_simple_button_config.h
+43 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_simple_led_led0_config.h
+43 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_simple_led_led1_config.h
+73 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_sleeptimer_config.h
+105 −0 matter/efr32/efr32mg24/BRD2703A/config/sl_uartdrv_eusart_vcom_config.h
+113 −0 matter/efr32/efr32mg24/BRD2703A/config/uartdrv_config.h
+33 −31 matter/wifi/brd4161a.h
+1 −0 matter/wifi/rs911x/hal/rsi_board_configuration.h

0 comments on commit 8260068

Please sign in to comment.