Skip to content

Commit 8dd4a22

Browse files
committed
Populate buildProperties[constants.BUILD_PROPERTIES_FQBN] with proper fqbn
1 parent 298dbfc commit 8dd4a22

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/arduino.cc/builder/builder_utils/utils.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ func copyFileContents(src, dst string) (err error) {
476476
return
477477
}
478478

479-
func GetCoreArchivePath(fqbnToUnderscore string) string {
479+
func GetCoreArchivePath(fqbn string) string {
480+
fqbnToUnderscore := strings.Replace(fqbn, ":", "_", -1)
481+
fqbnToUnderscore = strings.Replace(fqbnToUnderscore, "=", "_", -1)
480482
return os.TempDir() + "/core_" + fqbnToUnderscore + ".a"
481483
}

src/arduino.cc/builder/setup_build_properties.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (s *SetupBuildProperties) Run(ctx *types.Context) error {
7070
buildProperties[constants.BUILD_PROPERTIES_RUNTIME_PLATFORM_PATH] = targetPlatform.Folder
7171
buildProperties[constants.BUILD_PROPERTIES_RUNTIME_HARDWARE_PATH] = filepath.Join(targetPlatform.Folder, "..")
7272
buildProperties[constants.BUILD_PROPERTIES_RUNTIME_IDE_VERSION] = ctx.ArduinoAPIVersion
73-
buildProperties[constants.BUILD_PROPERTIES_FQBN] = strings.Replace(ctx.FQBN, ":", "_", -1)
73+
buildProperties[constants.BUILD_PROPERTIES_FQBN] = ctx.FQBN
7474
buildProperties[constants.IDE_VERSION] = ctx.ArduinoAPIVersion
7575
buildProperties[constants.BUILD_PROPERTIES_RUNTIME_OS] = utils.PrettyOSName()
7676

0 commit comments

Comments
 (0)