forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsilabs_board.gni
171 lines (142 loc) · 4.98 KB
/
silabs_board.gni
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
declare_args() {
# EFR32 board used
silabs_board = ""
# LCD is enabled by default
# Boards BRD4166A, BRD2601B, BRD2703A and BRD4319A do not have a LCD so they disable it explicitly
disable_lcd = false
# Enable Buttons by default
use_wstk_buttons = true
# Enable LEDs on development board by default
# Boards BRD4317A, BRD4316A and BRD4319A disable this explicitly
use_wstk_leds = true
# Boards BRD2703A and BRD4319A disable this explicitly
use_external_flash = true
# WIFI rcp boards options for wifi apps.
use_wf200 = false
use_rs9116 = false
use_SiWx917 = false
wifi_soc = false
#Disable MQTT by default
enable_dic = false
# Disable AWS SDK OTA by default
aws_sdk_ota = false
# Disable UART log forwarding by default
sl_uart_log_output = false
# Self-provision enabled
use_provision_channel = false
}
declare_args() {
# Enables LCD Qr Code on supported devices
show_qr_code = !disable_lcd
# Enabling BLE on 9116/917 NCP by default
chip_enable_ble_rs911x = use_rs9116 || use_SiWx917
}
if (silabs_board == "") {
silabs_board = getenv("SILABS_BOARD")
}
assert(silabs_board != "", "silabs_board must be specified")
# Si917 WIFI board ----------
if (silabs_board == "BRD4338A") {
silabs_family = "SiWx917-common"
silabs_mcu = "SiWG917M111MGTBA"
wifi_soc = true
# EFR32 MG24 series ----------
} else if (silabs_board == "BRD4186A" || silabs_board == "BRD4187A") {
variant = string_replace(silabs_board, "A", "C")
print(
"${silabs_board} is deprecated. It is recommended to use the 'C' variant of this board (${variant})")
silabs_family = "efr32mg24"
silabs_mcu = "EFR32MG24A010F1536GM48"
} else if (silabs_board == "BRD4186C") {
silabs_family = "efr32mg24"
silabs_mcu = "EFR32MG24B210F1536IM48"
} else if (silabs_board == "BRD4187C") {
silabs_family = "efr32mg24"
silabs_mcu = "EFR32MG24B220F1536IM48"
} else if (silabs_board == "BRD2601B") {
silabs_family = "efr32mg24"
silabs_mcu = "EFR32MG24B310F1536IM48"
# ThunderBoards don't have a LCD,
show_qr_code = false
disable_lcd = true
} else if (silabs_board == "BRD2703A") {
silabs_family = "efr32mg24"
silabs_mcu = "EFR32MG24B020F1536IM48"
# Explorer Kits do not have an external flash nor a LCD
use_external_flash = false
show_qr_code = false
disable_lcd = true
# EFR32 MG24 Modules series ----------
} else if (silabs_board == "BRD4316A") {
silabs_family = "mgm24"
silabs_mcu = "MGM240PB22VNA"
# Board does not support LEDs and Buttons at the same time
use_wstk_leds = false
} else if (silabs_board == "BRD4317A") {
silabs_family = "mgm24"
silabs_mcu = "MGM240PB32VNA"
# Board does not support LEDs and Buttons at the same time
use_wstk_leds = false
} else if (silabs_board == "BRD4319A") {
silabs_family = "mgm24"
silabs_mcu = "MGM240L022RNF"
# Board does not support LEDs and Buttons at the same time
use_wstk_leds = false
# MGM240L do not have an external flash or LCD
use_external_flash = false
show_qr_code = false
disable_lcd = true
} else if (silabs_board == "BRD2704A") {
silabs_family = "mgm24"
silabs_mcu = "MGM240PB32VNA"
# Explorer Kits do not have an external flash, buttons nor a LCD
use_wstk_buttons = false
use_external_flash = false
show_qr_code = false
disable_lcd = true
} else if (silabs_board == "BRD4318A") {
silabs_family = "mgm24"
silabs_mcu = "MGM240SD22VNA"
# EFR32 MG26 series ----------
} else if (silabs_board == "BRD4116A") {
silabs_family = "efr32mg26"
silabs_mcu = "EFR32MG26B410F3200IM48"
} else if (silabs_board == "BRD4117A") {
silabs_family = "efr32mg26"
silabs_mcu = "EFR32MG26B420F3200IM48"
} else if (silabs_board == "BRD4118A") {
silabs_family = "efr32mg26"
silabs_mcu = "EFR32MG26B510F3200IL136"
} else if (silabs_board == "BRD2608A") {
silabs_family = "efr32mg26"
silabs_mcu = "EFR32MG26B510F3200IM68"
# ThunderBoards don't have a LCD,
show_qr_code = false
disable_lcd = true
} else {
assert(
false,
"The board ${silabs_board} is unsupported. A list of supported board can be found here https://t.ly/_b3SK")
}
declare_args() {
# Wifi SoC Board require a .rps file to be flashed to the device to run
# this rps file is created from the built binary but it requires Silabs Commander tool
# User can set this arg to false to skip the rps creation for WiFi SoCs.
# e.g. for CI
use_rps_extension = wifi_soc
}
# qr code cannot be true if lcd is disabled
assert(!(disable_lcd && show_qr_code))