<re_irc> <@thebutlah:matrix.org> I'm trying to use usbd-serial to implement the log::Logger trait on a USB serial connection. The SerialPort object does not implement core::fmt::Write, and instead it has a flushable port that can have bytes written/read from. The confusing part however is that separately according to the examples from the library, you are supposed to create a USB device via usb-device and poll that device, passing the...
<re_irc> ... SerialPort as one of the objects to dispatch the polled events to.
<re_irc> <@thebutlah:matrix.org> I find that API a bit confusing since it means that if I pass a SerialPort object to some other struct (for example my logger implementation), when it writes to the SerialPort, nothing is actually written until the usb device has `device.poll(&[my_serial])` invoked. I'm not sure what exactly is supposed to own the SerialPort object and the USB device - is it the Logger, some polling loop of my main...
<re_irc> ... function, or something else? Furthermore if the USB device needs to be polled in as often as possible, this implies that I can't have things like delays in the rest of the application because it will delay the polling mechanism as well.
<re_irc> <@thebutlah:matrix.org> Any insight on the decisions behind why the poll operation is separate, how to avoid delays/polling blocking timers and other things, and who should own the serial logger?
starblue has quit [Ping timeout: 240 seconds]
starblue has joined #rust-embedded
<re_irc> <@dngrs:matrix.org> jamesmunns:beeper.com: ah so I was mainly wondering how to reference/handle those things, not the actual storage; for now that is handled rather crudely by `cortex_m::singleton!` which I guess is ok for the time being but may get revisited for polishing - usually I struggle to turn these POCs I build into crates or modules which you could "plug in" to RTIC for example (I guess the problem is because you have a...
<re_irc> ... few different topics like interrupt handling, resources, locking, yadda yadda)
<re_irc> <@dngrs:matrix.org> anyway, got temporal LED DMA dithering to work and it's *pretty nice*! Needs a bit of sanding around the edges but the visual quality is definitely there
<re_irc> <@dngrs:matrix.org> still not sure 100% how to best unify the light energy and perception models of internal LED pwm vs temporal dithering PWM vs gamma correction
<re_irc> <@dngrs:matrix.org> maybe I will actually need to measure the photon output somehow for a given RGB input
<re_irc> <@dngrs:matrix.org> also lol tired brain word salad, I should go to bed
<re_irc> <@dngrs:matrix.org> o>
<re_irc> <@luojia65:matrix.org> Wu Wei: At the end of 2022, I don't know if I can get a RISC-V notebook based on Xiangshan. (Thinking about it makes me happy)
hwj has joined #rust-embedded
hwj has quit [Ping timeout: 256 seconds]
<re_irc> <@eldruin:matrix.org> PSA: [This year in Embedded Rust 2021](https://blog.rust-embedded.org/this-year-in-embedded-rust-2021/) is now published 🎉
<re_irc> <@eldruin:matrix.org> Credit goes to thejpster and all contributors.
<re_irc> <@eldruin:matrix.org> Thank you for all your work everybody! Happy holidays and see you in 2022!
<re_irc> <@emilgardis:matrix.org> actually, maybe it should be under official?
<re_irc> <@eldruin:matrix.org> Maybe, since we are an official WG group. However, I do not know if that is reserved only to language stuff.
hwj has joined #rust-embedded
Foxyloxy has quit [Quit: Textual IRC Client: www.textualapp.com]
Foxyloxy has joined #rust-embedded
<re_irc> <@jamesmunns:beeper.com> Tweeted! https://twitter.com/rustembedded/status/1476174956555907084
dfgweb has joined #rust-embedded
hwj has quit [Ping timeout: 240 seconds]
<re_irc> <@henrikssn:matrix.org> Anyone know of a smoltcp example for targeting the nRF platform?
<re_irc> <@dirbaio:matrix.org> using what for networking? radio, external ethernet chip..?
<re_irc> <@henrikssn:matrix.org> My idea was to use smoltcp to talk 6lowpan with the ieee802.15.4 radio on the nrf52840
<re_irc> <@dirbaio:matrix.org> neat! there you go https://github.com/oddstr13/usb-dongle-smoltcp-6lowpan-test
<re_irc> <@dirbaio:matrix.org> it's from before the smoltcp 0.8 release, there might've been a few breaking changes but they should be easy to fix
<re_irc> <@dirbaio:matrix.org> if you have issues you're welcome to ask in #smoltcp:matrix.org :D
dfgweb has quit [Quit: Leaving]
<re_irc> <@henrikssn:matrix.org> Awesome, saves me a ton of time! I'll check it out and get back to the smoltcp matrix if (when) I get lost :)
<re_irc> <@dirbaio:matrix.org> I have some asm using `UMAAL` instructions.
<re_irc> <@dirbaio:matrix.org> but it fails with `arm-none-eabi-gcc -mthumb -march=armv8-m.main`:
<re_irc> <@dirbaio:matrix.org> it builds fine with `arm-none-eabi-gcc -mthumb -march=armv7e-m`
<re_irc> <@dirbaio:matrix.org> > Error: selected processor does not support `umaal r2,r11,lr,r6' in Thumb mode
<re_irc> <@dirbaio:matrix.org> what are the right flags to get it to accept `UMAAL`? and how do I get the `cc` crate to supply them? 🤔
<re_irc> <@dirbaio:matrix.org> or should I stop trying to build+link asm with `arm-none-eabi-gcc` and use `global_asm!` instead?
<re_irc> <@adamgreig:matrix.org> hmmm, wfm I think
<re_irc> <@adamgreig:matrix.org> https://godbolt.org/z/ToPdKPjo6
<re_irc> <@dirbaio:matrix.org> yeah it's gcc
<re_irc> <@adamgreig:matrix.org> that godbolt is using gcc
<re_irc> <@dirbaio:matrix.org> oh 🤦‍♂️
<re_irc> <@adamgreig:matrix.org> hmmm
<re_irc> <@adamgreig:matrix.org> I get the same error as you if I run it with my local arm-none-eabi-gcc though
<re_irc> <@adamgreig:matrix.org> if I use -mcpu=cortex-m33 instead it's OK
<re_irc> <@adamgreig:matrix.org> not sure how to tell gcc specifically that you want armv8-m with dsp extension
<re_irc> <@adamgreig:matrix.org> .main doesn't imply DSP and I Don't think the arch name changes with dsp
<re_irc> <@dirbaio:matrix.org> lol why would they do that
<re_irc> <@adamgreig:matrix.org> ah
<re_irc> <@adamgreig:matrix.org> -mthumb -march=armv8-m.main+dsp
<re_irc> <@dirbaio:matrix.org> yesss!
<re_irc> <@dirbaio:matrix.org> lol it's all hardcoded https://github.com/alexcrichton/cc-rs/blob/main/src/lib.rs#L1744
<re_irc> <@dirbaio:matrix.org> error: invalid asm template string: expected `'}'`, found `'-'`
<re_irc> <@dirbaio:matrix.org> |
<re_irc> <@dirbaio:matrix.org> lol this global_asm error:
<re_irc> <@dirbaio:matrix.org> --> src/scalar.rs:19:29
<re_irc> <@dirbaio:matrix.org> completely wrong file:line!
<re_irc> <@dirbaio:matrix.org> also it seems you can't simply throw a .s file at `global_asm!(include_str!(..));`, the format is different..??
<re_irc> <@dirbaio:matrix.org> guess I'll stick with `cc` :(
<re_irc> <@adamgreig:matrix.org> :/
<re_irc> <@adamgreig:matrix.org> global_asm seems a really nice way to do it, or asm inside a function or something
<re_irc> <@adamgreig:matrix.org> in terms of having the right cpu flags set and not requiring arm-none-eabi-gcc etc
<re_irc> <@dirbaio:matrix.org> yeah indeed
<re_irc> <@dirbaio:matrix.org> I do need global_asm, i thas functions with weird calling conventions
<re_irc> <@adamgreig:matrix.org> of course :P
<re_irc> <@dirbaio:matrix.org> but it's super annpying if I have to rewrite all `push {r0}` to `push {{r0}}` >_<
<re_irc> <@adamgreig:matrix.org> ah... lol
<re_irc> <@adamgreig:matrix.org> neat
<re_irc> <@adamgreig:matrix.org> one spare pogo pin is brave lol
<re_irc> <@adamgreig:matrix.org> clever to use upside down pogo pins for the locating studs, and the 0.1" pin headers both to hold the two PCBs together and as a second set of SWD pins for jumper wires
<re_irc> <@thejpster:matrix.org> Can I get bors to stop emailing me?
<re_irc> <@thejpster:matrix.org> It only happens randomly
<re_irc> <@adamgreig:matrix.org> I haven't worked out what's causing this at all
<re_irc> <@adamgreig:matrix.org> I don't know it's actually bors
<re_irc> <@adamgreig:matrix.org> they're from github, right?
<re_irc> <@adamgreig:matrix.org> that's because it was delivered to you through the rust-embedded.org mailing list, which isn't itself allowed to send from github.com
<re_irc> <@adamgreig:matrix.org> but it's an email from github
<re_irc> <@thejpster:matrix.org> Yes but is our remailer at teams.rust-embedded.org ok?
<re_irc> <@thejpster:matrix.org> I'd expect to get these a lot, or not at all
<re_irc> <@thejpster:matrix.org> Not randomly
<re_irc> <@adamgreig:matrix.org> have you checked your spam? I find they mostly go to spam
<re_irc> <@adamgreig:matrix.org> and I seem to get them for every bors commit to staging/merge to master on cortex-m repo, rather than randomly
<re_irc> <@adamgreig:matrix.org> (but I don't know why they started recently)
<re_irc> <@thejpster:matrix.org> I have few but not as many as you might expect
<re_irc> <@thejpster:matrix.org> Ok, I'll filter them out for now
<re_irc> <@adamgreig:matrix.org> I'd love to know what causes them, heh. afaik github doesn't know about that email address via the github org team, so dunno where it's getting it from exactly
<re_irc> <@adamgreig:matrix.org> oh, it was set up repo settings -> notifications for all push events
<re_irc> <@adamgreig:matrix.org> I've disabled that now
hifi has quit [Remote host closed the connection]
hifi has joined #rust-embedded
hwj has joined #rust-embedded
hwj has quit [Client Quit]
edm has quit [Quit: Updating details, brb]
edm has joined #rust-embedded
radens has quit [Quit: Connection closed for inactivity]