-
Notifications
You must be signed in to change notification settings - Fork 132
Nested variables in platform.txt do not resolve #1184
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
Comments
The instructions you point to have 2 options.
Given the rest of the description I assume you are using the not preferred option. |
On the preferred, non-preferred option on installing the core. I am the core maintainer, I work in the non-preferred way. This is not an issue though, I've made enough Arduino ports in my life to know my way around. The issue is only what I posted it to be. |
I tried to reproduce this here and I confirm (much to my surprise) that it does not work. I fear this is number 1. |
number 1 would mean end of esp32 support in sloeber :( |
It works on my system when I do not expand the environment variables in the makefile. |
I tried your suggestion, but nothing changed? i reloaded eclipse and all. |
Check the file [project]/release/SubDir.mk
If If it is there and it still doesn't work it may be that your os does not support nested variables. |
@me-no-dev how is it going? |
sorry had some deadlines. the pattern is there, but variables do not expand. I tried deleting the release folder as you proposed, that changed nothing for either chip. So far my only option is to change the platform.txt when I switch chips and to and from sloeber. |
BTW I tried downloading 4.3.3 (now I remember why I am on 4.3.1) but after extracting, Mac told me that package is damaged and can not run. |
Mac security is a pain. This is what it says above the download link
|
No problem
Could it be that mac os doesn't support Nested variables? Can you test on the command line? |
test on command line how? I am building the git master currently. Will use that to be sure it's all latest. Arduino-Builder expands the variables normally. |
I mean the mac variant of these windows commands
Because ${A.RECIPE.CPP.O.PATTERN.1} is interpreted by the os |
I think I have found the root cause. |
Nice! At least there is some progress! Any other "workaround" that I came up with as proposal was really stupid... so I'll spare you from them. Unfortunately not everything after such nested variables is part of another variable. Sometimes the substitution is inside a text (like toolchain path/prefix) and sometimes it's part of another variable (like above). There is no clear way to distinct one from the other. Only possibility I see is to search for variable that will resolve capitalised or not. |
When do you expect this to be available in the boardsmanager? |
given that I am a bit pushed by superiors to release soon because it adds support for our newest chip, I would say rather sooner than later. Maybe a month, maybe less. |
@me-no-dev can you test whether the problem is solved with the latest nightly? |
same thing. I noticed that you copy/generate platform.sloeber.txt. Seems to be exact copy. |
damn.
Yes it is generated but if no workaround is needed it is copy. |
Sorry @jantje I will try today. A bit too much going on around me atm |
@jantje I can confirm, works as expected on Mac. Thanks! Seems that you are using platform.sloeber.txt and boards.sloeber.txt, which sometimes get cached in projects. Had to clean the projects, delete the files and reselect the board in order for it to compile with updated platform. |
Great :-) The update procedure http://eclipse.baeyens.it/how_to.shtml#/n states |
Yup :) I always do that, but this time it did not work. The old platform was somehow cached, so selecting apply did reinit the settings, but to the old platform. |
oops, that is bad |
I didn't have time yet to investigate why the *.sloeber.txt files do not get renewed. |
thanks :) will give it a go |
@jantje I can confirm upload is working! |
as to "I again had to delete the *.sloeber.txt files before I can use the updated board files, so that is confirmed." If you ever are in the situation again of thinking about deleting the *.sloeber.txt files to fix a issue. Can you check the version number on the first line. Maybe I added a workaround without upgrading the version number. |
sure! The files I deleted were from the previous time that I tested your changes (pulled master on that day) |
That day was? |
23 October :) 27 days ago (what github says) |
based on the dates in the history of workaround the version number mistake should not be the case. |
could it be those files are marked read only or so? |
I can confirm this bug on Linux. the error i got was:
I worked around it by adding:
at the top of my platform.txt file. If i wanted to use the S2, i would change it to
For the hackiest, but works right now, workaround make 2 copies of the
rename one
and hack each appropriately. I know this is not a solution, but for anyone like me that needed a workaround, here you go! after hacking the same compile line looks like:
|
They are in gitignore and managed only by Sloeber. That is not it :) In what cases do those files get rebuilt? |
I was writing/verifying the way I thought it worked and then I noticed that platform.txt is not treated equally to boards.txt.
|
@madhephaestus |
Eclipse Version: 2020-09 (4.17.0) can not resolve some dependencies on the nightly build, i am on the latest Eclipse Marketplace release. i notice since my work around did in fact work: Maybe the issue is not nested variables as it might immediately seem, but instead its that the value build.mcu is not being injected into the parser before parsing? Maybe the root cause of this issues is in fact looking at where build.mcu is defined and how that gets passed to the parser for platform.txt |
This is a different issue for sure. Please create a new issue if you want to investigate. |
"me too": Linux Kubuntu, Eclipse IDE for C/C++ Developers (includes Incubating components) Version: 2021-03 (4.19.0)
|
Closing as I'm releasing 4.4 |
Describe the bug
I am adding support for ESP32S2 to ESP32 Arduino and in order to include the proper flags/libs etc, platform.txt has some variables, like
compiler.path={runtime.tools.xtensa-{build.mcu}-elf-gcc.path}/bin/
that resolve fine in Arduino Builder, but seem to result in just/bin/
in sloeber.To Reproduce
Steps to reproduce the behavior:
esp32s2
branch.Expected behavior
Sketch should compile fine, in fact I replaced all those nested {build.mcu} with esp32 and esp32s2 and it worked ok.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
https://github.com/espressif/arduino-esp32/blob/esp32s2/platform.txt
The text was updated successfully, but these errors were encountered: