Closed noppej closed 1 year ago
@Dirbaio This turned out to be easier than I thought ... mostly thanks to your tips. If you are OK with this, then I will update the stm32-data
PR when this is merged.
the
device = <crate>
still requires appending the::pac
qualifier. Is it necessary to modify the embassy_stm32 crate to eliminate this, or is this an acceptable user experience?
This is intended, the device
attr needs the PAC, not the HAL. You can do device = "embassy_stm32::pac"
, or device = "stm32_metapac"
. The former is better though because you automatically get the same PAC version.
Thank you!
The intention is to regenerate
stm32-metapac
crate, to include interrupt definitions, similar to those in peripheral access crates that are based onsvd2rust
, so that theembassy-stm32
HAL can be used in an RTIC application.With current functionality, it is possible to do this in an RTIC app - thanks to @korken89 and @MathiasKoch for the pointers :
The intention would be to reduce it to:
WIP plan of attack:
[x] Expose
interrupt
attribute macro,Interrupt
enum. (This was the 'easy' part, and I am using it to validate that all the [patch.crates-io] paths work in my tests.). Using this PR to update thestm32-metapac
, this reduces the required code from above to:[x] Expose
NVIC_PRIO_BITS
inchiptool
[x] Expose
NVIC_PRIO_BITS
instm32-metapac
Unmerged PR[x] Test with new generated
stm32-metapac
. Can successfully build and run an RTIC v2 app, using the following:TBD : @Dirbaio , and @korken89, the
device = <crate>
still requires appending the::pac
qualifier. Is it necessary to modify theembassy_stm32
crate to eliminate this, or is this an acceptable user experience?