-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Add non-archived dependencies matcher to linker for PlatformIO #4355
Conversation
Ensures that dependencies with the build setting `"libArchive": false` (e.g. GDBStub) are linked properly when using PlatformIO.
@kylefleming could you navigate to Now, please switch to upstream/development version of PIO Core via Does it work properly now? |
@ivankravets Yep, it seems to work. I assume this is related to fixing weak linking symbols from archives as described here: #3321 (comment)? The issue about |
We had a discussion about this issue with @igrr and P.S: I fixed the issue with a missed slash in LD and removed our manifest. See #4363 |
@ivankravets This PR still addresses a valid issue. The issue is related to using The issue, to recap, is that For reference, the GDBStub libraries (with platformio environment named
Hence using this matcher. (Note: I'm ignoring the |
@kylefleming What will be if a library has nested folders instead of 1-level structure? Would be good to find a solution here #4356 (comment) |
Drop PlatformIO lines from LD script; append object suffix to the end of target name // Resolve #4355
Resolved in #4399 |
Ensures that dependencies with the build setting
"libArchive": false
(e.g. GDBStub) are linked properly when using PlatformIO.Basic Infos
Hardware
Hardware: d1 mini
Core Version: master
Description
When using PlatformIO, GDBStub doesn't work properly. It throws a compile error with the d1 mini, which I've included below.
However, even if the alignment is fixed for those methods with
.align 4
ingdbstub-entry.S
, there is still an underlying issue. The true issue is that the gdbstub functions that are labeled withATTR_GDBFN
(akaICACHE_RAM_ATTR
) aren't actually being stored in iram, which also means that the ISR handlers won't be called. This is caused by GDBStub requiring that libArchive be set to false in the library's build settings (for reasons related to weak function aliasing, see #3488), thus no longer matching the existing PlatformIO linker patterns in the linker file.This pull request addresses that and fixes #3903, which reports the same issue.
Note: I also fixed a typo in the linker file related to not properly escaping a backslash.
platformio.ini
Sketch
Debug Messages