| # 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() { |
| # TI SimpleLink board used |
| ti_simplelink_board = "" |
| } |
| |
| if (ti_simplelink_board == "") { |
| ti_simplelink_board = getenv("TI_SIMPLELINK_BOARD") |
| } |
| |
| assert(ti_simplelink_board != "", "ti_simplelink_board must be specified") |
| |
| # Differentiate between boards |
| # |
| # | Development Kit | Device Family | SoC | | |
| # | ----------------- | --------------- | ---------- | ------------------- | |
| # | CC1352R1_LAUNCHXL | cc13x2_26x2 | cc1352r1f3 | Thread MTD + no BLE | |
| # | CC2652R1_LAUNCHXL | cc13x2_26x2 | cc2652r1f3 | Thread MTD + no BLE | |
| # | LP_CC2652R7 | cc13x2x7_26x2x7 | cc2652r1f7 | Thread FTD + BLE | |
| # | CC3220SF_LAUNCHXL | cc32xx | cc3220SF | Wi-Fi | |
| # | CC3235SF_LAUNCHXL | cc32xx | cc3235SF | Wi-Fi | |
| |
| # XXX: Can we do an array with a case statement? |
| if (ti_simplelink_board == "CC1352R1_LAUNCHXL") { |
| ti_simplelink_device_family = "cc13x2_26x2" |
| ti_simplelink_soc_family = "cc13x2" |
| ti_simplelink_isa = "m4f" |
| |
| # set -DDeviceFamily_CC13X2? |
| ti_simplelink_soc = "cc1352r1f3" |
| ti_simplelink_bim_name = "cc1352r1lp" |
| } else if (ti_simplelink_board == "CC2652R1_LAUNCHXL") { |
| ti_simplelink_device_family = "cc13x2_26x2" |
| ti_simplelink_soc_family = "cc26x2" |
| ti_simplelink_isa = "m4f" |
| |
| # set -DDeviceFamily_CC26X2? |
| ti_simplelink_soc = "cc2652r1f3" |
| ti_simplelink_bim_name = "cc2652r1lp" |
| } else if (ti_simplelink_board == "LP_CC2652R7") { |
| ti_simplelink_device_family = "cc13x2x7_26x2x7" |
| ti_simplelink_soc_family = "cc26x2" |
| ti_simplelink_isa = "m4f" |
| |
| # set -DDeviceFamily_CC26X2? |
| ti_simplelink_soc = "cc2652r1f7" |
| ti_simplelink_bim_name = "cc2652r7lp" |
| } else if (ti_simplelink_board == "CC3220SF_LAUNCHXL") { |
| ti_simplelink_device_family = "cc32xx" |
| ti_simplelink_soc_family = "cc32xx" |
| |
| # set -DDeviceFamily_CC3220 |
| ti_simplelink_soc = "cc32xxSF" |
| } else if (ti_simplelink_board == "CC3235SF_LAUNCHXL") { |
| ti_simplelink_device_family = "cc32xx" |
| ti_simplelink_soc_family = "cc32xx" |
| |
| # set -DDeviceFamily_CC3220 |
| ti_simplelink_soc = "cc32xxSF" |
| } else { |
| print("Please provide a valid value for TI_SIMPLELINK_BOARD env variable") |
| assert(false, "The board ${ti_simplelink_board} is unsupported as for now.") |
| } |