Skip to content

Commit 8cbaf63

Browse files
facchinmcmaglie
authored andcommitted
allow hack to be applied also to out-of-boardmanager boards
1 parent 0e5e6fa commit 8cbaf63

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

add_missing_build_properties_from_parent_platform_txt_files.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ func (s *OverridePropertiesWithJsonInfo) Run(ctx *types.Context) error {
7777
if ctx.TargetBoard.Properties["build.core"] == "arduino:arduino" && buildProperties[constants.HACK_PROPERTIES_AVR_GCC_NEW] != "" {
7878
buildProperties[constants.HACK_PROPERTIES_AVR_GCC_OLD] =
7979
"{" + constants.HACK_PROPERTIES_AVR_GCC_NEW + "}"
80+
// if base runtime property is fully specified it needs to be replaced
81+
if !strings.HasPrefix(buildProperties[constants.HACK_PROPERTIES_AVR_GCC_OLD_2], "{") {
82+
buildProperties[constants.HACK_PROPERTIES_AVR_GCC_OLD_2] =
83+
"{" + constants.HACK_PROPERTIES_AVR_GCC_NEW + "}"
84+
}
8085
}
8186

8287
ctx.BuildProperties = buildProperties

constants/constants.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,4 @@ const TOOL_VERSION = "version"
235235
const ADDITIONALE_BOARD_MANAGER_JSON = "boardsmanager.additional.urls"
236236
const HACK_PROPERTIES_AVR_GCC_NEW = BUILD_PROPERTIES_RUNTIME_TOOLS_PREFIX + "avr-gcc-arduino-4.9.2-atmel3.5.3-arduino2" + BUILD_PROPERTIES_RUNTIME_TOOLS_SUFFIX
237237
const HACK_PROPERTIES_AVR_GCC_OLD = BUILD_PROPERTIES_RUNTIME_TOOLS_PREFIX + "avr-gcc-arduino-4.8.1-arduino5" + BUILD_PROPERTIES_RUNTIME_TOOLS_SUFFIX
238+
const HACK_PROPERTIES_AVR_GCC_OLD_2 = BUILD_PROPERTIES_RUNTIME_TOOLS_PREFIX + "avr-gcc" + BUILD_PROPERTIES_RUNTIME_TOOLS_SUFFIX

0 commit comments

Comments
 (0)