-
Notifications
You must be signed in to change notification settings - Fork 638
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
.ld scripts refactoring #1559
.ld scripts refactoring #1559
Conversation
Also trying out draft PRs. |
When building from IDE, it generates special string that describes settings. Like this:
If board definition has some defaults ( Ofc it is not compatible between versions (search SUBSTITUTIONS in boards script) |
I think it's possible to pre-process the LD files with the compiler and use something like |
But binutils DEFINED and preprocessor defined() are different things. That is a linker script level expression, checking if symbol exists. Example given uses ternary expression to assign symbol some default value. And even then, are there global level if/else expressions to use it? But we can do something like this:
BTW, Arduino Core does use preprocessor to generate that file |
OK, I haven't tested too much with the Another option would be to use regular C |
platformio from pip still does not support py3
a453a04
to
df027b0
Compare
That diff is exactly what I have now in my linker script, and it works fine (with PIO). Either that or utils.ino and eeprom need to be ifdef-ed with the correct macro name. |
Yeah, and an interesting note from the Tasmota issue tracker: We do reference include inside tools/sdk/ld, so it does (?) work ok, or at least how it always worked before. But, we can't exactly not use them with 2.3.0 and rely on default scripts. We still need those aliases for some time, so I'll add this as a temporary solution (and to speed up -git builds setup time) I'll try to come up with a reasoning for Core issue tracker and open an issue there regarding FS... symbols usage (or some other way to use them through helper methods) |
FYI the SPIFFS symbols have been added to core as well now: esp8266/Arduino@418b00f |
Fixes arduino/Arduino#1260
Arduino IDE (only tested with 2.5.0 release):
copy proper ldscripts into the
<esp8266-package-dir>/tools/sdk/ld
copy boards.local.txt into the
<esp8266-package-dir>
run / restart IDE, select
ESPurna board
in the menuPlatformIO
same as above, but happens automatically
added
platform = ${common.arduino_core_git}
andplatform = ${common.arduino_core_2_5_0}
to allow testing with the newest CoreTODO
boards.local.txt generator scriptDoneldscript generatorDonemaybe try to find out different way to detect core version (platform.txt? parse framework package version?)Done (Checking 'local....' presence)