rust-embedded / cortex-m-semihosting

Semihosting for ARM Cortex-M processors
Apache License 2.0
40 stars 19 forks source link

Add `no-semihosting` feature to suppress all semihosting calls #57

Closed nickray closed 4 years ago

nickray commented 4 years ago

I must not be the only one who indulges in semihosting for quick print-debugging and then has a trail of intermediate mess...

With this new feature, one can easily patch out all these calls in the application (by additivity of cargo features), and get a binary that runs without debugger attached.

rust-highfive commented 4 years ago

r? @korken89

(rust_highfive has picked a reviewer for you, use r? to override)

nickray commented 4 years ago

ping @korken89?

adamgreig commented 4 years ago

I'm inclined to merge because I have often wanted exactly this feature and it would be useful. My only reservation is around negative features being generally considered unwise since any crate in the dependency tree could enable them. However, I don't think that's really an issue in this case: only the end user application would be likely to enable this feature anyway.

If no one else from @rust-embedded/cortex-m weighs in with an opinion soon I'll go ahead and merge.

korken89 commented 4 years ago

I have the same reservation, while I'd like it it would not work with the additive way features are speed to work.

But then again, this is a user facing crate so it will most likely not be an issue.

bors[bot] commented 4 years ago

Build succeeded: