<re_irc>
<@barafael:matrix.org> i'm adapting the f411 rtic examples for f411 black pill for my personal use. (How) can I view the defmt output, using stlinkv2?
<re_irc>
<@dngrs:matrix.org> it should "just work" with the app template; if you're not seeing anything you probably need to adjust the log level
<re_irc>
<@dngrs:matrix.org> (that's for current `defmt`, it used to specify log configuration in `Cargo.toml` but not anymore)
<re_irc>
<@barafael:matrix.org> dngrs (spookyvisiongithub): ... that was it. Thanks!
<re_irc>
<@dngrs:matrix.org> whoop whoop :)
<re_irc>
<@dngrs:matrix.org> silly question time: the stack sizes reported by https://crates.io/crates/stack-sizes ... are they in bytes, kbytes, feet+inches, cups, ...?
<re_irc>
<@dngrs:matrix.org> I'm *assuming* KiB but haven't seen it explicitly anywhere
<re_irc>
<@xiretza:xiretza.xyz> almost definitely bytes
<re_irc>
<@dngrs:matrix.org> wow, ok
<re_irc>
<@dngrs:matrix.org> kudos to the optimizer then
<re_irc>
<@xiretza:xiretza.xyz> having a stack frame a KiB would be quite remarkable
<re_irc>
<@xiretza:xiretza.xyz> well, less so on hosted environments I guess, I'm in an embedded mindset ;)
<re_irc>
<@dngrs:matrix.org> just goes to show I've been doing too many years of exclusively high level stuff in my life
<re_irc>
<@dkhayes117:matrix.org> dngrs:matrix.org: I was leaning towards metric tons...but bytes does sound more logical 😂
<re_irc>
<@jamesmunns:beeper.com> xiretza:xiretza.xyz: With Serde, anything is possible!
<re_irc>
<@dkhayes117:matrix.org> It probably wouldn't hurt to submit a PR to add the stack size unit in the docs. I couldn't find it in there either
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #rust-embedded
<re_irc>
<@dngrs:matrix.org> I mean, "assume bytes unless stated otherwise" isn't a terrible mindset either
<re_irc>
<@dngrs:matrix.org> I was just confused how low the numbers were
<re_irc>
<@dngrs:matrix.org> I think it's the default unit for binutils
cr1901_ has joined #rust-embedded
cr1901 has quit [Ping timeout: 240 seconds]
cr1901_ is now known as cr1901
smach has joined #rust-embedded
smach has quit [Quit: Leaving]
<re_irc>
<@lkostka:matrix.org> Hi.
<re_irc>
<@lkostka:matrix.org> Rust has a conditional compilation with `cfg` and `cfg_attr`. I know how to use it with lines of code. My question is, how to conditionally compile whole file / module. Consider a use case where you want to target your firmware for 10 boards (each can have different MCUs). Boards have different pinouts, peripheral chips etc. How do you approach this problem ?
<re_irc>
<@dirbaio:matrix.org> you can put cfg's in `mod` declarations too
<re_irc>
<@dirbaio:matrix.org> so the file pointed by the `mod` is included or not
<re_irc>
<@dirbaio:matrix.org> you can also use `cfg_attr` with `path` too, I do it exactly for the "multiple boards" use case :)
<re_irc>
<@lkostka:matrix.org> Thx. Out of curiosity. Do you have some project with those use cases e.g. on github ?
<re_irc>
<@dirbaio:matrix.org> not me, perhaps someone else has
<re_irc>
<@lkostka:matrix.org> no problemo. with examples you've given, it turns out I know so little about rust :D
<re_irc>
<@lkostka:matrix.org> My goal is to write firmware for 3d printers (maybe CNC machines in future). It will be just an executor. Accept commands and execute them. Spin motor X 233 steps etc. Whole brains of operation will be on a Rpi / PC. Validate GCODE before executing and other stuff. It's no fun when printer wants to execute 3 hours in a print a command that will crash the carriage.
crabbedhaloablut has quit [Remote host closed the connection]