<re_irc>
< (@omar_u8:matrix.org)> : Sorry, i assumed it's generic code as its the output from svd2rust
joebb has quit [Quit: WeeChat 3.6]
<re_irc>
< (@omar_u8:matrix.org)> Whether they are being activated or not, Im not sure. I've been reading up on feature gating and tried several things according to documentation. My understanding is that a feature can be activated by mentioning it in the feature table in Cargo.toml, which I tired but still. The "svd2rust" documentation also mentions that an implementation for "critical-section" needs to be provided through the...
<re_irc>
... "cortex-m" package. I tried that through the applying "critical-section-single-core" feature as indicated by the "critical-section" documentation.
<re_irc>
< (@omar_u8:matrix.org)> +Well, that among other things.
<re_irc>
< (@9names:matrix.org)> i made a test project, made it depend on your stm32f4 with the features set. take() was available.
<re_irc>
< (@burrbull:matrix.org)> Try to enable `critical-section-single-core` in `cortex-m`
<re_irc>
< (@omar_u8:matrix.org)> : I'm at a loss a little. Theres sort of a chicken and egg thing going on in my head now 😬 what I was attempting to do is create a PAC from the svd's, from what it sounds, I need a pac to provide an implementation for the pac of the same device?
<re_irc>
< (@omar_u8:matrix.org)> +The files in the repo were all created according to the svd2rust documentation.
<re_irc>
< (@9names:matrix.org)> You have created a PAC. The default features of a PAC only provide peripheral access - no startup code, no interrupt vector table, and no Peripheral singleton for safe access.
<re_irc>
Enabling the RT feature brings in those other bits, but it depends on "critical-section" to provide safe access to the Peripheral singleton.
<re_irc>
The "critical-section" crate only provides the interface for making the critical-section, because there's lots of different ways to do that so it needs someone else to implement "critical-section-impl"
<re_irc>
You get a basic implementation of it by enabling the "critical-section-single-core" feature of "cortex-m".
<re_irc>
That's why I set up a new crate to pull in yours.
<re_irc>
< (@9names:matrix.org)> You don't write your program in a PAC - it's intended to be a library crate.
<re_irc>
< (@omar_u8:matrix.org)> Ah sorry, I see. I saw the package name and overlooked the "path".
<re_irc>
< (@omar_u8:matrix.org)> Thanks a lot , I appreciate the help. I managed to get it to work now. The first part I understood, that's why it baffled me because I thought I was providing the implementations. Though I figure my problem was in the second part. I wrote the "main.rs" program in the PAC. 🙃
<re_irc>
< (@omar_u8:matrix.org)> * apparently
<re_irc>
< (@omar_u8:matrix.org)> * apparently,
dc740 has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
dc740 has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
fabic has quit [Ping timeout: 252 seconds]
IlPalazzo-ojiisa has joined #rust-embedded
fabic has joined #rust-embedded
Socke has quit [Ping timeout: 252 seconds]
Socke has joined #rust-embedded
fabic has quit [Quit: Leaving]
<re_irc>
< (@jannic:matrix.org)> It was a pleasure meeting some of you at FOSDEM! Already looking forward for the next one. (Or perhaps some earlier event?)
<re_irc>
< (@yatekii:matrix.org)> I really wanna organize an international probe-rs/rust-embedded meetup :) Not sure who would be in. let me know :)