ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
<re_irc> <@frroossst:matrix.org> If I wanted to contribute to the embedded-wg, anyone has any idea where I can start? I'm still in my second year of undergrad. Any tips on getting started? Anyone out there willing to guide me? Thanks!
<re_irc> <@dngrs:matrix.org> do you have a specific contribution in mind?
<re_irc> <@dngrs:matrix.org> Adhyan H: do you have a specific contribution in mind?
<re_irc> <@frroossst:matrix.org> umm... not really, I'm still a beginner so I can't imagine contributing to some complex project. I'm fairly familiar with how interpreters and compilers work, as that is what I do for work. I would love to work on something that reduces the barrier to entry for embedded Rust, so it can be as easy as C/C++
<re_irc> <@frroossst:matrix.org> : umm... not really, I'm still a beginner so I can't imagine contributing to some complex project. I'm fairly familiar with how interpreters and compilers work, as that is what I do for work. I would love to work on something that reduces the barrier to entry for embedded Rust, so it can be as easy as C/C++
<re_irc> <@gordonforas:matrix.org> “Would you like to discover how to profit from the cryptocurrency market if YES I’m willing to help 11 people how to earn $100,000 in just 72hours Dm me to know HOW on TG.
thomas25 has left #rust-embedded [Textual IRC Client: www.textualapp.com]
<re_irc> <@juliand:fehler-in-der-matrix.de> Adhyan H: How is entering embedded software with C/C++ easy? (Or at least easier than with Rust). My experience is quite the opposite actually...
<re_irc> <@9names:matrix.org> Adhyan H: it's a bit cliche but the best place to help as a beginner is to work through the existing docs, making notes of what is easy, what is hard, what seems out of place and what is just obviously broken, and making issues or PRs with this info.
<re_irc> The more you learn, the less you understand what a beginner sees, so these insights are very valuable and greatly appreciated.
<re_irc> <@pixelhamster:matrix.org> Are there easy ways to measure performance of an embedded device ? Or do you need specialized hardware for this. I only have easy access to a nrf52840 and probe and have never done performance, latency or power testing before
<re_irc> <@juliand:fehler-in-der-matrix.de> Could you clarify what you mean by performance? Something like "data samples processed per second" or meeting some protocol/realtime constraints etc.
<re_irc> I guess the equipment/tools you need depend very much on what (and how accurate) you want to measure this "performance".
<re_irc> <@pixelhamster:matrix.org> ye good point, performance is actually not something I need to test as I'm not doing expensive computations. I meant the latency between a button press and the device handling that button event. sorry for that
<re_irc> <@frroossst:matrix.org> : I'd love to hear about your experience with Rust, Well, you obviously have the Arduino IDE which mostly provides what you need, then you have platformIO with minimal setup. I'm playing around rn with a stm32f103 nucleo dev board, and flashing it with Rust has been a nightmare, with openocd and gdb, as compared to a simple all-in-one command. Embedded stuff is by its nature harder but, there are so simply lots many...
<re_irc> ... resources for C/C++, I ran into this problem with gdb where it wouldn't fund rust-src files and after a lot of googling, couldn't come across anything useful.
<re_irc> <@k900:0upti.me> Are you familiar with probe-rs?
<re_irc> <@k900:0upti.me> https://probe.rs/
<re_irc> <@k900:0upti.me> With this you can just "cargo flash"
<re_irc> <@k900:0upti.me> And it'll figure everything out
<re_irc> <@diondokter:matrix.org> Also look at "probe-run"
<re_irc> <@frroossst:matrix.org> I was using "cargo-flash" will check out "probe-rs"
<re_irc> <@k900:0upti.me> Or "cargo embed", if you want to run it under a debugger
<re_irc> <@frroossst:matrix.org> and if not "cargo-flash" then just good 'ol openocd and gdb
<re_irc> <@k900:0upti.me> "cargo-flash" is part of probe-rs
<re_irc> <@k900:0upti.me> But you didn't mention it at all
<re_irc> <@k900:0upti.me> Did it not work for you?
<re_irc> <@frroossst:matrix.org> it unfortunately didn't work :(
<re_irc> <@k900:0upti.me> That was actually an important detail
<re_irc> <@k900:0upti.me> And very likely a bug
<re_irc> <@frroossst:matrix.org> I couldn't figure out the problem as it didn't throw an explicit error
<re_irc> <@k900:0upti.me> Can you reproduce the issue?
<re_irc> <@frroossst:matrix.org> I asked some of my other teammates to try it out and they'll get back to me, but it atleast doesn't work for me, I'll be back with more details
<re_irc> <@juliand:fehler-in-der-matrix.de> Adhyan H: Actually I was also going to mention probe-rs and all the tooling around it. It's much easier than setting up the toolchain with C/C++. Provided you don't encounter a bug, I guess.
<re_irc> Yes there is Arduino, but that's a different story imo.
<re_irc> <@firefrommoonlight:matrix.org> Concur; The knurling tools and probe -rs make getting started easier than C toolchains
<re_irc> <@gorazdko:matrix.org> I would like to compile my program optimized for the smallest size. My configuration (shown below) does the job, except when I play with the "strip" flag I get an error. Does anyone know how to fix this error or if its worth pursuing to compile the code with this flag (in terms of flash size savings)? I'm using nrf52832 with embassy.
<re_irc> [profile.release-production] # cargo build --profile release-production
<re_irc> debug = 0
<re_irc> # Possible string values of strip are "none", "debuginfo", and "symbols". The default is "none". true == 'symbols'
<re_irc> opt-level = "z"
<re_irc> inherits = "release"
<re_irc> strip = 'debuginfo'
<re_irc> lto = true
<re_irc> panic = "abort"
<re_irc> "$ DEFMT_LOG=off cargo run --profile release-production"
<re_irc> (HOST) WARN insufficient DWARF info; compile your program with `debug = 2` to enable location info
<re_irc> Error: `.debug_frame` section not found
<re_irc> If i set strip to "strip = 'symbols'" the error is:
<re_irc> "Error: ".defmt" section found, but no version symbol - check your linker configuration"
<re_irc> <@dirbaio:matrix.org> use debug=2, don't use strip
<re_irc> <@dirbaio:matrix.org> these make the ".elf" file bigger, but the elf file size is NOT what determines flash usage
<re_irc> <@dirbaio:matrix.org> only the actual code is flashed to the MCU
<re_irc> <@dirbaio:matrix.org> not the debug info
<re_irc> <@dirbaio:matrix.org> you can see the actual size with "cargo size"
<re_irc> <@dirbaio:matrix.org> it is "text + data"
<re_irc> <@dirbaio:matrix.org> you'll see "debug" and "strip" have no effect on that
<re_irc> <@gorazdko:matrix.org> Ok got it. Ill play around. Thank you!
emerent has quit [Ping timeout: 260 seconds]
emerent has joined #rust-embedded
<re_irc> <@mameluc:matrix.org> cargo bloat is pretty useful too
IlPalazzo-ojiisa has joined #rust-embedded
<re_irc> <@fredrikll:matrix.org> In the embedded rust book it talks about using c with rust (https://docs.rust-embedded.org/book/interoperability/c-with-rust.html) and mentions:
<re_irc> “If the library you would like to use is already distributed as a static archive, it is not necessary to rebuild your code. Just convert the provided interface header file as described above, and include the static archive at compile/link time.”
<re_irc> As far as I can tell there’s no example on how to do that. I think it would be natural to include an example on how to do it there, or link to the relevant section of the book if it is explained elsewhere. Is it something that would be simple enough to illustrate with a short snippet or is it too involved?
lehmrob has joined #rust-embedded
<re_irc> <@diondokter:matrix.org> : Take a look at this project: https://github.com/nrf-rs/nrfxlib-sys
<re_irc> It's pretty much what you describe
lehmrob has quit [Remote host closed the connection]
cr1901 has quit [Quit: Leaving]
cr1901 has joined #rust-embedded
vulfe has joined #rust-embedded
vulfe has quit [Remote host closed the connection]
vulfe has joined #rust-embedded
vulfe has quit [Ping timeout: 240 seconds]
vulfe has joined #rust-embedded
vulfe has quit [Ping timeout: 276 seconds]
vulfe has joined #rust-embedded