-
Notifications
You must be signed in to change notification settings - Fork 183
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
Remove final panics from stm32xx-sys on h7 and keep it that way #1711
Conversation
afbbf4c
to
0dd39d8
Compare
0dd39d8
to
7812e21
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I had a couple small suggestions, but no blockers. Let me know what you think?
@@ -37,6 +37,7 @@ g070 = ["family-stm32g0", "stm32g0/stm32g070", "drv-stm32xx-sys-api/g070", "drv- | |||
g0b1 = ["family-stm32g0", "stm32g0/stm32g0b1", "drv-stm32xx-sys-api/g0b1", "drv-stm32xx-gpio-common/model-stm32g0b1"] | |||
|
|||
no-ipc-counters = ["idol/no-counters"] | |||
no-panic = ["userlib/no-panic"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the motivation for making this a task feature, rather than just always enabling it? It seems a bit awkward to have to enable no-panic
in the app.toml
s, when the sys
task will never panic, and this only controls the elimination of the panicking code. Since the task is built independently of other tasks, we don't need to worry about e.g. feature unification enabling no-panic
for everyone, so I'd kind of prefer for the app.toml
author to not have to think about this at all.
I'm open to being convinced otherwise about this, though, if you think there's a real use-case for not enabling no-panic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sys
task may never panic, but the compiler is only known to reliably remove all of the panics on some of our ARMv7-M builds. I haven't tested it at all on v6-M. So for now, it's conditional.
Definitely interested in forcing it on later once we've convinced ourselves it won't be annoying.
7812e21
to
a94aab2
Compare
At least in some configurations.
a94aab2
to
43f5837
Compare
Clients generally assume that
sys
won't panic. Until recently there's been nothing to ensure that.This commit rearranges sys a bit and disables its ability to generate panics at link time, using the
userlib/no-panic
feature. This works on our current pinned toolchain, but also on 1.79-ish current nightly, so it appears not to be super fragile.