<braincode[m]>
<JamesMunns[m]> I do think we are in need of "someone writes a blog post that clearly explains where cargo/workspaces/rust-analyzer fail for embedded projects", particularly:...
<braincode[m]>
* How to transparently "cargo test" on the host (emulated) vs on-device (HIL?)
kaoD9 has joined #rust-embedded
vanner has quit [Ping timeout: 252 seconds]
kaoD has quit [Ping timeout: 252 seconds]
kaoD9 is now known as kaoD
vanner has joined #rust-embedded
ouilemur has quit [Ping timeout: 244 seconds]
ouilemur has joined #rust-embedded
Ralith has joined #rust-embedded
<Ralith>
can anyone recommend a good oscilloscope? I'm interested in doing audio-rate analog stuff and maybe some logic analysis; absolutely no idea where to begin looking, but good software support would be nice
leftger[m] has joined #rust-embedded
<leftger[m]>
Ralith: depends on your budget TBH. Some years back Saleaes were pretty affordable. Now it's just pricey. A decent beginner setup would be a $10 PSOC-based Sigrok-compatible logic analyzer from eBay. On the oscilloscope side of things I've heard not-too-bad things from the $50 offerings on eBay. Something more decent would be springing for a Rigol DHO800 osciloscope.
<Ralith>
they're not typically the same device? can you be a little more specific than "$50 on ebay"?
<Ralith>
re: Rigol, I'm a little surprised to see a self-contained device rather than a little black box with a USB port and some accompanying software
<leftger[m]>
Ralith: Sorry I was off by a bit: It's about $75 some something sampling at ~20MHz but you get a multimeter and a basic signal generator.
<leftger[m]>
Ralith: Depends on what you want. Once you have buttons and a screen you'll get much better feedback on whatever you're trying to do. The "little black box" approach is handy if you want to save a bit of money. It all depends on what you want. As for not being the same device they definitely can be. I just got a DHO900 for at least double the price, but it doesn't come with the logic probes. That's another $400.
<Ralith>
interesting, thanks. My immediate goal is doing frequency response analysis on some purely analog audio circuits but it'd be nice to cover future projects.
<Ralith>
leftger[m]: circuit's already simulated and built, the problem is determining if the actual behavior matches the sim, especially in a potentially noisy environment
glitchy has quit [Remote host closed the connection]
glitchy has joined #rust-embedded
ska has quit [Ping timeout: 248 seconds]
Ekho has quit [Server closed connection]
Ekho has joined #rust-embedded
WSalmon has quit [Quit: No Ping reply in 180 seconds.]
WSalmon has joined #rust-embedded
thejpster[m] has joined #rust-embedded
<thejpster[m]>
Having back off holiday today. Going to get some Rust stuff done before I head back to work next week.
<thejpster[m]>
If you sent me a DM request recently, I’m getting a 502 trying to join the room.
wassasin[m] has joined #rust-embedded
<wassasin[m]>
<Ralith> can anyone recommend a good oscilloscope? I'm interested in doing audio-rate analog stuff and maybe some logic analysis; absolutely no idea where to begin looking, but good software support would be nice
<wassasin[m]>
If you want to use your scope as a logic analyzer without using the on-board software, I recommend getting something for which extracting the data to a hostmachine is do-able
<wassasin[m]>
I got a Siglent scope in 2023 but last I checked getting the data out over ethernet was not implemented as far as I could find. I see it now listed for ngscopeclient so I should check it out again
<wassasin[m]>
Using a Saleae a lot, but writing parsers for new protocols is not fun
<wassasin[m]>
* Using a Saleae a lot, but writing parsers for the Saleae GUI is not fun
glitchy has quit [Remote host closed the connection]
glitchy has joined #rust-embedded
rainingmessages has quit [Quit: bye]
rainingmessages has joined #rust-embedded
Koen[m] has joined #rust-embedded
<Koen[m]>
<Ralith> can anyone recommend a good oscilloscope? I'm interested in doing audio-rate analog stuff and maybe some logic analysis; absolutely no idea where to begin looking, but good software support would be nice
<Koen[m]>
I'm using an 'upgraded' Siglent sds 1104x-e. Sufficient as oscilloscope and simple logic analysis for most things. Uses scpi over usb and ethernet for interfacing. I think I've used it with Pulseview (sigrok) before, most of the time I use the display on the device.
<Koen[m]>
It also has some cursed webinterface which seems to be a VNC session into the device display…
<wassasin[m]>
<Koen[m]> It also has some cursed webinterface which seems to be a VNC session into the device display…
<wassasin[m]>
It also has a remote desktop server running
<wassasin[m]>
I have the Siglent SDS2104X+ but the SCPI over ethernet driver was not working/written
<Koen[m]>
I think I've used it with pulseview, but that's at least 2 years ago
<wassasin[m]>
I'll check again sometime
<Lumpio->
I want somebody to make a hybrid scope that has an actually good PC interface, but also some twiddly knobs
<Lumpio->
It's so much easier to adjust settings if you have like 3 knobs than having to clicky the mouse all the time
LeandroMarceddu[ has joined #rust-embedded
<LeandroMarceddu[>
<leftger[m]> depends on your budget TBH. Some years back Saleaes were pretty affordable. Now it's just pricey. A decent beginner setup would be a $10 PSOC-based Sigrok-compatible logic analyzer from eBay. On the oscilloscope side of things I've heard not-too-bad things from the $50 offerings on eBay. Something...
<LeandroMarceddu[>
Can confirm. I bought a Rigol DHO924 with the PLA addon and I've been loving it so far. /cc Ralith
<Lumpio->
Yeah the cheapo PC logic analyzers are totally enough for a lot of things
<Lumpio->
For just digital logic I don't really need any knobs or displays because there isn't that much to adjust and all the analysis happens on the PC anyways
<Lumpio->
So a cheapo box with USB on one side and a bunch of pins on another is perfectly good for me
mkj[m] has joined #rust-embedded
<mkj[m]>
I get annoyed by the fan whine of the DHO924S. maybe alternatives are better?
<leftger[m]>
mkj[m]: Have you tried sticking a Noctua fan in there? 😂
<mkj[m]>
(or I could open it up and put a bigger fan on the outside)
ska has joined #rust-embedded
<LeandroMarceddu[>
<mkj[m]> I get annoyed by the fan whine of the DHO924S. maybe alternatives are better?
<LeandroMarceddu[>
This is also true. Luckily I'm less annoyed by it
Mihael[m] has quit [Quit: Idle timeout reached: 172800s]
ouilemur has quit [Ping timeout: 248 seconds]
ouilemur has joined #rust-embedded
<dngrs[m]>
I actually drilled a hole in the bottom of my 3d printer and mounted a ryzen fan to replace the tiny stock jet turbine disasters
<dngrs[m]>
in terms of affordable scopes/logic analyzers: Hantek makes USB devices that can do both, and the OpenHantek software is ... okay
<dngrs[m]>
on the other hand you can build a [monstrously powerful logic analyzer](https://www.youtube.com/watch?v=NaSM0-yAvQs) based on the pico 2, if you wanna maximize bang for the buck
<dngrs[m]>
<leftger[m]> Sorry I was off by a bit: It's about $75 some something sampling at ~20MHz but you get a multimeter and a basic signal generator....
<dngrs[m]>
pretty damn sure this is dropshipped off of aliexpress, where you can find it listed for cheaper (as DSO-TC4)
ouilemur has quit [Ping timeout: 255 seconds]
ouilemur has joined #rust-embedded
ouilemur has quit [Ping timeout: 260 seconds]
ouilemur has joined #rust-embedded
RobWells[m] has joined #rust-embedded
<RobWells[m]>
<dngrs[m]> on the other hand you can build a [monstrously powerful logic analyzer](https://www.youtube.com/watch?v=NaSM0-yAvQs) based on the pico 2, if you wanna maximize bang for the buck
<RobWells[m]>
I got some of these recently, $52.53 delivered to the UK (for 5 boards). It's the first time I'd used a logic analyzer but they've been easy to work with.
<RobWells[m]>
Assembled, I should say, except for the Pico.
starblue has joined #rust-embedded
nadja has quit [Server closed connection]
nadja has joined #rust-embedded
Mihael[m] has joined #rust-embedded
<Mihael[m]>
<JamesMunns[m]> if you don't mind running some code, you can always use `core::mem::size_of::<MatterMessageHeader>()` and print it at runtime
<Mihael[m]>
Do you know if i can get the size of the function this way without passing actual arguments into it?
dirbaio[m] has joined #rust-embedded
<dirbaio[m]>
what do you mean with "passing actual argumetns"?
jason-kairos[m] has joined #rust-embedded
<jason-kairos[m]>
isn't that just going to give the size of a function pointer?
<jason-kairos[m]>
better off manually looking at the map file output if you don't need it at runtime
ouilemur has quit [Ping timeout: 255 seconds]
ouilemur has joined #rust-embedded
sroemer has quit [Quit: WeeChat 4.5.2]
jfsimon has quit [Remote host closed the connection]
jfsimon has joined #rust-embedded
<RobinMueller[m]>
<barafael[m]> James Munns: here I reduced the case to an absolute minimum:...
<RobinMueller[m]>
barafael: James Munns probably probably can help more here.. Concerning the change: the PR made some error handling consistent. Hopefully, only minor adjustments are necessary for this to work again?
<RobinMueller[m]>
* barafael: James Munnsprobably can help more here.. Concerning the change: the PR made some error handling more consistent. Hopefully, only minor adjustments are necessary for this to work again?
glitchy has quit [Remote host closed the connection]
glitchy has joined #rust-embedded
jfsimon has quit [Remote host closed the connection]
jfsimon has joined #rust-embedded
<RobinMueller[m]>
were there some major changes to the --manifest-path argument handling with Cargo? I updated my Rust version, and now have an issue which might be related to cargo not using the .cargo/config.toml inside the folder of the manifest path..
Wehnelt[m] has quit [Quit: Idle timeout reached: 172800s]
<RobinMueller[m]>
* were there some major changes to the --manifest-path argument handling with cargo build? I updated my Rust version, and now have an issue which might be related to cargo not using the .cargo/config.toml inside the folder of the manifest path..
<thejpster[m]>
From what version to what version?
<dirbaio[m]>
.cargo/config.toml lookup has always been relative to the CWD, never to the manifest path
<dirbaio[m]>
I think
<RobinMueller[m]>
hmm, then why did the CI break (or ever work) 🤔 I'll try to re-produce it, still got some older rust versions lying around
<RobinMueller[m]>
ah that is interesting, it works with 1.88.0, and stops working with 1.89.0.
<RobWells[m]>
This isn't another case of the elf2uf2-rs problem is it? 🫣 ("unrecognized ABI")
<RobWells[m]>
(ELF header change on nightly a couple of months ago, just got released in 1.89)
<RobinMueller[m]>
<dirbaio[m]> .cargo/config.toml lookup has always been relative to the CWD, never to the manifest path
<RobinMueller[m]>
I solved the CI issue in any case, by simply `cd`ing into the test folder. I tried to find some documentation, but did not find anything special about the configuration lookup in combination with `--manifest-path`. Also checked https://doc.rust-lang.org/nightly/cargo/CHANGELOG.html#cargo-188-2025-06-26, there was one fix related to --manifest-path..
<RobinMueller[m]>
s/188/189/, s/06/08/, s/26/07/
<RobinMueller[m]>
* I solved the CI issue in any case, by simply cding into the test folder. I tried to find some documentation, but did not find anything special about the configuration lookup in combination with --manifest-path. Also checked https://doc.rust-lang.org/nightly/cargo/CHANGELOG.html#cargo-189-2025-08-07, there was one fix related to --manifest-path, but that should not be related
<barafael[m]>
when I do that, it works indeed! Thanks, first of all. I wonder if I should have been checking that earlier on?
<thejpster[m]>
<RobinMueller[m]> I solved the CI issue in any case, by simply `cd`ing into the test folder. I tried to find some documentation, but did not find anything special about the configuration lookup in combination with `--manifest-path`. Also checked https://doc.rust-lang.org/nightly/cargo/CHANGELOG.html#cargo-188-2025-06...
<thejpster[m]>
in both cases, being in testbin picks up testbin/.cargo/config.toml and being outside testbin and using --manifest-path testbin/Cargo.toml does not pick up the inner .cargo/config.toml file - only the outer one.
<thejpster[m]>
and as someone on a team marked as target maintainer, I feel like I should have found out about this change to a target I maintain before it actually got released.
<RobWells[m]>
It seems to be tripping a few people up now that it's in stable, seems to have been introduced in nightly around June-ish (see [this elf2uf2-rs](https://github.com/JoNil/elf2uf2-rs/issues/40)). But what's really confused me is that I don't know that this is a change in Rust. I can't find anything in the ELF generation in the compiler that would have caused this (I was literally just writing a question about it on the internals
<RobWells[m]>
Out of interest, does this have a practical meaning for embedded targets? (Beyond failing the check in elf2uf2-rs.)
<thejpster[m]>
only for people who inspect the ELF headers.
<thejpster[m]>
I suspect probe-rs does not (at least, not the extent of verifying the ABI of the application it is flashing)
<dirbaio[m]>
No meaning at all for embedded, this is just elf2uf2-rs being overly strict. Like "this is the exact abi rustc outputs today, let's just hardcode a check for that"
<dirbaio[m]>
No other tool I've seen is so strict
<dirbaio[m]>
Probe-rs, pyocd, openocd, picotool are unaffected
<dirbaio[m]>
So... 🤷
<RobWells[m]>
In terms of guiding people away from elf2uf2-rs, is it just users of RP chips where it's really in use?
<dirbaio[m]>
Yep
<RobWells[m]>
(I'm just thinking in terms of updating docs for HALs etc)
<RobWells[m]>
Ok great, I'll see about putting in a PR for rp-rs in the morning.
<thejpster[m]>
UF2 is a standard format, but I don't know of any other UF2 enabled bootloaders, ROM or otherwise.
<thejpster[m]>
(it's also a terrible format, packing 256 bytes of useful data into each 512 byte block)
<dirbaio[m]>
There's some nrf boards that come with uf2 bootloader but elf2uf2-rs would explode anyway on those because it also hardcodes the flash address range of the rp2040
<thejpster[m]>
s/terrible/genius depending on your point of view. It believe it's designed to be agnostic as to the order the blocks are written to a virtual disk drive.
<thejpster[m]>
I generally use the official picotool for loading code onto the RP2xxx chips, and happy to recommend likewise now there are prebuilt binaries available (https://github.com/raspberrypi/pico-sdk-tools/releases)
<dirbaio[m]>
Plus it's only on rp that people insist on developing without a debug probe 😂
<thejpster[m]>
(over USB, specifically, obviously you'd use probe-rs over SWD)
<thejpster[m]>
oooh, I don't know. ESP and Arduino both love a serial bootloader.
<dirbaio[m]>
So I'd be surprised if anyone is using elf2uf2-rs on non-rp2040
<dirbaio[m]>
thejpster[m]: Arduino is not a serious platform. Yes esp is kind of an exception, newer ones have built-in USB jtag tho
<RobWells[m]>
thejpster[m]: In terms of recommended usage, are particular flags worth including? The PR I have in for Embassy is just `-x -t elf`
<RobWells[m]>
-v for verify and -u for (partial) update are the others I've seen people use, but to be honestly I just use a probe
<thejpster[m]>
> Arduino is not a serious platform
<thejpster[m]>
I know a lot of serious people who would disagree, but I'm not tugging on that thread today
<RobWells[m]>
* -v for verify and -u for (partial) update are the others I've seen people use, but to be honest I just use a probe
<thejpster[m]>
rp235x-hal-examples/README.md says I used picotool load -u -v -x -t elf target/riscv32imac-unknown-none-elf/debug/blinky
<dngrs[m]>
banging ye olde drum again: I wish we had many more drop in replacements for what makes up the arduino ecosystem
jfsimon has quit [Remote host closed the connection]
jfsimon has joined #rust-embedded
jfsimon has quit [Remote host closed the connection]
jfsimon has joined #rust-embedded
LachlanIkeguchi4 has joined #rust-embedded
<LachlanIkeguchi4>
What's so special about the Arduino ecosystem?
<dngrs[m]>
it's pretty integrated. They have a serial monitor, a graph data plotting tool, lots of libraries easily installed via IDE, that kind of stuff. Rust has most of the ingredients but lacks integration/QoL
jfsimon has quit [Remote host closed the connection]