<re_irc>
<@yatekii:matrix.org> that way you can set multiple bits in just one write. arguably you can do that with a struct too, but like this you can't do it wrong
fabic_ has joined #rust-embedded
<re_irc>
<@yruama_lairba:matrix.org> ok! this is just to ensure bit are writted just once
Shell has quit [Remote host closed the connection]
Shell has joined #rust-embedded
<re_irc>
<@mriise:matrix.org> adamgreig: I'd like to get probe-rs working with LPC55S2x and will have list of questions about errors, sequences etc. Would here work, or would a github issue be better?
<re_irc>
<@9names:matrix.org> There's also #probe-rs:matrix.org
starblue3 has quit [Ping timeout: 265 seconds]
starblue3 has joined #rust-embedded
<re_irc>
<@mriise:matrix.org> 9names: ooh, thanks I will use that for more probe-rs related things
<re_irc>
<@yruama_lairba:matrix.org> f*** lost 2 hours just because i forgot to remove a "debug::exit_success" from the original example
dcz_ has joined #rust-embedded
fabic_ has joined #rust-embedded
fabic_ has quit [Ping timeout: 240 seconds]
<re_irc>
<@adamgreig:matrix.org> mriise: yea, #probe-rs:matrix.org is definitely the place to ask! I don't really know anything about LPC chips or probe-rs's new sequences stuff...
<re_irc>
<@jamwaffles:matrix.org> How do we feel about moving HAL crate examples from GDB to probe-run?
<re_irc>
<@therealprof:matrix.org> jamwaffles: I feel more than great about that.
<re_irc>
<@henrik_alser:matrix.org> I hope i never have to touch GDB again in my life
<re_irc>
<@henrik_alser:matrix.org> Life is too short
<re_irc>
<@john_socha:matrix.org> I tried to find a crate for this display, but didn't find anything that would work. So I wrote my own code based on the Arduino library from Waveshare. I'm planning on turning this code into a crate. It is not processor specific.
fabic_ has joined #rust-embedded
fabic_ has quit [Ping timeout: 258 seconds]
<re_irc>
<@daja_2:matrix.org> henrik_alser: ... what's wrong with GDB 😱?
<re_irc>
<@thalesfragoso:matrix.org> Ai Maiga (dajamante): For one, it doesn't really work on any project that needs real timer or near real time behavior
<re_irc>
<@jduchniewicz:matrix.org> I wish there was a good alternative for GDB which would work out of the box with everything
<re_irc>
<@jduchniewicz:matrix.org> We deserve a good debugger in 2021
<re_irc>
<@daja_2:matrix.org> Is there anyone building one?
<re_irc>
<@adamgreig:matrix.org> I guess these days lots of the work is in microsoft DAP for VS code
<re_irc>
<@jduchniewicz:matrix.org> Not a specialist on debuggers but it sounds like a TON of work
<re_irc>
<@adamgreig:matrix.org> probe-rs is gaining a lot of support for it
<re_irc>
<@newam:matrix.org> jduchniewicz:
<re_irc>
<@newam:matrix.org> Are there any good probe/debugger combos out there?
<re_irc>
<@newam:matrix.org> I have used the enterprise probes/debuggers at work, and I much prefer GDB/OpenOCD/anything else.
<re_irc>
<@newam:matrix.org> * The ARM DStreams require constant power cycling to remain connected.
<re_irc>
<@newam:matrix.org> * The GreenHills probes/debugger are locked down to encourage vendor lock-in, also no headless API.
<re_irc>
<@jduchniewicz:matrix.org> I am working with JLink + GDB (might try the OZONE debugger)
<re_irc>
<@adamgreig:matrix.org> the jlink ones are pretty annoying if you don't also use segger's own debug software, because the part of the USB API they allow other software to access is much slower
<re_irc>
<@adamgreig:matrix.org> picoprobe invented their own new usb protocol seemingly needlessly and it only works with their fork of openocd so
<re_irc>
<@adamgreig:matrix.org> my feeling is that cmsis-dap probes are the way to go - it's a standard protocol that's good at what it does, is open to implement, and a lot of hardware already implements it
<re_irc>
<@newam:matrix.org> I generally avoid Pi's for projects I intend other people to use, they're fun for hacking stuff, but they have supply chain issues, and they EOL products pretty quickly.
<re_irc>
<@adamgreig:matrix.org> e.g. all the atmel probes use it even for avr, nxp's debugger uses it, micro:bit, anything with DAPlink, plus hs-probe
<re_irc>
<@adamgreig:matrix.org> yea, cmsis-dap firmware for pico is much more compelling than picoprobe imo
<re_irc>
<@adamgreig:matrix.org> but also it should be just as easy to buy an actual debugger with the right connectors and everything
<re_irc>
<@dirbaio:matrix.org> the problem is not the probe, the problem is the software support on the host
<re_irc>
<@dirbaio:matrix.org> cmsis-dap probes work just fine
<re_irc>
<@adamgreig:matrix.org> hs-probe hopefully soon, and in the meantime the mcu-link from nxp is really good and cheap and available from all the big distributors
<re_irc>
<@adamgreig:matrix.org> dirbaio: i agree but I think this is only the case because cmsis-dap exists and is ok
<re_irc>
<@dirbaio:matrix.org> the thing is cmsis-dap / swd protocols are super low level, converting that to "useful" stuff like flashing or debugging is ultra hard
<re_irc>
<@adamgreig:matrix.org> if you haven't already seen it ( jduchniewicz / Michael Zill / Ai Maiga (dajamante) ) then https://probe.rs/ (#probe-rs:matrix.org ) is the big rust project that more or less means you don't need to use openocd at all, it covers flashing and debugging and all sorts of other access (like RTT for debugging) for a...
<re_irc>
... lot of supported chips (mostly risc-v and cortex-m)
<re_irc>
<@almindor:matrix.org> Riscv is really slow with probe-rs tho atm. At least for me.
<re_irc>
<@therealprof:matrix.org> Re debugger, there's not too much around. It's a pity that https://headcrab.rs/ has stalled out, that sounded like a fun project.
<re_irc>
<@therealprof:matrix.org> (If you could call debugging fun)
<re_irc>
<@taunusflieger:matrix.org> adamgreig I’m aware of probe-rs I was referring to the USB API limitations of commercial hw probes which you pointed out - addressing those by using an OSS hw based approach- but maybe be I’m wrong
<re_irc>
<@adamgreig:matrix.org> Yea, I think that's where cmsis-dap is nice and just good enough
<re_irc>
<@adamgreig:matrix.org> And hs-probe is an example fully oss probe with rust firmware for it, but there are others too
GenTooMan has quit [Ping timeout: 240 seconds]
GenTooMan has joined #rust-embedded
<re_irc>
<@taunusflieger:matrix.org> adamgreig thanks will give rs-probe a try
crabbedhaloablut has quit [Ping timeout: 244 seconds]
<re_irc>
<@adamgreig:matrix.org> good idea, leaving a reply on that TWIR thread
<re_irc>
<@adamgreig:matrix.org> I don't have a reddit account, does anyone else who could post it?
<re_irc>
<@john_socha:matrix.org> Since I'm new to embedded rust, I had to look up probe-rs, which looks pretty cool. But, what I can't find the answer to my usual question: why would I want to switch from OpenOCD to probe-rs? Sure, it's using DAP, and I use VS Code. But how is that better than what I have working today? All I could find...
<re_irc>
... seemed to assume that you already know why you would want to use it. I don't. Is that information out there somewhere?
<re_irc>
<@adamgreig:matrix.org> mainly because it means you don't need to use openocd!
<re_irc>
<@adamgreig:matrix.org> but it's also shockingly convenient and useful, it has a lot of integration with rust projects and stuff like RTT built in is really nice
<re_irc>
<@adamgreig:matrix.org> (maybe the new openocd release actually has rtt built in now too?)
<re_irc>
<@john_socha:matrix.org> Ah, RTT sounds cool. I had to look that up. Regarding OpenOCD, given that I'm using VS Code, I don't interact directly with it. So I get a familiar UX for debugging and don't really see OpenOCD. Are the objections to OpenOCD for when you're not using something like VS Code? Or are there other issues?
<re_irc>
<@adamgreig:matrix.org> if it's working nicely for debugging and programming from vscode for you now, I guess you might as well stick with it
<re_irc>
<@adamgreig:matrix.org> openocd didn't have a new release for years, so many users had to build it from source (or more likely, tried using their distribution's package and reported bugs and errors) which was a pain, and it can be fiddly to get it working with your probe and target
<re_irc>
<@adamgreig:matrix.org> now that they've finally had a new release it's a lot easier to have it be up-to-date and support newer targets and probes, but nevertheless I find it pretty clunky to use in comparison
<re_irc>
<@adamgreig:matrix.org> still, it's mature software that's well tested with vscode, so if that's working OK for you... maybe give probe-rs a try sometime when you're bored
<re_irc>
<@adamgreig:matrix.org> RTT is _extremely_ cool and useful though, that's definitely worth investigating sooner rather than later
<re_irc>
<@john_socha:matrix.org> OK, those are all compelling reasons. I'm using a Nucleo board, so I may have gotten lucky. I'm going to give it a try--but I like to understand what the advantages are of one over the other.
<re_irc>
<@john_socha:matrix.org> And RTT sounds very useful.
<re_irc>
<@adamgreig:matrix.org> if you're not already using them, either cargo-embed or probe-run are popular ways to integrate probe-rs and rtt into your cargo workflow, too
<re_irc>
<@adamgreig:matrix.org> I mostly am running cargo from the command line, so i don't know much about the state of integrating everything into vscode, but there's been a lot of recent work on it
<re_irc>
<@richarddodd:matrix.org> I think there are interesting similarities between RTT and io_uring: using queues in buffers reduces the amount of context switching/SWD routines in linux/embedded respectively.
<re_irc>
<@richarddodd:matrix.org> (Please correct me if I'm wrong)
<re_irc>
<@newam:matrix.org> That's accurate, you see that pattern a lot these days.
<re_irc>
<@newam:matrix.org> If you take a look at the NVMe spec it is all submission queue / completion queue based as well.
<re_irc>
<@richarddodd:matrix.org> and vulkan?
<re_irc>
<@newam:matrix.org> no experience with that personally
<re_irc>
<@richarddodd:matrix.org> I think the general rule is: if you queue up a load of tasks in a buffer and then switch to the other context it can handle them in batch, rather than having to switch context for each separate operation.
<re_irc>
<@richarddodd:matrix.org> which seems like a good trade if you have the memory
GenTooMan has quit [Ping timeout: 250 seconds]
<re_irc>
<@richarddodd:matrix.org> vulkan has command queues: you send over a list of commands in the render pipeline to the GPU and then say "go". Compare to OpenGL 2, where each draw required syncronization between GPU and CPU.
<re_irc>
<@richarddodd:matrix.org> (again I might be misunderstanding)
<re_irc>
<@richarddodd:matrix.org> I do love spotting patterns :)
GenTooMan has joined #rust-embedded
<re_irc>
<@richarddodd:matrix.org> I got to use my "the hardest 2 things in computer programming are cache invalidation, naming things, and off-by-one errors" quote on a tis100 reddit the other day, which I think I stole from here :)
GenTooMan has quit [Excess Flood]
GenTooMan has joined #rust-embedded
<re_irc>
<@emilgardis:matrix.org> @adamgreig Ill do the reddit post, title same as github issue