Unclear how to use `#[interrupt]` macro without deprecated `--reexport-interrupt` flag
According to the documentation of svd2rust, the --reexport-interrupt flag is deprecated. However according to the documentation of cortex-m-rt, the #[interrupt] macro should only be used via the svd2rust reexport, and indeed it fails to compile when used directly, with a confusing error.
How is the interrupt macro supposed to be used without the --reexport-interrupt flag passed to svd2rust? This should at least be documented clearly in the svd2rust documentation.
There have been planned some changes in cortex-m-rt 0.8 like moving interrupt in independent crate. But it is not done yet.
Ask @adamgreig.
I also stumbled into the issue, wondering why I could not use the interrupt macro, and I had to rebuild with the --reexport-interrupt flag.
You can use it without the flag. But you have to import your PAC's Interrupt enum as interrupt.
use hal::pac::Interrupt as interrupt;
use cortex_m_rt::interrupt;
That's basically what the --reexport-interrupt flag does as well. Not sure if there's any value in doing this over using the deprecated flag for now.