-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Ide 1.5.x platform.local.txt #1985
Ide 1.5.x platform.local.txt #1985
Conversation
This helps advanced users that want to change options (e.g. to use a different toolchain or enable warnings), without having to change platform.txt (which could make git report changed files all the time).
These make it easier for a user to add extra compiler flags in a platform.local.txt file.
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.
I just amended the last commit with a small fix. |
Thanks! |
This is a file that can be used to tweak platform.txt, once arduino/Arduino#1985 is merged.
Where should the platform.local.txt file be located on Linux and manually installed arduino under ~/Arduino? |
IIRC it should just be next to the existing platform.txt. |
Wouldn't that make sense to store under ~/.arduino15/ next to the preferences.txt file? Or provide a way to configure the directory where to find platform.local.txt within the preferences.txt file? |
I think you can already store a normal platform.txt in your sketchbook (Sketchbook/hardware/arduino/avr/platform.txt), which will "inherit" everything from the regular platform.txt, so effectively providing an override. I'm not entirely sure how / if this works though. The platform.local.txt feature was coded with a git checkout of the IDE code in mind, though I can't recall if I actually tried overriding platform.txt from my sketchbook at all... |
This allows overriding values from
platform.txt
using aplatform.local.txt
.Additionally, the third commit makes the avr platform.txt not rely on a
compiler.path
value set by the IDE, see the commit for the rationale.As discussed at https://groups.google.com/a/arduino.cc/d/msg/developers/4jL4nL_YJ1k/E-AW4XFD-W0J