-
-
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.6.2 platform.txt uses new undefined platform variable runtime.tools.avr-gcc.path #2982
Comments
We can't revert because the toolchain is no more installed into |
With "upgrading the IDE" I meant upgrading core/tools using boards manager |
I just upgraded AVR on my system and the {runtime.ide.path}/hardware/tools/avr/bin/ is still valid. my concern is that when compiler.path is defined as {runtime.tools.avr-gcc.path}/bin/ And just in case code is actually needed.... why is it not part of the boards manager adding it to the platform.txt when installing? |
AFAICS, the reason that runtime.tools.avr-gcc.path is not defined in platform.txt, is that in general, a core/platform doesn't actually ship the gcc binaries and doesn't know where these will be installed. The IDE (code) downloads and installs the toolchain, and sets that variable to let the platforms know where the avr-gcc toolchain lives. In the old situation, you had to define {runtime.ide.path} as well in code, right? In the new situation, the platform.txt makes fewer assumptions about where the toolchain is installed, which is a good thing IMHO. |
In the old situation I defined a default for runtime.ide.path. If the platform contains one the default gets overwritten.
I'm not sure whether I agree that making fewer assumptions about the toolchain location is a good thing. Now what is the benefit of platform.txt of not making assumptions where the compiler is? If you stick to the current solution please update https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification the section global predefined properties |
Any input for me? |
I've just spended couple hours trying to understand why my projects won't compile anymore Just upset not having found this report before spending so much time, not having clear view of what was happening on that mess |
I'd still appreciate some input here. |
@jantje, You're right about that. But in pre-1.5.6, the path to avr-gcc was passed to the platform.txt using an avr-specific setting of the
The benefit is that (third-party) platform.txt files no longer have to hardcode where, inside the IDE, the toolchain lives. The toolchain can be freely moved to another location, without needing to update all platform.txt files. Since, AFAIK, the toolchains are now downloaded on-demand and installed outside of
Not sure what you're saying exactly here. In what way does the new way assume that stuff?
@razerraz But then you should have had local modifications to your Arduino install before? The IDE doesn't normally support a non-bundled toolchain out of the box? |
@matthijskooijman
I think this is a really good argument. It also explains the need for a sam and avr "environment variable". Thinking about how to handle this. Jantje PS A update of https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification is needed. |
I don't think this commercial / non-commercial distinction always applies. Also, doing it like this simply makes sense from a technical perspective - it puts the burden of locating the toolchain at the "tool provider", which is really the only one that can know where it is installed. In your case, I think, it's a bit more complicated because you use the Arduino IDE installation to provide the toolchain, so your tool has to hardcode the path within the IDE installation, since there is not any way to query the IDE for toolchain locations. That might actually be worth considering - having a commandline option that prints toolchain locations and other automatic variables like these. I'm not sure off-hand how easy these would be to implement - IIRC the preferences/recipe variables are a bit intermixed and scattered throughout the code.
I'm not sure if any support for this is present now (I think not). However, I think it could be implemented reasonably simply, just have the IDE track multiple versions of the toolchain, let the user select the one to use and then set the |
BTW, is it possible for the Eclipse plugin (or other third party tools) to On Tue, Apr 28, 2015 at 3:38 AM, Matthijs Kooijman <[email protected]
|
Yup, that's possible. I was planning to suggest that in my previous comment, but it seems I forgot :-) |
It is possible but it would take away most of the added functionality offered by the Eclipse plugin. So yes technically it is possible but practically it is not. The technically possible versus the practical advantage is the same thing I can't get my head around with the switching of the toolchain. Now with the boards manager one can "technically" add a toolchain but does that have a practical advantage? Will it not break what made arduino Big? If Arduino core team decides there is only 1 toolchain per architecture the environment variable {runtime.tools.[architecture].path} can be defined in the platform.txt of that architecture. Or in a platform.txt of the ide. |
I actually think it's the reverse: There can be multiple platforms per architecture, sharing a single toolchain. One of these platforms is currently the official Arduino one, the others are third-party platforms. If a toolchain has a 1-to-1 connection with a platform, each third-party platform has to supply its own toolchain, which you don't really want. Not sure if this answers your concerns? :-) |
Why dont the arduino core team support this plugin? damn |
It doesn't. I'm talkig about 1 toolchain per architecture. Not 1 toolchain per platform. |
I can't speak for the Arduino team (perhaps @ffissore or @cmaglie can clarify), but I do not think there are plans to support multiple toolchains per architecture. Before, you said:
As mentioned before, a (third-party) platform.txt doesn't know (and can't be expected to know) in advance where the toolchain lives, except if it actually provides the toolchain itself (this is why I talked about a 1-on-1 connection between toolchain and platform before). IIUC, the avr toolchain is currently included with the IDE (and stored inside the Arduino install directory), while the sam toolchain is downloaded on-demand (and stored inside some documents or settings directory I think). This means that there is no way for a platform.txt to reach both, given just the Taking a step back, why is this change a problem for you exactly? In your eclipse plugin, you have to expose a few variables while evaluating the recipes. This just adds a few more variables there, for the toolchain locations. If you think that (third-party) platform.txt files could hard-code the toolchain path, why can't you do the same in your plugin? In fact, I'd say your plugin is more suited to do so, since I assume it can run some code to try multiple locations and use the first one that actually exists, or apply some other smartness to find the toolchains (as opposed to platform.txt, which can only hardcode a single value). |
I see where the communication went wrong. Let me rephrase it. This would allow the plugin to parse the platform.txt and get the value (and use those as defaults). As it is a fixed value (due to: there is only 1 toolchain per arduino IDE version per architecture) these can be "hard coded" in the platform.txt files of arduino. In other words: This solution would have very little impact to the arduino core team (1 line per platform.txt file) with 100% result and it would enable "tool providers" to find the correct version. |
As 1.6.4 is about to be released. |
sorry @jantje I think you may keep flagging 1.6.4 as incompatible with eclipse plugin. I hope we'll have a workaround for 1.6.5 |
Putting a harcoded path in the bundled platform.txt does not seem like a useful solution:
Your suggestion of an environment.txt could be a good way to handle this. Since toolchains can be downloaded on-demand, this means that the environment.txt must be generated dynamically by the IDE, whenever a toolchain is downloaded. Alternatively, having a I'm not familiar with the new modular downloading code at all, so I can't really tell what's the best way to do this, but it seems that having some way to let Arduino export a bit of info useful for third party tools is a good idea. Perhaps @ffissore can comment on what he thinks is the best way to approach this? And, as always, patches welcome :-) |
@ffissore |
Sorry for the delay, @jantje I'll look into this tomorrow |
any update? |
If pref name is missing, all prefs are printed on stdout. Should fix/mitigate #2982
Sorry for the late reply. I've just pushed a commit that should at least mitigate your issue |
First of all I think: Thanks for taking this seriously. |
I just ran the command and it contains the info I need :-) I'm not so sure about this one. @ffissore can you tell me whether you think this could be useful to understand the build in the future? that currently leaves |
I added all fields for now. |
I'm sorry but I have to reopen this issue.
I get the info for avr (because the last time I used the ide it was with a avr) but now I'm using/testing due. |
I think you should be able to obtain that by passing in the --board option when calling the IDE to select the right board (e.g. |
@matthijskooijman
As you see no result. I alo got a dialog box saying "error"; "can not specify any sketch files" I tried
I also tried
all to no avail. |
@ffissore @cmaglie @mbanzi I understand that the board manager is a unexpected and architecturally big change. These changes always come with pain. But why can't the Arduino core team provide a decent fix? I would propose the following as an architectural decision. I would put the following under a exception rule (so these need to be defined by the ide and not the files) I think it is clear from this list that the current situation is very close to the proposed architectural decision. This does not imply it was ever the intention of the arduino core team to support my proposed architectural decision. Hoping for the best |
@jantje try with |
The correct paramater is:
|
yep sorry: I ran the test with |
Thanks for that. I tested it and it seems to work. |
|
preferences.txt looks good to me. PS: You may know this but just to be sure: with the plugin you can work on multiple sketches (called projects) each with their own board at the same time. |
I knew and I love it |
Can we then close this issue? |
yes |
Sorry again.
It may be related to the space in the foldername. |
it will fail when folders have spaces. Found in a comment at #2982
That was an unrelated bug but I've just pushed a fix. Indeed it was because of the space in the folder name. Get next hourly build |
txs :-) |
I probably better create a new issue but I'll try this one first ;-) |
The arduino eclipse plugin does not work with arduino IDE 1.6.2 and 1.6.3
The reason is the definition of compiler.path in platform.txt
In Arduino IDE 1.6.1 in avr it is defined as
compiler.path={runtime.ide.path}/hardware/tools/avr/bin/
In Arduino IDE 1.6.2 and 1.6.3 in avr it is defined as
compiler.path={runtime.tools.avr-gcc.path}/bin/
The problem is that runtime.tools.avr-gcc.path is not defined in the platform.txt so it adds another unneeded and probably undocumented environment variable.
There is a very similar situation with sam
Can we revert back to the old way?
The text was updated successfully, but these errors were encountered: