| # 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 = "" |
| } |
| |
| if (silabs_board == "") { |
| silabs_board = getenv("SILABS_BOARD") |
| } |
| |
| assert(silabs_board != "", "silabs_board must be specified") |
| |
| # Differentiate between boards |
| # - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm |
| # - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@19dBm |
| # - BRD4163A / SLWSTK6000B / Dual band Wireless Starter Kit / 2.4GHz@19dBm, 868MHz@19dBm |
| # - BRD4164A / SLWSTK6000B / Dual band Wireless Starter Kit / 2.4GHz@19dBm, 915MHz@19dBm |
| # - BRD4166A / SLTB004A / Thunderboard Sense 2 / 2.4GHz@10dBm |
| # - BRD4170A / SLWSTK6000B / Multiband Wireless Starter Kit / 2.4GHz@19dBm, 915MHz@19dBm, 868MHz@19dBm |
| # - BRD4180A / SLWSTK6006A / MG21 Module / 2.4GHz@20dBm |
| # - BRD4186A / SLWSTK6006A / MG24 / Wireless Starter Kit / 2.4GHz@10dBm |
| # - BRD4187A / SLWSTK6006A / MG24 / Wireless Starter Kit / 2.4GHz@20dBm |
| |
| board_defines = [] |
| |
| if (silabs_board == "BRD4304A") { |
| silabs_family = "efr32mg12" |
| silabs_mcu = "EFR32MG12P432F1024GM48" |
| enable_fem = true |
| board_defines += [ "PAL_RTCC_CLOCK_LFRCO" ] |
| } else if (silabs_board == "BRD4161A") { |
| silabs_family = "efr32mg12" |
| silabs_mcu = "EFR32MG12P432F1024GL125" |
| } else if (silabs_board == "BRD4162A") { |
| silabs_family = "efr32mg12" |
| silabs_mcu = "EFR32MG12P332F1024GL125" |
| } else if (silabs_board == "BRD4163A") { |
| silabs_family = "efr32mg12" |
| silabs_mcu = "EFR32MG12P433F1024GL125" |
| } else if (silabs_board == "BRD4164A") { |
| silabs_family = "efr32mg12" |
| silabs_mcu = "EFR32MG12P433F1024GL125" |
| } else if (silabs_board == "BRD4166A") { |
| silabs_family = "efr32mg12" |
| silabs_mcu = "EFR32MG12P332F1024GL125" |
| } else if (silabs_board == "BRD4170A") { |
| silabs_family = "efr32mg12" |
| silabs_mcu = "EFR32MG12P433F1024GM68" |
| } else if (silabs_board == "BRD4325A") { |
| silabs_family = "SiWx917" |
| silabs_mcu = "EFR32MG12P432F1024GL125" |
| } else if (silabs_board == "BRD4180A") { |
| assert( |
| false, |
| "The board ${silabs_board} not currently supported due to RAM limitation") |
| silabs_family = "efr32mg21" |
| silabs_mcu = "EFR32MG21A020F1024IM32" |
| } else if (silabs_board == "BRD4186A" || silabs_board == "BRD4187A") { |
| print("RevA is deprecated, We suggest using BRD4186C (rev C)") |
| 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" |
| } else if (silabs_board == "BRD2703A") { |
| silabs_family = "efr32mg24" |
| silabs_mcu = "EFR32MG24B020F1536IM48" |
| } else if (silabs_board == "BRD4316A") { |
| silabs_family = "mgm24" |
| silabs_mcu = "MGM240PB22VNA" |
| } else if (silabs_board == "BRD4317A") { |
| silabs_family = "mgm24" |
| silabs_mcu = "MGM240PB32VNA" |
| } else if (silabs_board == "BRD4319A") { |
| silabs_family = "mgm24" |
| silabs_mcu = "MGM240L022RNF" |
| } else if (silabs_board == "BRD2704A") { |
| silabs_family = "mgm24" |
| silabs_mcu = "MGM240PB32VNA" |
| } else if (silabs_board == "BRD4318A") { |
| silabs_family = "mgm24" |
| silabs_mcu = "MGM240SD22VNA" |
| } else { |
| print( |
| "Please provide a valid value for SILABS_BOARD env variable (currently supported BRD4304A, BRD4161A, BRD4163A, BRD4164A BRD4166A, BRD4170A, BRD4186C, BRD4187C, BRD2601B, BRD2703A, BRD4317A, BRD2704A)") |
| assert(false, "The board ${silabs_board} is unsupported") |
| } |