Skip to content

Ide 1.5.x platform.local.txt #1985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Explicitly define compiler.path in avr/platform.txt
Previously, this relied on an (ugly, avr-specific) magic default for the
compiler.path variable, set by the IDE. This allowed the IDE to fall
back to a system-wide toolchain when no bundled toolchain was found (by
making compiler.path empty).

However,
 - this only worked for avr, not sam,
 - this worked only for gcc, a system-wide avrdude would break on the
   avrdude.conf path in platform.txt, and

This would mean that automatic system-wide fallback didn't work in all
situations, so you'd still have to modify platform.txt (or create
platform.local.txt). Since doing that explictly is the most reliable
way, this commit removes the partial-working ability to do this
automatically.

Note that the code to automatically set compiler.path is still kept
around, in case third-party hardware still relies on this. At some
point, this code should be removed, but for now it just shows a warning
message.
  • Loading branch information
matthijskooijman committed Apr 10, 2014
commit a89f5e68cf5cc5e323d099cb798dfd9cc6c0c11a
8 changes: 7 additions & 1 deletion app/src/processing/app/debug/Compiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,14 @@ private PreferencesMap createBuildPreferences(String _buildPath,
targetArch = targetPlatform.getId();
p.put("build.arch", targetArch.toUpperCase());

if (!p.containsKey("compiler.path"))
// Platform.txt should define its own compiler.path. For
// compatibility with earlier 1.5 versions, we define a (ugly,
// avr-specific) default for it, but this should be removed at some
// point.
if (!p.containsKey("compiler.path")) {
System.err.println(_("Third-party platform.txt does not define compiler.path. Please report this to the third-party hardware maintainer."));
p.put("compiler.path", Base.getAvrBasePath());
}

// Core folder
TargetPlatform tp = corePlatform;
Expand Down
2 changes: 1 addition & 1 deletion hardware/arduino/avr/platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ version=1.5.6
# ---------------------

# Default "compiler.path" is correct, change only if you want to overidde the initial value
#compiler.path={ide.path}/tools/avr/bin/..
compiler.path={runtime.ide.path}/hardware/tools/avr/bin/
compiler.c.cmd=avr-gcc
compiler.c.flags=-c -g -Os -w -ffunction-sections -fdata-sections -MMD
compiler.c.elf.flags=-Os -Wl,--gc-sections
Expand Down