ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to and logged at, code of conduct at
bjc has quit [Ping timeout: 240 seconds]
bjc has joined #rust-embedded
<re_irc> <Alex Norman> has anyone here used rust-fatfs ( with SD? I'm curious to try myself if not but figured I'd check first..
<re_irc> I know that embedded-sdmmc exists but I'm wanting to be able to create directories..
explore has quit [Quit: Connection closed for inactivity]
fabic_ has joined #rust-embedded
starblue has quit [Ping timeout: 272 seconds]
bjc has quit [Ping timeout: 240 seconds]
starblue has joined #rust-embedded
bjc has joined #rust-embedded
<re_irc> <riskable> dirbaio: This gives me errors about Deserialize not being implemented for that specific type
<re_irc> <riskable> ...even though I have "#[derive(Debug, Serialize, Deserialize)]" on everything
GenTooMan has quit [Quit: Leaving]
GenTooMan has joined #rust-embedded
<re_irc> <d3zd3z> Looks like there is no reason for me to actually create my presentation on running Rust code within Zephyr. GPT-3 was able to explain it perfectly: "Zephyr is a real-time operating system (RTOS) designed for use on embedded systems. It is open source and royalty-free.
<re_irc> To run Rust on Zephyr, you need to first install the Zephyr SDK. You can then use the Zephyr toolchain to compile your Rust code for the Zephyr target."
emerent has quit [Ping timeout: 248 seconds]
emerent has joined #rust-embedded
bpye has quit [Ping timeout: 276 seconds]
bpye has joined #rust-embedded
bpye has quit [Ping timeout: 276 seconds]
bpye has joined #rust-embedded
bpye has quit [Ping timeout: 276 seconds]
bpye has joined #rust-embedded
explore has joined #rust-embedded
fabic_ has quit [Ping timeout: 246 seconds]
starblue has quit [Ping timeout: 256 seconds]
starblue has joined #rust-embedded
explore has quit [Quit: Connection closed for inactivity]
fabic_ has joined #rust-embedded
fabic_ has quit [Quit: Leaving]
fabic has joined #rust-embedded
<re_irc> <DrRuhe> Hi everyone, I'm trying to compile a rust project for a beagleboard (target: arm-unknown-linux-gnueabihf) that uses a shared library. I want to create bindings using bindgen, but the user guide does not mention what to do when cross-compiling using cross. Does anybody know where I can find documentation on how to do that?
<re_irc> <Tom> d3zd3z: I'm looking forward to seeing that, you are presenting that in June?
<re_irc> <Alex Norman> DrRuhe: I haven't done this but there is a tool called "cross" that some people use for cross compilation, it looks like people have had some success with linking their own custom lib: so I figure that your situation shouldn't be too different?
<re_irc> Likely some other solutions too..
fabic has quit [Ping timeout: 272 seconds]
<re_irc> <riskable> Sweet: I got my crazy static "" generation working with unlimited numbers _and kinds_ of rotary encoders. So the end user can add in a mixture of analog encoders, digital encoders, encoders connected directly to GPIO pins, encoders connected through multiplexers, etc etc
<re_irc> <riskable> For the directly-attached-to-GPIO pin kind though I need to come up with a way to map pin numbers to actual pin types. I suppose I'll just require a "" in the board-specific directory.
<re_irc> <riskable> Now to give displays and lighting (aka RGB) the same treatment so my firmware can support unlimited numbers of displays and lighting control mechanisms! 😄👍
bpye has quit [Ping timeout: 276 seconds]
bpye has joined #rust-embedded
bpye has quit [Ping timeout: 250 seconds]
bpye has joined #rust-embedded
<re_irc> <dirbaio> has anyone seen/fixed this error before? happens when using "f32" on a non-"hf" target like "thumbv7em-none-eabi"
<re_irc> = note: rust-lld: error: undefined symbol: core::intrinsics::const_eval_select::h4fee5fc21c0763a9
<re_irc> >>> referenced by (/home/dirbaio/.rustup/toolchains/nightly-2022-04-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/
<re_irc> <dirbaio> fixed by.. not using f32, easy :D
<re_irc> <ryankurte> i don't think i've ever managed to use rust-lld with thumb targets 😅
<re_irc> <dirbaio> it's worked fine for me.. linking to some C code even
<re_irc> <ryankurte> amazing! i've got layers of hacks and faked-out newlib stubs to get that sort of working
<re_irc> <dirbaio> O_o
<re_irc> <ryankurte> to be fair it might be -what- i'm linking more than anything else (wasm3)
<re_irc> <dirbaio> oh... yeah 😂
<re_irc> <ryankurte> though libsodium used to be equally awful
<re_irc> <dirbaio> the C I'm linking doesn't even need libc I think
<re_irc> <ryankurte> +to convince to link
<re_irc> <James Munns> dirbaio you seem to have fixed it, but my only guess would have been "link in "libm""
<re_irc> <dirbaio> f32 add/multiply/divide shouldn't require libm :S
<re_irc> <dirbaio> also iirc this worked before
<re_irc> <ryankurte> ahh, bullying things into using the right hard-float was another reason i ended up linking with gcc
<re_irc> <ryankurte> * gcc, but one assumes that shouldn't be required
<re_irc> <dirbaio> i'm building without even though my chip has HF
<re_irc> <dirbaio> because last I checked, building with HF increased code size by +1kb 🤷
<re_irc> <James Munns> > SAFETY: We use internal implementations that either always work or fail at compile time.
<re_irc> <James Munns> lol
<re_irc> <James Munns> That is some of the most cursed code I've read in recent history
<re_irc> <dirbaio> this is no longer the case today thankfully
<re_irc> thumbv7em-none-eabi: 116628
<re_irc> thumbv7em-none-eabihf: 116636
<re_irc> <James Munns> Looks like workingjubilee is the author of that code, might be worth pinging them on twitter
<re_irc> <newam> James Munns: Wow I love this
<re_irc> // ...look, just pretend you forgot what you just read.
<re_irc> // Stability concerns.
<re_irc> // SAFETY: `u32` is a plain old datatype so we can always... uh...
<re_irc> let rt_f32_to_u32 = |rt| unsafe { mem::transmute::<f32, u32>(rt) };
<re_irc> <dirbaio> all the float stuff is so cursed
<re_irc> <dirbaio> I don't really need floats, it was just for a factory test and I was being lazy
<re_irc> <James Munns> I wonder how your C code was invoking "f32::to_bits()"
<re_irc> <dirbaio> no, it was rust
<re_irc> <dirbaio> // measure_voltage() returns f16
<re_irc> let v = battery.measure_voltage().await as f32 / 256.0;
<re_irc> info!("[BAT] {:?} V", v);
<re_irc> // before
<re_irc> <James Munns> I'd ask you why you were doing that, but honestly, that's how I serialize floats in postcard :p
<re_irc> <dirbaio> // measure_voltage() returns f16
<re_irc> let v = battery.measure_voltage().await as f32 / 256.0;
<re_irc> // before
<re_irc> info!("[BAT] {:?} V", v);
<re_irc> <James Munns> ahhh yeah, defmt does that too.
<re_irc> <dirbaio> ah, defmt!
<re_irc> <James Munns> I don't know for sure, but I would bet it does.
<re_irc> <Lachlan Sneff> Ooops, opamp got zapped
<re_irc> <yruama_lairba> does somebody knows stm32 nucleo board ? i'd like to know what does the AVDD pin but can't find the information
bpye has quit [Ping timeout: 256 seconds]
bpye has joined #rust-embedded