Skip to content

Commit b3303ce

Browse files
committed
Added FQBN in the buildProperties
Signed-off-by: Cristian Maglie <c.maglie@arduino.cc>
1 parent 2dbe042 commit b3303ce

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,3 +366,9 @@ func ExecRecipeCollectStdErr(buildProperties properties.Map, recipe string, remo
366366
func RemoveHyphenMDDFlagFromGCCCommandLine(buildProperties properties.Map) {
367367
buildProperties[constants.BUILD_PROPERTIES_COMPILER_CPP_FLAGS] = strings.Replace(buildProperties[constants.BUILD_PROPERTIES_COMPILER_CPP_FLAGS], "-MMD", "", -1)
368368
}
369+
370+
func GetCoreArchivePath(fqbn string) string {
371+
fqbnToUnderscore := strings.Replace(fqbn, ":", "_", -1)
372+
fqbnToUnderscore = strings.Replace(fqbnToUnderscore, "=", "_", -1)
373+
return os.TempDir() + "/core_" + fqbnToUnderscore + ".a"
374+
}

src/arduino.cc/builder/constants/constants.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const BUILD_PROPERTIES_EXTRA_TIME_DST = "extra.time.dst"
5555
const BUILD_PROPERTIES_EXTRA_TIME_LOCAL = "extra.time.local"
5656
const BUILD_PROPERTIES_EXTRA_TIME_UTC = "extra.time.utc"
5757
const BUILD_PROPERTIES_EXTRA_TIME_ZONE = "extra.time.zone"
58+
const BUILD_PROPERTIES_FQBN = "build.fqbn"
5859
const BUILD_PROPERTIES_INCLUDES = "includes"
5960
const BUILD_PROPERTIES_OBJECT_FILE = "object_file"
6061
const BUILD_PROPERTIES_OBJECT_FILES = "object_files"

src/arduino.cc/builder/setup_build_properties.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +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] = ctx.FQBN
7374
buildProperties[constants.IDE_VERSION] = ctx.ArduinoAPIVersion
7475
buildProperties[constants.BUILD_PROPERTIES_RUNTIME_OS] = utils.PrettyOSName()
7576

0 commit comments

Comments
 (0)