<JamesMunns[m]>
like, you want to avoid typing --release?
<michaeldesilva[m>
JamesMunns[m]: well, the issue is the debug output is like 500K vs the 38K of release and I was/am still use dfu-util, but this is SLOW as molasses. But let me re-clarify, if I just stick to the default runner config, change something in my code, click on debug - it'll run probe-rs (and it says it is flashing the device) but my RTT logs show the **previous** data.
<michaeldesilva[m>
I noticed I had to manually do another cargo build (irrespective of debug/or release) and then the next run of probe-rs (through VSCode) would work.
<JamesMunns[m]>
I don't know about vscode, but the way `runner` works is:
<JamesMunns[m]>
* it does `cargo build`
<JamesMunns[m]>
* it passes the path to the executable to the command you specify
<JamesMunns[m]>
like, it will never skip the cargo build step, which is why you don't need to specify it.
<JamesMunns[m]>
but I'm confused, you said:
<JamesMunns[m]>
"I still use dfu-util", but you are trying to use `probe-rs cli` which is like... the opposite of that?
<JamesMunns[m]>
if you are using a vscode plugin, THAT doesn't use the runner config afaik - that's only if you type cargo run --release at the command line
<michaeldesilva[m>
BUT fyi cargo run does everything I need
<JamesMunns[m]>
yes
<JamesMunns[m]>
cargo run will build the debug build, and flash it with your runner, cargo run --release will build the release build, and flash it with your runner.
<michaeldesilva[m>
JamesMunns[m]: yeah that's just fine.
<michaeldesilva[m>
I think I need to configure the preLaunchTask and get that to do a cargo build
<M9names[m]>
have you tried putting cargo build --release in that spot?
<michaeldesilva[m>
* I think I need to configure the preLaunchTask and get that to do a cargo build (and or pass --release)`
<M9names[m]>
okay. i've finally caught up to where you started, where you said "prelaunch task" without specifying you wanted to know how to get vscode to do that.
<M9names[m]>
a little context goes a long way
<michaeldesilva[m>
ok it took a few more steps - I need to configure custom tasks
<M9names[m]>
the other option is to make your debug builds optimised like release builds, since they're largely useless otherwise anyway.
<michaeldesilva[m>
michaeldesilva[m: and `"preLaunchTask": "rust: cargo run (debug)",`
<michaeldesilva[m>
M9names[m]: > <@9names:matrix.org> the other option is to make your debug builds optimised like release builds, since they're largely useless otherwise anyway.
<Henk[m]>
<adamgreig[m]> "I've made this room actually, so..." <- I'm interested!
<Henk[m]>
> <@adamgreig:matrix.org> I've made this room actually, so please shout or message me if you're interested in attending
<Henk[m]>
* I'm interested! Can you invite me?
korken89[m] has joined #rust-embedded
<korken89[m]>
Alright generic gurus assemble! I'm trying to write an algorithm generic over atomic width. More or less, I want to build a `BitChannel` where the atomic holds flags from `bitflags` crate. The thing is, below is my try to make an atomic that is generic over width - i.e. place stuff in memory and dance it like it was an atomic. Is there any... (full message at
<diondokter[m]>
I think there should be a way to connect it to the flags trait
<korken89[m]>
Checking!
<korken89[m]>
Ahh, neat - I'll try to adapt it to Flags!
<korken89[m]>
Give me a sec
<diondokter[m]>
So the advantage is that we simply encode which atomic type corresponds to which integer so we're able to use the correct atomic type. That way we don't have to do any unsafe spooky stuff
<korken89[m]>
Yeah, quite nice! Lets see if I run into problems trying to make it connect :D
IlPalazzo-ojiisa has quit [Ping timeout: 264 seconds]
IlPalazzo-ojiisa has joined #rust-embedded
IlPalazzo-ojiisa has quit [Remote host closed the connection]
IlPalazzo-ojiisa has joined #rust-embedded
<korken89[m]>
Hmm, I'm getting stuck on converting between flags and this atomic type
<diondokter[m]>
The Bits type on the flags are integers right?
<korken89[m]>
The trait is implemented for integers
<diondokter[m]>
So then you should be able to put extra bounds in places
<JamesMunns[m]>
maybe zooming out: whatcha actually trying to do here? There's a lot of generics going on here and there might be a simpler way :D
<korken89[m]>
I think my original approach was quite simple but required unsafe xD
<korken89[m]>
<korken89[m]> "Alright generic gurus assemble..." <- > <@korken89:matrix.org> Alright generic gurus assemble! I'm trying to write an algorithm generic over atomic width. More or less, I want to build a `BitChannel` where the atomic holds flags from `bitflags` crate. The thing is, below is my try to make an atomic... (full message at <https://catircservices.org/_matrix/media/v3/download/catircservices.org/ZBQJwFmfglEdCNzHEwVjmNyd>)
<diondokter[m]>
Basically, store flags in a container where you can manipulate them atomically
<korken89[m]>
Yeah, I know the inner type of bitflags is {u8, u16, ...}, so I just want them to be atgomic
<korken89[m]>
* Yeah, I know the inner type of bitflags is {u8, u16, ...}, so I just want them to be atomic
<korken89[m]>
So I needed a variable width atomic based on what underlying storage bitflags used for the type
IlPalazzo-ojiisa has quit [Remote host closed the connection]
<JamesMunns[m]>
I think the issue is getting Rust to realize that AtomicType::Target is what you pass to AtomicType's methods
<JamesMunns[m]>
and since `AtomicType` doesn't define the methods there's no way to constrain the blanket impl so that `<T as Flags>::Bits` is the same type as `AtomicType::Target` and also the right type for the atomic methods?
<JamesMunns[m]>
like, you could trait out all the atomic methods you care about to constrain that, but this seems... not what you want?
<korken89[m]>
In my test I only did one, but I only need fetch_and and fetch_or for the datastructure
<korken89[m]>
The thing is I can'
<korken89[m]>
* I can't see why the same trick I used does now work on diondokter traits
<korken89[m]>
I have to experiment a bit
<korken89[m]>
* I can't see why the same trick I used does not work on diondokter traits
<JamesMunns[m]>
can you just have some like `where Flags::Bits: Into<AtomicType::Target>` or something? like don't the bits impl into?
<korken89[m]>
Very nice, thank you all for the assistance! Finally I can do watch dog handling generically with event flags in async, bye bye MPSCs feeding a task :D
Charles[m]1 has quit [Quit: Idle timeout reached: 172800s]
SunClonus has joined #rust-embedded
Guest7282 has left #rust-embedded [Error from remote client]