-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EFR32: Fix ARM arch setup when setting efr32_board in GN args (#1978)
* EFR32: Fix ARM arch setup when setting efr32_board in GN args Currently examples/lock-app/efr32/args.gni tries to set the ARM architecture flags based on a condition: if (efr32_family == "efr32mg12") { arm_float_abi = "softfp" arm_fpu = "fpv4-sp-d16" } else if (efr32_family == "efr32mg21") { arm_float_abi = "hard" arm_fpu = "fpv5-sp-d16" } This isn't working if the board is set via GN args, which is preferred over the environment variable. The reason is that this file is providing the default arguments, and it's not possible to use the user arguments to set the defaults. We want explicit args to take precedence, and this is necessary for toolchain specific arguments to work. Fix this by adding a way for platforms to provide a config file that sets up the default ARM architecture flags (and which can account for other platform specific arguments in doing so, such as efr32_board). * Fix building for nRF5 via gn_build.sh * Share the build_overrides * Add efr32_sdk.gni back to build_overrides
- Loading branch information
Showing
16 changed files
with
112 additions
and
211 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../build_overrides |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
examples/lock-app/efr32/build_overrides/nlfaultinjection.gni
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# 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 | ||
efr32_board = "" | ||
} | ||
|
||
if (efr32_board == "") { | ||
efr32_board = getenv("EFR32_BOARD") | ||
} | ||
|
||
assert(efr32_board != "", "efr32_board must be specified") | ||
|
||
# Differentiate between boards | ||
# - BRD4304A / SLWSTK6000B / MGM12P Module / 2.4GHz@19dBm | ||
# - BRD4161A / SLWSTK6000B / Wireless Starter Kit / 2.4GHz@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 | ||
|
||
if (efr32_board == "BRD4304A") { | ||
efr32_family = "efr32mg12" | ||
efr32_mcu = "EFR32MG12P432F1024GM48" | ||
} else if (efr32_board == "BRD4161A") { | ||
efr32_family = "efr32mg12" | ||
efr32_mcu = "EFR32MG12P432F1024GL125" | ||
} else if (efr32_board == "BRD4166A") { | ||
efr32_family = "efr32mg12" | ||
efr32_mcu = "EFR32MG12P332F1024GL125" | ||
} else if (efr32_board == "BRD4170A") { | ||
efr32_family = "efr32mg12" | ||
efr32_mcu = "EFR32MG12P433F1024GM68" | ||
} else if (efr32_board == "BRD4180A") { | ||
efr32_family = "efr32mg21" | ||
efr32_mcu = "EFR32MG21A020F1024IM32" | ||
} else { | ||
print( | ||
"Please provide a valid value for EFR32_BOARD env variable (currently supported BRD4304A, BRD4161A, BRD4166A, BRD4170A or BRD4180A)") | ||
assert(false, "The board ${efr32_board} is unsupported as for now.") | ||
} | ||
|
Oops, something went wrong.