<re_irc> <@a​damgreig:m​atrix.org> what sort of time of day would be helpful? having another timezone option would be great for a lot of the wg members that really can't make the current time
<re_irc> <@a​damgreig:m​atrix.org> could potentially alternate weeks or something too
fabic_ has joined #rust-embedded
starblue3 has joined #rust-embedded
starblue2 has quit [Ping timeout: 268 seconds]
tokomak has joined #rust-embedded
zBeeble42 has joined #rust-embedded
zBeeble has quit [Remote host closed the connection]
Darius has quit [Ping timeout: 245 seconds]
Darius has joined #rust-embedded
fabic_ has quit [Ping timeout: 252 seconds]
fabic_ has joined #rust-embedded
fabic_ has quit [Ping timeout: 252 seconds]
<re_irc> <@n​ihal.pasham:m​atrix.org> does `cargo-flash` support flashing to a user-provided base-address, something akin to what `pyocd` offers -
<re_irc> <@n​ihal.pasham:m​atrix.org> example: `pyocd flash -t nrf52840 --base-address {address} image.bin`
<re_irc> <@y​atekii:m​atrix.org> nihal.pasham: i think that is not yet supported. probe-rs itself can do it.
<re_irc> <@b​urrbull:m​atrix.org> https://matrix.to/#/#probe-rs:matrix.org
<re_irc> <@n​ihal.pasham:m​atrix.org> yatekii: ok so we can do that with probe-rs the library (not probe-run), keep getting confused.
<re_irc> <@y​atekii:m​atrix.org> some folks wanted to add it to cargo flash and some were against it
<re_irc> <@y​atekii:m​atrix.org> we should def. add it to the cli tho
<re_irc> <@n​ihal.pasham:m​atrix.org> yep, it would be quite helpful for at least recurring workflow (if you're in security). Signed images binaries and flashing them at pre-determined mem offsets for easy and automatable testing.
<re_irc> <@a​damgreig:m​atrix.org> nihal.pasham: It's also possible to just stick the .bin into a .elf with the address you want and then flash the .elf, which can be done with cargo-flash today
<re_irc> <@n​ihal.pasham:m​atrix.org> the .bin was originally extracted from an elf for signing. So, rather than reassemble it back to elf, I decided to just flash them as-is (as I have 3 of them to be flashed into non-contiguous memory offsets)
<re_irc> <@r​yan-summers:m​atrix.org> For any embedded-time aficionados out there, [std-embedded-time](https://docs.rs/std-embedded-time/0.1.0/std_embedded_time/) is now up for any host-side testing needs :)
<re_irc> <@y​atekii:m​atrix.org> silly question: does this
<re_irc> <@y​atekii:m​atrix.org> [target.'cfg(target_arch = "x86_64")'.dependencies]
<re_irc> <@y​atekii:m​atrix.org> also include the crates below for arm?
<re_irc> <@y​atekii:m​atrix.org> I feel like I miss something obvious
<re_irc> <@y​atekii:m​atrix.org> ohhh is this the cargo feature resolver again
<re_irc> <@y​atekii:m​atrix.org> hmm
<re_irc> <@y​atekii:m​atrix.org> (embedded-graphics-simulator = "0.3.0") pulls in std features
<re_irc> <@d​irbaio:m​atrix.org> always the resolver 🤣
<re_irc> <@y​atekii:m​atrix.org> the feature resolver is so annying for real
<re_irc> <@y​atekii:m​atrix.org> but I thought they fixed it
<re_irc> <@y​atekii:m​atrix.org> so maybe I just need to update :D
<re_irc> <@d​irbaio:m​atrix.org> you have resolver=2 in your cargo.toml?
<re_irc> <@y​atekii:m​atrix.org> ohhh
<re_irc> <@y​atekii:m​atrix.org> hmm where exactly do I put that
<re_irc> <@y​atekii:m​atrix.org> invalid type: integer `2`, expected a string for key `package.resolver`
<re_irc> <@d​irbaio:m​atrix.org> resolver="2"
<re_irc> <@d​irbaio:m​atrix.org> because numbers are strings, *obviously*
<re_irc> <@y​atekii:m​atrix.org> ah sorry, I forgot we are coding JS here
<re_irc> <@y​atekii:m​atrix.org> ok it *seems* to be working now. lets wait until it finished building :D
<re_irc> <@d​irbaio:m​atrix.org> resolver'2 will be the default in rust 2021... I can't wait
<re_irc> <@y​atekii:m​atrix.org> ok it's building now :)
<re_irc> <@y​atekii:m​atrix.org> awesome!
<re_irc> <@y​atekii:m​atrix.org> thanks
<re_irc> <@y​atekii:m​atrix.org> if I can fix rust-analyzer to show errors again I am happy ... it stopped like randomly 2 weeks ago lol ... I can use autocomplete and typeannotations and follow types etc, but no red lines lol
<re_irc> <@y​atekii:m​atrix.org> but hey, I am so happy with everything :) getting to run the display in the simulator? 5 minutes. and I am sure once it is wired up it just works
<re_irc> <@y​atekii:m​atrix.org> folks are doing such an amazing job :)
<re_irc> <@h​tms:m​atrix.org> Noob question: Hi, I'm preparing to dive into embedded Rust and now looking at ecosystem. Does probe-rs work seamlessly with JetBrains IDEs (PyCharm Pro available) or I should just follow tutorials and use VSCode?
<re_irc> <@y​atekii:m​atrix.org> htms: probe-rs has only a alpha-stage vscode plugin for debugging. most folks use commandline utilities.
<re_irc> <@y​atekii:m​atrix.org> a plugin for jetbrains was impossible last time I checked (1year ago; so might have changed)
<re_irc> <@k​orken89:m​atrix.org> With that said, using `cargo-embed` or `probe-run` with VSCode and their RTT based logging/printing utilities makes it really easy to work though
<re_irc> <@k​orken89:m​atrix.org> Since I started Rust embedded I've almost never went back to a "GDB like" debugger
<re_irc> <@k​orken89:m​atrix.org> I think it's really easy to use VSCode or Vim with Rust embedded :)
<re_irc> <@y​atekii:m​atrix.org> on a similar note: jack has been working eagerly on full RTT integratiuon with defmt and all in vscode-debugging :)
<re_irc> <@y​atekii:m​atrix.org> will try this weekend I guess
<re_irc> <@b​urrbull:m​atrix.org> need update rust embedded book with tutorial of starting with probe-run/cargo-embed & vscode. Also need good modern project templates
troth has quit [Quit: Leaving.]
<re_irc> <@r​icharddodd:m​atrix.org> burrbull: PRs welcome I think :)
fabic has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
<re_irc> <@f​irefrommoonlight:m​atrix.org> PyCharm with the Rust Plugin is fantastic
<re_irc> <@f​irefrommoonlight:m​atrix.org> It should work in a similar way with Clion etc
<re_irc> <@f​irefrommoonlight:m​atrix.org> VSCode is OK for editing single files, but for mult-file pojects, the JetBrains Rust plugin has a much deeper refactoring / error catching / introspection
<re_irc> <@f​irefrommoonlight:m​atrix.org> *Misread the question. No probe-rs interaction
<re_irc> <@d​irbaio:m​atrix.org> wut? vscode is great even for huge projects :P
<re_irc> <@d​irbaio:m​atrix.org> and rust-analyzer can also do very fancy refactors
<re_irc> <@f​irefrommoonlight:m​atrix.org> How do you switch between files?
<re_irc> <@d​irbaio:m​atrix.org> you open an entire directory, you get a tree at the left
<re_irc> <@f​irefrommoonlight:m​atrix.org> I'm legit curious - I hear so much about VsCode, but I can't get it to work in the way I'd expect, adn am legit not sure what's going on
<re_irc> <@y​atekii:m​atrix.org> firefrommoonlight: click on tab or ctrl + P
<re_irc> <@f​irefrommoonlight:m​atrix.org> Oh that workws
<re_irc> <@d​irbaio:m​atrix.org> lol
<re_irc> <@n​ewam:m​atrix.org> vim also works pretty well with rust analyzer
<re_irc> <@f​irefrommoonlight:m​atrix.org> How do I go to the definition of a function or variable?
<re_irc> <@f​irefrommoonlight:m​atrix.org> I read it's F12, but that's not working, and the context menu is sparse
<re_irc> <@y​atekii:m​atrix.org> firefrommoonlight: F12
<re_irc> <@f​irefrommoonlight:m​atrix.org> Not doing anything
<re_irc> <@y​atekii:m​atrix.org> do you have rust-analyzer installed?
<re_irc> <@f​irefrommoonlight:m​atrix.org> Nope - that's probably it
<re_irc> <@y​atekii:m​atrix.org> yes
<re_irc> <@y​atekii:m​atrix.org> and it does not work in 100% of the cases as ofc sometimes it has troubles resolving everythign but that's the case with CLion too
<re_irc> <@f​irefrommoonlight:m​atrix.org> Oh sweet it's working now. I'll experiment more. This is definitely a nice addition for one-off files
<re_irc> <@f​irefrommoonlight:m​atrix.org> And makes it viable for projects
zBeeble42 has quit [Remote host closed the connection]
zBeeble has joined #rust-embedded
fabic has quit [Ping timeout: 248 seconds]
<re_irc> <@n​ewam:m​atrix.org> Anyone know of an STM32 HAL that has an RCC interface that support low-power shenanigans?
<re_irc> <@n​ewam:m​atrix.org> I am trying to think of a good way to design an interface for the STM32WL clocks where the user will need to setup the clocks many times.
<re_irc> <@n​ewam:m​atrix.org> (some) low power modes disable clocks on entry, and (some) low power modes have a different wakeup clock.
<re_irc> <@f​irefrommoonlight:m​atrix.org> Yea
<re_irc> <@f​irefrommoonlight:m​atrix.org> the one I built/use
<re_irc> <@f​irefrommoonlight:m​atrix.org> Has some helper functions for re-setting up the PLL etc after stop or stby
<re_irc> <@f​irefrommoonlight:m​atrix.org> Note that you'll still need some things in user code. Eg to make sure the PLL kicks back on at the right time if an ISR triggers
<re_irc> <@f​irefrommoonlight:m​atrix.org> https://github.com/David-OConnor/stm32-hal/blob/main/src/low_power.rs
<re_irc> <@f​irefrommoonlight:m​atrix.org> WL support is WIP
<re_irc> <@f​irefrommoonlight:m​atrix.org> The stopwuk setting is in the clocks module
<re_irc> <@f​irefrommoonlight:m​atrix.org> Re selecting the post-eakeup default clock
<re_irc> <@f​irefrommoonlight:m​atrix.org> Bottom line: stop and standby revert the clock to HSI or MSI depending on variant, and that setting
<re_irc> <@f​irefrommoonlight:m​atrix.org> If that's not your main operating clock, you need to make sure the right clock is setup in the ISR that wakes it
<re_irc> <@f​irefrommoonlight:m​atrix.org> See the reselect_input function in the Clocks module
<re_irc> <@f​irefrommoonlight:m​atrix.org> Also has a simple method that checks if the PLL is enabled
<re_irc> <@f​irefrommoonlight:m​atrix.org> Are there any other consideration?
<re_irc> <@n​ewam:m​atrix.org> firefrommoonlight: I'm still reading; at first glance the only one I see is that some STM chips require firmware to turn off clocks before entering lprun (HSE32 needs to be off before entering lprun in the case of the STM32WL).
tokomak has quit [Ping timeout: 240 seconds]
GenTooMan has quit [Ping timeout: 240 seconds]
GenTooMan has joined #rust-embedded
GenTooMan has quit [Excess Flood]
GenTooMan has joined #rust-embedded
GenTooMan has quit [Ping timeout: 258 seconds]
GenTooMan has joined #rust-embedded
GenTooMan has quit [Ping timeout: 250 seconds]
darknighte has joined #rust-embedded
crabbedhaloablut has quit [Ping timeout: 244 seconds]
crabbedhaloablut has joined #rust-embedded
<re_irc> <@f​irefrommoonlight:m​atrix.org> Some considerations:
<re_irc> <@f​irefrommoonlight:m​atrix.org> - Sleep mode is straightforward
<re_irc> <@f​irefrommoonlight:m​atrix.org> - StopN modes if using HSI or MSI, require you set StockWuk correctly, and are otherwise straightforward. StopN and standby modes with PLL require re-selecting, enabling, and waiting-for PPL, as well as potentially re-enabling oscillators.
<re_irc> <@f​irefrommoonlight:m​atrix.org> - LP run has special considerations, but generally requires lowering the clock speed before entering, and resetting what you want after exit
<re_irc> <@f​irefrommoonlight:m​atrix.org> -H7 is quite differen't and I don't understand it
<re_irc> <@f​irefrommoonlight:m​atrix.org> In my own code, in ISRs that could wake from a low-power mode, I first check if the PLL is running. If not, (Ie another ISR hasn't already woken), I run the PLL and oscillator re-setup code
<re_irc> <@f​irefrommoonlight:m​atrix.org> STMs designed for low-power use often have an MSI, which makes it easy to change speed dynamically
<re_irc> <@f​irefrommoonlight:m​atrix.org> and without an external oscillator
GenTooMan has joined #rust-embedded