cortex-m icon indicating copy to clipboard operation
cortex-m copied to clipboard

Doesn't support JSON targets

Open thejpster opened this issue 7 years ago • 1 comments

If you supply a target as a JSON file, the build.rs can't detect the target. This is because target is a full path - in my case starts this starts C:\, which != thumbv.

I think the fix is to take the file_stem() of the path and use that. This should work for both JSON targets and built-in targets (that don't contain .). If the built-in target does use . (e.g. thumbv8-m.base) we'll need to be a bit cleverer.

This is the same as https://github.com/rust-embedded/cortex-m-rt/issues/145.

thejpster avatar Oct 27 '18 20:10 thejpster

Relevant documentation: https://doc.rust-lang.org/rustc/targets/custom.html

newAM avatar Jun 30 '24 19:06 newAM