ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to and logged at, code of conduct at
starblue has quit [Ping timeout: 246 seconds]
starblue has joined #rust-embedded
aspe_ has joined #rust-embedded
aspe_ has quit [Remote host closed the connection]
aspe has joined #rust-embedded
lcbit has quit [Ping timeout: 258 seconds]
aspe has quit [Quit: aspe]
aspe has joined #rust-embedded
<re_irc> <heksa> chemicstry: Hehe, we just did that on our chip. It was a good facepalm moment. Uart got very broken after we edited a linker script to give more memory, and accidentally placed the program on top of our Uart buffer.
aspe has quit [Quit: aspe]
aspe has joined #rust-embedded
aspe has quit [Client Quit]
aspe has joined #rust-embedded
aspe has quit [Client Quit]
aspe has joined #rust-embedded
emerent_ has joined #rust-embedded
emerent has quit [Killed ( (Nickname regained by services))]
emerent_ is now known as emerent
gsalazar has joined #rust-embedded
aspe has quit [Quit: aspe]
causal has quit [Quit: WeeChat 3.5]
starblue has quit [Ping timeout: 240 seconds]
starblue has joined #rust-embedded
aspe has joined #rust-embedded
aspe has quit [Remote host closed the connection]
dc740 has joined #rust-embedded
dc740 has quit [Client Quit]
<re_irc> <ryan-summers> I personally have fallen in love with for state machines
<re_irc> <ryan-summers> But always love to see new state machine concepts :) Rust makes them so much nicer than C
<re_irc> <ryan-summers> There's not many embedded options currently
<re_irc> <ryan-summers> One important aspect is allowing the state machine to have underlying data it can manipulate, so e.g. you can perform actions on transitions
<re_irc> <ryan-summers> It makes things very self-contained and well-controlled
<re_irc> <ryan-summers> I like smlangs approach where the statemachine macro generates a trait that you can impl on a struct. Then, that struct operates as _the_ state machine, which is powerful
<re_irc> <ryan-summers> Because then you can wrap up complex objects as "the whole state machine" instead of implementing variables within it to do state management
<re_irc> <ryan-summers> The one thing that I'd really like is to have the state machine automatically check certain conditions to generate state transitions
<re_irc> <ryan-summers> I'd prefer to not have to manually implement a "poll()" function that checks external parameters to generate update requests, since that's all boiler plate
<re_irc> <ryan-summers> The state machine itself should be able to implement some type of transition checks
causal has joined #rust-embedded
<re_irc> <762spr> Still working on getting my developer environment dialed in. I got probe-rs set up and was happy that I just hit run in VSCodium and it builds and deploys it to my board. Awesome! But apparently debugging with breakpoints isn't supported? I did a quick Google and it seems the other option is cargo-embed. Any pros/cons on using one vs the other?
<re_irc> It sounds like cargo-embed uses gdb for debugging which has me worried that the same connection issue that led me to use probe-rs (couldnt connect open ocd and gdb server) will rear its ugly head again... or do I have unreasonable expectations of hitting the debug button in VSCodium and having it deploy and launch debugging with breakpoints and stepping in the IDE?
<re_irc> <jacobrosenthal> 762spr: They both use probe-rs, not gdb. probe-run is designed for println debugging. probe-rs can do step debugging, see the vscode plugin on the website
<re_irc> <jacobrosenthal> cargo-embed comes from the probe-rs people, probe-run comes from the knurling people. I think its fair to say cargo-embed hasnt gotten a ton of love recently, Ive personally switched to probe-run
<re_irc> <762spr> OK thanks, I saw GDB on the cargo-embed GitHub page and was like oh no! Haha
<re_irc> I was actually just reading the website and looking at their plugin page! So just so I am understanding correctly, the vscode plugin Is basically a third option compared to probe-run and cargo-embed?
<re_irc> <jacobrosenthal> 762spr: kinda? it also uses probe-rs. you could use it as a cli but I dont think its common, you use it through the vscode plugin
<re_irc> <jacobrosenthal> personally i use probe-run to see some logging, or cargo-flash to just flash the binary with logging off, and debug with the vscode plugin occasionally if I want to see registers or step a bit, but thats pretty rare frankly
<re_irc> <jacobrosenthal> cargo-embed lets you do a lot more configuration than probe-rs, mess around with rtt channels and things, have a configuration file
<re_irc> Cargo-embed also uses probe-rs and can do some more features like step debugging but users don't like it so much.
<re_irc> <762spr> So probe-run is uses probe-rs and can only do prints, sort of like the arduino ide.
<re_irc> Vscode plugin is a third option based on probe-rs that allows working with velariables and registers and step debugging in the ide
<re_irc> <jacobrosenthal> eh, I guess probe-run is like serial monitor, sure, but not really though, because its using debugger hardware not serial, so it doesnt affect performance, and doesnt require you to have working serial comms or pins dedicated
<re_irc> <762spr> I think for most of what I do, my workflow will be like yours where it is mostly print based so probe-run will suffice but every once in a while I need more so I was worried when I saw probe run didnt support that
<re_irc> <762spr> OK got it I think I understand now.
<re_irc> <jacobrosenthal> very very rarely, i still do load up full gdb for better or worse. the probe-rs debugger is still a little beta
<re_irc> <762spr> Can the vs code plugin also do debug prints? Now I am curious why not just use it all the time vs probe-run?
<re_irc> <corecode> jacobrosenthal: my man! long time
<re_irc> <corecode> ryan-summers: i think the poll -> event route can be done in a separate macro
<re_irc> <corecode> ryan-summers: would be great if you could try my crate and give me some feedback
<re_irc> <corecode> ryan-summers: right now you can attach a context (trait) to the state machine, but the plan is that this is only used to talk to the outside world. if you need to maintain extended state (say some integer), then the state should maintain this state itself. that's not implemented yet though
cr1901 has quit [Ping timeout: 255 seconds]
cr1901 has joined #rust-embedded
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #rust-embedded
cr1901 has quit [Remote host closed the connection]
cr1901 has joined #rust-embedded