Skip to content

Uploader prefs miss {build.core.path}, {build.system.path} and {build.variant.path} #1012

Closed

Description

The keys {build.core.path}, {build.system.path} and {build.variant.path} are not evaluated for platform.txt tools recipes (tools.xy.upload.pattern).

Then the tools recipes must use runtime.platform.path. But then there are problems to use the platform as referenced core, because runtime.platform.path is the referencing board platform path.

For example in the SAMD package the upload.pattern contains {runtime.platform.path}/variants/{build.variant}/{build.openocdscript} instead of {build.variant.path}/{build.openocdscript}. A board in referencing board platform can use in board.txt an existing variant of the referenced core platform in xy.build.variant for compilation, but the upload tool will not find the script for the variant.

I try to make the esp8266 package to be used as as referenced core. Now it uses {runtime.platform.path}/tools all over platform.txt and {runtime.platform.path} will evaluate to referencing board platform, not to referenced core platform. They could use {build.core.path}/../../tools or rename the folder to system and use {build.system.path} variable. It works for building, but it doesn't evaluate in uploader.pattern.

I debugged the Arduino IDE 1 and found out that compiler recipes use prefs evaluated by arduino-builder, while Uploaders use the preferences map of the IDE. So it is not a simple fix. I think, the best way for fixing this would be to pass the prefs evaluated by Compiler over SketchController from build() to upload(). Same in class processing.app.Base.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions