-
Notifications
You must be signed in to change notification settings - Fork 43
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
Linkage error with Native (non PIO build) for ESP32C3 #16
Comments
I might have figured part of this out, at least the difference between pio & espressif tools chains for RISCV. Espressif:
PIO:
However Xtensa is the same: Espressif:
PIO:
Seems PIO guys have ran into this issue to and dropped that -lnosys flag from their toolchain spec? Still no idea why this works for Xtensa though, perhaps the intrinsic calls just aren't being generated? |
Using
worked for me. Thanks for this hint. |
I am trying to get the esp edf template to build on mac m1 pro but I keep getting errors. Firstly it was due to the nightly toolchain not being used (Wasn't documented how I could change it so didn't know). Eventually after reinstalling rust, ldproxy, cargo-generate, espup and installing espup and exporting it. I stumble upon another issue which really sounds alot like the one stated above. a gist with the error I get. Not sure if this is related to this issue but if not let me know what I can do to get this issue solved. |
It is documented now. Hope that helps. With that said, this is pretty basic.
Most likely it is related, and my hypothesis would be that you are simply missing this flag or the whole |
@ivmarkov Thank you for updating the documentation and helping me out. I just generated a project with the edf template, this template give an |
Are you saying that the just-generated project fails for you with the same error? |
could be related to the changes in espup ? esp-rs/espup@7271dbc |
My issue stated above was caused due to rustflags being in my zshrc 😉. Thank you for the help and hopefully, I can soon help fix this issue for the long term. |
When using the native build, the linking phase fails with the following errors:
Preliminary analysis:
I am half there in figuring out the linkage problems with the native build and the C3 chip:
-nodefaultlibs
option on the command line, which seems to be kind of like "the default behavior" (but it seems you can control this on a Rust target level, when you define the target)__trunctfdf2
); if I remove the-nodefaultlibs
, it works OKrustflags = ["-C", "default-linker-libraries"]
to the[target.riscv32imc-esp-espidf]
section in.cargo/config.toml
in the relevant binary crate (rust-esp32-std-hello
etcetera)riscv32imc-esp-espidf
as well as in all xtensa targets, if it is not allowed there). Reason why I believe this is a correct behavior: I don't see the-nodefaultlibs
argument amongst the "native" (cmake) args, which means the native ESP-IDF build is assuming it is NOT setUnresolved questions/issues:
-nodefaultlibs
option, or that particular intrinsic is simply not needed on Xtensa. Not sureThe text was updated successfully, but these errors were encountered: