Skip to content
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

Update .cargo/config.toml in setup to match .cargo/config.toml at the root of the book #17

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

Tomer-Eliahu
Copy link
Contributor

While the discovery book suggests you clone the book repo, I prefer working gradually and only copying files when I need them.

I copied just the setup files and got the error:

WARN probe_rs::flashing::loader: No loadable segments were found in the ELF file.
Error No loadable segments were found in the ELF file.

This error probably does not happen if you clone the whole book repo (I guess then cargo uses the root config over the setup config), but adding "-C", "link-arg=-Tlink.x" to the rustflags prevents this error.

… root of the book

While the discovery book suggests you clone the book repo, I prefer working gradually and only copying files when I need them.

I copied just the setup files and got the error:

 WARN probe_rs::flashing::loader: No loadable segments were found in the ELF file.
       Error No loadable segments were found in the ELF file.

This error probably does not happen if you clone the whole book repo (I guess then cargo uses the root config over the setup config), but adding "-C", "link-arg=-Tlink.x" to the rustflags prevents this error.
@Tomer-Eliahu Tomer-Eliahu requested a review from a team as a code owner March 21, 2025 18:06
@BartMassey
Copy link
Member

I am unable to reproduce the problem: if I copy 03-setup to a temp directory outside the workspace and build it as is, it works fine. That said, it works fine for me with the change as well, so we'll take your fix and see if it causes anyone an issue, I think..

I suspect it's a platform difference. I'm on Linux: you?

Let us know if 05-meet-your-software and beyond have the same issue.

Thanks much for the contribution!

@BartMassey BartMassey merged commit 0f742ed into rust-embedded:main Mar 21, 2025
3 checks passed
@Tomer-Eliahu Tomer-Eliahu deleted the patch-1 branch March 21, 2025 23:48
@Tomer-Eliahu Tomer-Eliahu mentioned this pull request Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants