Guest7282 has left #rust-embedded [Error from remote client]
starblue has quit [Ping timeout: 256 seconds]
starblue has joined #rust-embedded
Guest7282 has joined #rust-embedded
Guest7282 has left #rust-embedded [Error from remote client]
emerent has quit [Ping timeout: 256 seconds]
emerent has joined #rust-embedded
<danielb[m]>
<M9names[m]> "my guess was 50% too high. guess..." <- technically "500 at least" isn't **wrong**
SergioGasquez[m] has quit [Quit: Idle timeout reached: 172800s]
WikeChao[m] has quit [Quit: Idle timeout reached: 172800s]
Ralph[m] has joined #rust-embedded
<Ralph[m]>
is this a good approach for updating to the latest RC? i thought i'd give it a try, but i'm a bit unsure about whether this is really idiomatic rust?
<Lumpio->
I wonder what a practical use case for "ToggleableOutputPin" is
<JamesMunns[m]>
bitbanged 1wire or i2c?
<JamesMunns[m]>
oh no, that's not like an InputOutputPin
<JamesMunns[m]>
it's just stateful?
<JamesMunns[m]>
Yeah then I dunno why ToggleableOutputPin and StatefulOutputPin aren't the same :p
<JamesMunns[m]>
I guess most OutputPins will just impl all three traits
<Lumpio->
I don't see why fn toggle() is not just a method on StatefulOutputPin, could even have a default impl
<M9names[m]>
i guess it's theoretically possible to have an output pin that you can't read the current state of, but you can set a toggle flag in hardware
<Lumpio->
Very theoretically.
<Lumpio->
I would like to have a word with whoever designed that hardware
<vollbrecht[m]>
the only think logical for me here would be, if some hardware has a direct toggle hardware pin capability's. In other words one don't need to read the state of the register one just can toggle. Not every set of hardware can do that. But i suspect that is lost anyway in the abstraction and people just implement the functionality in software
<Lumpio->
idk just struck me as a weird thing to have in a general HAL for the one bizarre chip out there where you can toggle but not read the state of the pin
<Lumpio->
I'd just have put it as a method with a default impl on StatefulOutputPin
<vollbrecht[m]>
Lumpio-: i mean it in a way that you can have that in one instruction, obviously there should be no hardware where you cant read the state - or its really niche :D
<vollbrecht[m]>
but yeah from a hal perspective its wired
<M9names[m]>
would a default impl interfere with a chip where you can toggle the pin without reading the current state?
<Lumpio->
No, because a default impl can be overridden to use the "more efficient" method if the hardware supports it
<Lumpio->
Same answer for vollbrecht[m]
<Lumpio->
I guess I'll open an issue to see if smarter people can come up with an explanation for having it
Guest7282 has joined #rust-embedded
xnor has quit [Ping timeout: 252 seconds]
xnor has joined #rust-embedded
johannes[m] has joined #rust-embedded
<johannes[m]>
Hi, I'd like to use [`lora-phy`](https://github.com/lora-rs/lora-rs/tree/main/lora-phy) with `RTIC` but `lora-phy` seems to require an async HAL. Are there any async HALs for the `stm32wl55` or will I have to implement the required `embedded_hal_async` traits myself?
IlPalazzo-ojiisa has joined #rust-embedded
explodingwaffle1 has joined #rust-embedded
<explodingwaffle1>
<johannes[m]> "Hi, I'd like to use [`lora-phy`]..." <- you can use the embassy-stm32 HAL with rtic
mabez[m] has quit [Quit: Idle timeout reached: 172800s]
eyduhshethey[m] has quit [Quit: Idle timeout reached: 172800s]
<johannes[m]>
Ah, I was not aware of that. I'll try that, thanks.
<firefrommoonligh>
FYSA, I am un-asyncing lora-phy
<firefrommoonligh>
But it doesn't work yet... or more likely I forgot to wire something up on the test board.
<johannes[m]>
<firefrommoonligh> "FYSA, I am un-asyncing lora-phy" <- Is that published anywhere?
<firefrommoonligh>
No. I'll publish it if it works or if I can make it generic
<firefrommoonligh>
I can send you the codes if you'd like, but I think not worth it until I get it working
<firefrommoonligh>
RN i can't even do a successful register read...
<firefrommoonligh>
Mode 0, 10Mhz SPI clock... hmm
<johannes[m]>
hmm I will try getting the embassy HAL to work with RTIC and if that does not work I'll just use stm32wlxx-hal to replicate the lora-phy functionality
diondokter[m] has quit [Quit: Idle timeout reached: 172800s]
xiretza[cis] has quit [Quit: Idle timeout reached: 172800s]
jessebraham[m] has quit [Quit: Idle timeout reached: 172800s]
lulf[m] has quit [Quit: Idle timeout reached: 172800s]
newam[m] has quit [Quit: Idle timeout reached: 172800s]
spinfast[m] has joined #rust-embedded
<spinfast[m]>
<firefrommoonligh> "FYSA, I am un-asyncing lora-phy" <- What inspired that?
<dirbaio[m]>
<spinfast[m]> "What inspired that?" <- he doesn't like async
<spinfast[m]>
hah, well I haven't tried debugging any async rust code in embedded yet, but I imagine that not being very pleasant
<spinfast[m]>
then again having the async stuff generate state machines for running things semi-concurrently seems appealing
<spinfast[m]>
its not like rtos scheduled threads is free of this problem either... but the debuggers can be made aware of thread stacks and such, can gdb be made aware of async tasks like that in some manner?
<spinfast[m]>
like could you step through an async task as if it were a thread in gdb? that would make the debugging aspect maybe less annoying perhaps
<dirbaio[m]>
async single-stepping mostly works with probe-rs
<JamesMunns[m]>
There are also options like defmt and tracing (the unreleased v0.2 branch does not require an allocator), as well that are not gdb based
<dirbaio[m]>
it breaks down if the binary is build with optimizations, but so does non-async single-stepping
<JamesMunns[m]>
fwiw: I've found LTO breaks GDB a lot more than regular optimizations do
<JamesMunns[m]>
GDB works pretty well with no lto and opt z/3 in my experience
<dirbaio[m]>
async singlestepping doesn't work with gdb, but that's more like gdb's fault rather than async's
<dirbaio[m]>
* doesn't work well with gdb,
<JamesMunns[m]>
I suspect LLVM lto just does a bad job preserving debug transformations, error guess/opinion tho
<dirbaio[m]>
I haven't found debugging to be an issue with async, no
<JamesMunns[m]>
s/error/wild/
<dirbaio[m]>
I use print-based debugging most of the time though:D
<dirbaio[m]>
* time though :D
<dirbaio[m]>
* so I haven't
<dngrsspookyvisio>
can you do tracing spans with defmt? that could be useful for untangling async logs
<JamesMunns[m]>
Not out of the box. You could probably fork tracing to used defmts interning machinery instead tho
<JamesMunns[m]>
s/used/use/
<dngrsspookyvisio>
I'll just throw this on the big pile of "projects I'll surely get to someday"
Guest7282 has left #rust-embedded [Error from remote client]
crabbedhaloablut has quit []
rmsyn[m] has joined #rust-embedded
<rmsyn[m]>
I'm working on a bare-metal example program on a risc-v board, and having big trouble getting even the most basic program to actually run. I've hooked up a debugger, and the program appears to get stuck in `_start` and `_abs_start` without ever entering `main`. I'm using `riscv-rt` for startup code