-
Notifications
You must be signed in to change notification settings - Fork 156
re-export the interrupt
attribute
#235
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
Conversation
LGTM |
Before landing this, the RFC rust-embedded/cortex-m-rt#122 needs to be accepted. |
Pinging @whitequark as we'll want to re-spin tm4c12xx when this lands. |
122: [RFC] `#[interrupt]` r=therealprof a=japaric this PR adds an `interrupt` attribute that's similar to the existing `exception` except that it's used to override device-specific interrupt handlers. The other big difference is that `cortex_m_rt::interrupt` can't be directly used; it must first be imported from a device crate, which re-exports `cortex_m_rt::interrupt`. This is required to check at compile time that the interrupt is valid for the target device. Safe `static mut` variables can be used with `#[interrupt]` handlers. The syntax is the same as `#[exception]`s. More background information can be found in #109. The companion svd2rust PR is rust-embedded/svd2rust#235 r? @rust-embedded/cortex-m Co-authored-by: Jorge Aparicio <[email protected]> Co-authored-by: Adam Greig <[email protected]>
Upstream cortex-m-rt v0.6.5 has landed with |
This is necessary to support rust-embedded/svd2rust#235.
this is a breaking change because - it bumps the cortex-m-rt version requirement to v0.6.4 - it changes the behavior of the `<device>::interrupt` item. This item was a bang macro and now have become an attribute.
2dab852
to
6954d60
Compare
Triage: this has been accepted by the cortex-m team and it's waiting for review. |
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.
LGTM
bors r=therealprof |
235: re-export the `interrupt` attribute r=therealprof a=japaric this is a breaking change because - it bumps the cortex-m-rt version requirement to v0.6.4 - it changes the behavior of the `<device>::interrupt` item. This item was a bang macro and now has become an attribute. Co-authored-by: Jorge Aparicio <[email protected]>
Build failed |
fixed the build error. re-r? @therealprof (or anyone else) |
bors r+ |
235: re-export the `interrupt` attribute r=therealprof a=japaric this is a breaking change because - it bumps the cortex-m-rt version requirement to v0.6.4 - it changes the behavior of the `<device>::interrupt` item. This item was a bang macro and now has become an attribute. Co-authored-by: Jorge Aparicio <[email protected]>
Build succeeded |
122: [RFC] `#[interrupt]` r=therealprof a=japaric this PR adds an `interrupt` attribute that's similar to the existing `exception` except that it's used to override device-specific interrupt handlers. The other big difference is that `cortex_m_rt::interrupt` can't be directly used; it must first be imported from a device crate, which re-exports `cortex_m_rt::interrupt`. This is required to check at compile time that the interrupt is valid for the target device. Safe `static mut` variables can be used with `#[interrupt]` handlers. The syntax is the same as `#[exception]`s. More background information can be found in #109. The companion svd2rust PR is rust-embedded/svd2rust#235 r? @rust-embedded/cortex-m Co-authored-by: Jorge Aparicio <[email protected]> Co-authored-by: Adam Greig <[email protected]>
this is a breaking change because
it bumps the cortex-m-rt version requirement to v0.6.4
it changes the behavior of the
<device>::interrupt
item. This item was abang macro and now has become an attribute.