cortex-m
cortex-m copied to clipboard
Doesn't support JSON targets
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.
Relevant documentation: https://doc.rust-lang.org/rustc/targets/custom.html