-
Notifications
You must be signed in to change notification settings - Fork 24
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
features: adds rt
feature for gd32vf103-pac/rt
#54
Conversation
No inline assembly is needed to define an interrupt handler: see https://github.com/riscv-rust/longan-nano/blob/master/examples/interrupt.rs for example. But using the macro is indeed a bit safer way of declaring an interrupt handler. |
AFAICT this code isn't actually linked into the binary anywhere. I removed the code entirely, built against the Also, actually moving the |
It gets linked into the code by |
100% missed the precomp thing... I ended up removing I have some current WIP stuff to move it to Rust here: #55 Not needed for this PR, though. Thanks for the pointers on how stuff gets linked together. |
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.
In any case, thank you for the PR!
Do you mind adding "rt" feature also to the GitHub Actions rules? https://github.com/riscv-rust/gd32vf103xx-hal/blob/master/.github/workflows/ci.yml#L26 |
Adds a `rt` feature to allow users to opt-in to using the `gd32vf103-pac/rt` feature. This exposes the `interrupt` macro, allowing users to define functions for system interrupts. This is preferable to using inline assembly to include the code in `eclic-mode-hack.S` which causes symbol collisions with user-defined interrupt functions, and strange bugs for handler execution.
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.
Thanks!
Adds a
rt
feature to allow users to opt-in to using thegd32vf103-pac/rt
feature. This exposes theinterrupt
macro, allowing users to define functions for system interrupts.This is preferable to using inline assembly to include the code in
eclic-mode-hack.S
which causes symbol collisions with user-defined interrupt functions, and strange bugs for handler execution.