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

Add support for .cargo/config.toml #701

Open
LuckyTurtleDev opened this issue May 26, 2023 · 3 comments
Open

Add support for .cargo/config.toml #701

LuckyTurtleDev opened this issue May 26, 2023 · 3 comments

Comments

@LuckyTurtleDev
Copy link
Contributor

cargo-msrv ignores the .cargo/config.toml. And does still try to use the default target.
A workaround is to manual set the target with --target thumbv7em-none-eabihf

[target.thumbv7em-none-eabihf]
runner = "hf2 elf"
#runner = 'probe-run --chip ATSAMD51J19A'

[build]
target = "thumbv7em-none-eabihf"
rustflags = [

  # This is needed if your flash or ram addresses are not aligned to 0x10000 in memory.x
  # See https://github.com/rust-embedded/cortex-m-quickstart/pull/95
  "-C", "link-arg=--nmagic",

  "-C", "link-arg=-Tlink.x",
]
@foresterre foresterre changed the title cargo-msrv ignores .cargo/config.toml Add support for .cargo/config.toml May 26, 2023
@foresterre
Copy link
Owner

Ai, you've discovered a feature we do not support yet. I do hope to add support for Cargo's config file at some point.

@rursprung
Copy link

with the target support now fixed (cf #825) i think support for build.target in .cargo/config is the last missing piece of the puzzle to ensure that cargo-msrv works out of the box and with no additional manual switches for most embedded projects. though admittedly specifying the target manually is low overhead (once you know that you need to do it).

@foresterre
Copy link
Owner

There's also a bit of luck on another front, someelse already did the hard work of parsing the config.toml 😄: https://crates.io/crates/cargo-config2. Well that will save some work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants