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
IlPalazzo-ojiisa has quit [Remote host closed the connection]
rardiol has quit [Ping timeout: 250 seconds]
steew has quit [Ping timeout: 260 seconds]
gajwani_ has joined #rust-embedded
gajwani_ has quit [Remote host closed the connection]
gajwani_ has joined #rust-embedded
markov_twain has quit [Quit: markov_twain]
xnor has quit [Ping timeout: 246 seconds]
xnor has joined #rust-embedded
<re_irc> <@rmja:matrix.org> Here are some thoughts on the new slice based api that limits some use cases for writing drivers for cc1101 and cc1200 rf transceivers:
<re_irc> <@rmja:matrix.org> 1. The new api removes the ability to have the sequence assert + read length byte n + read n bytes + deassert
<re_irc> <@rmja:matrix.org> 2. The wakeup from sleep sequence: assert + delay 2ms + query status byte deassert
<re_irc> <@codec_abc:matrix.org> : Thanks !
Lumpio- has quit [Ping timeout: 255 seconds]
wose has quit [*.net *.split]
wose has joined #rust-embedded
Lumpio- has joined #rust-embedded
gajwani_ has quit [Ping timeout: 260 seconds]
iprusov has left #rust-embedded [WeeChat 3.5]
lehmrob has joined #rust-embedded
<re_irc> <@ithinuel:matrix.org> Not specificially embedded related but I figured someone here might know why this does not work: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b12d3ecc4b8d6e38fcebe188a1b5b19f
<re_irc> <@ryan-summers:matrix.org> My best guess is simply the argument type signature of `rest`
<re_irc> <@ithinuel:matrix.org> * https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b12d3ecc4b8d6e38fcebe188a1b5b19fEDIT: it turns out it works if I replace `tt` with `path`
<re_irc> <@ithinuel:matrix.org> Indeed, I usually use tt as a catch-all but it seems like it does not quite work there for some reasons.
<re_irc> <@ryan-summers:matrix.org> https://doc.rust-lang.org/rust-by-example/macros/variadics.html seems to indicate the variadic type is the same as the base type
<re_irc> <@ithinuel:matrix.org> Oh that might have been because ok the "matching delimiter" part of the rule that my previous usage of tt worked as intended
<re_irc> <@ithinuel:matrix.org> Since there's not delimiter pairs here, tt is only matching 1 single token and expect the comma to follow, not a :: token.
<re_irc> <@wassasin:matrix.org> : removing the comma from the "tt" span, and the comma at the end of the example https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=53e076390b15bff3f616c9572fe3f550
IlPalazzo-ojiisa has joined #rust-embedded
<re_irc> <@ithinuel:matrix.org> * no
<re_irc> <@ithinuel:matrix.org> Yes that makes sense too since the comma then is yet another token in whatever follows.
<re_irc> <@ithinuel:matrix.org> Thank you all!! I learnt something today :)
<re_irc> <@wassasin:matrix.org> And consumed in the first match yes
emerent has quit [Ping timeout: 252 seconds]
emerent has joined #rust-embedded
<re_irc> <@korken89:matrix.org> Did anyone figure out how to get defmt working again since it broke?
markov_twain has joined #rust-embedded
<re_irc> <@ithinuel:matrix.org> : when did it break? 😲
<re_irc> <@ithinuel:matrix.org> oh is it related to the recent changes in probe-rs? (like this issue (https://matrix.to/#/!zbjndUiYJDvhDRkPGw:matrix.org/$A9ERRkCyDA2UDKWzazugtmGEa2SbNKNYJfH8SsSwxAw?via=matrix.org&via=boiler.social&via=community.rs))
lehmrob has quit [Ping timeout: 265 seconds]
<re_irc> <@korken89:matrix.org> : No, they did a breaking wire format update and the working probe-run was yanked
<re_irc> <@korken89:matrix.org> Alright, there has been a new release :D
<re_irc> <@halfbit:matrix.org> Has infineon released some code for their psoc6 for rust?
<re_irc> <@halfbit:matrix.org> I saw a post saying it was supported
<re_irc> <@jamesmunns:beeper.com> I saw it mentioned here: https://www.infineon.com/cms/en/product/promopages/rust/
<re_irc> <@jamesmunns:beeper.com> > PSoC and AURIX TC4x support will follow in the second half of 2023
<re_irc> <@halfbit:matrix.org> yeah exactly but looking at github there wasn't much at github.com/infineon
<re_irc> <@jamesmunns:beeper.com> I think most of it is behind a "call us for evaluation kit" sort of barrier.
<re_irc> <@halfbit:matrix.org> right, I wonder how much of it will be rust wrappers around C code as well
<re_irc> <@jamesmunns:beeper.com> Dunno! If anyone gets access without an NDA, I'd love to hear more :D
<re_irc> <@halfbit:matrix.org> or blobs for things like the radio
<re_irc> <@vollbrecht:matrix.org> some infos are in the comment section from shahzeb who is marked as employee
<re_irc> quote :
<re_irc> " Since PSoC is an ARM device, the standard Rust Arm toolchain can be used but we haven't released the Peripheral Access Crates (PACs) yet. PSoC support is planned for later this year, our immediate focus is on TRAVEO and AURIX devices. Modus Toolbox support is also planned.
<re_irc> On MCUs i.e. Embedded Targets like PSoC or TRAVEO, mostly no_std is used, which means features like multithreading, vectors etc. are not available. There are options like RTIC available.
<re_irc> Additional references:
<re_irc> Some RTOSes/RTOS-like libraries are currently under development (e.g. OxidOS, Veecle NOS). Also, since Rust/C interop is possible, there are efforts underway to support Rust development on standard RTOSes like FreeRTOS.
<re_irc> For C to Rust conversion, there is C2Rust. But Rust/C interop is another option if you want to reuse C code in Rust. "
<re_irc> quote end
<re_irc> <@therealprof:matrix.org> I think I've seen SVD files for PSoC6 float around a long while ago so those shouldn't be a big issue for bare minimum support.
<re_irc> <@therealprof:matrix.org> Interesting, they also exist for PSoC4... however the more interesting PSoC5 is still nowhere to be found...
<re_irc> <@halfbit:matrix.org> I'm not that familiar with the PSoC series other than the PSoC 6 ble part
<re_irc> <@therealprof:matrix.org> The interesting detail about the PSoC5 is that they have a rather flexible pinout routing and built-in UDB which allow to implement a lot of fancy functions in best CPLD manner directly in hardware.
<re_irc> <@halfbit:matrix.org> oh, I think this is the part that supports capsense pads?
<re_irc> <@halfbit:matrix.org> through the little bit of programmable logic on there, though psoc6 has something like flexcomm/flexio/pio doesn't it?
<re_irc> <@halfbit:matrix.org> could probably do something similar?
<re_irc> <@therealprof:matrix.org> Not sure really.
<re_irc> <@halfbit:matrix.org> quicklogic seems like it'd be nicer to work with if I needed like an M core + programmable logic part, could use the open tools and all that
markov_twain has quit [Quit: markov_twain]
<re_irc> <@therealprof:matrix.org> Well, I did play around a little bit with PSoC5 before I even knew Rust. UDB was a rather unique and interesting feature which got me hooked. Now we have the RP2040 with their SIO peripheral which allows to do similarly cool things but without the closedness of PSoC5...
lehmrob has joined #rust-embedded
lehmrob has quit [Ping timeout: 265 seconds]
dc740 has joined #rust-embedded
<re_irc> = note: rust-lld: warning: section type mismatch for .uninit.rtic0
<re_irc> <@dngrs:matrix.org> trying out RTIC2 (with nightly, because TAIT), what fresh hell is this?
<re_irc> >>> /tmp/cargo/thumbv7em-none-eabihf/release/deps/f4_rtic2_ewgui-ed4b9595488210b5.f4_rtic2_ewgui.6d495053-cgu.0.rcgu.o:(.uninit.rtic0): SHT_PROGBITS
<re_irc> >>> output section .uninit: SHT_NOBITS
<re_irc> rust-lld: warning: section type mismatch for .uninit.rtic1
<re_irc> >>> /tmp/cargo/thumbv7em-none-eabihf/release/deps/f4_rtic2_ewgui-ed4b9595488210b5.f4_rtic2_ewgui.6d495053-cgu.0.rcgu.o:(.uninit.rtic1): SHT_PROGBITS
<re_irc> >>> output section .uninit: SHT_NOBITS
<re_irc> rust-lld: warning: section type mismatch for .uninit.defmt-rtt.BUFFER
<re_irc> >>> /tmp/cargo/thumbv7em-none-eabihf/release/deps/f4_rtic2_ewgui-ed4b9595488210b5.f4_rtic2_ewgui.6d495053-cgu.0.rcgu.o:(.uninit.defmt-rtt.BUFFER): SHT_PROGBITS
<re_irc> >>> output section .uninit: SHT_NOBITS
<re_irc> rust-lld: warning: section type mismatch for .got
<re_irc> >>> <internal>:(.got): SHT_PROGBITS
<re_irc> >>> output section .got: SHT_NOBITS
<re_irc> rust-lld: warning: section type mismatch for .got.plt
<re_irc> >>> <internal>:(.got.plt): SHT_PROGBITS
<re_irc> >>> output section .got: SHT_NOBITS
<re_irc> rust-lld: warning: section type mismatch for .got
<re_irc> >>> <internal>:(.got): SHT_PROGBITS
<re_irc> >>> output section .got: SHT_NOBITS
<re_irc> rust-lld: error: undefined symbol: _critical_section_1_0_acquire
<re_irc> >>> referenced by lib.rs:180 (/Users/ace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.1/src/lib.rs:180)
<re_irc> >>> /tmp/cargo/thumbv7em-none-eabihf/release/deps/f4_rtic2_ewgui-ed4b9595488210b5.f4_rtic2_ewgui.6d495053-cgu.0.rcgu.o:(core::ptr::drop_in_place$LT$rtic_common..dropper..OnDrop$LT$rtic_time..TimerQueue$LT$rtic_monotonics..systick..Systick$GT$..delay_until..$u7b$$u7b$closure$u7d$$u7d$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$::h9cd011a6d274373a)
<re_irc> >>> referenced by lib.rs:180 (/Users/ace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.1/src/lib.rs:180)
<re_irc> >>> /tmp/cargo/thumbv7em-none-eabihf/release/deps/f4_rtic2_ewgui-ed4b9595488210b5.f4_rtic2_ewgui.6d495053-cgu.0.rcgu.o:(f4_rtic2_ewgui::app::__rtic_internal_async_0_prio_dispatcher::h054543b9644612bb)
<re_irc> >>> referenced by lib.rs:180 (/Users/ace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.1/src/lib.rs:180)
<re_irc> >>> /tmp/cargo/thumbv7em-none-eabihf/release/deps/f4_rtic2_ewgui-ed4b9595488210b5.f4_rtic2_ewgui.6d495053-cgu.0.rcgu.o:(SysTick)
<re_irc> >>> referenced 1 more times
<re_irc> rust-lld: error: undefined symbol: _critical_section_1_0_release
<re_irc> >>> referenced by lib.rs:197 (/Users/ace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.1/src/lib.rs:197)
<re_irc> >>> /tmp/cargo/thumbv7em-none-eabihf/release/deps/f4_rtic2_ewgui-ed4b9595488210b5.f4_rtic2_ewgui.6d495053-cgu.0.rcgu.o:(core::ptr::drop_in_place$LT$rtic_common..dropper..OnDrop$LT$rtic_time..TimerQueue$LT$rtic_monotonics..systick..Systick$GT$..delay_until..$u7b$$u7b$closure$u7d$$u7d$..$u7b$$u7b$closure$u7d$$u7d$$GT$$GT$::h9cd011a6d274373a)
<re_irc> >>> referenced by lib.rs:197 (/Users/ace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.1/src/lib.rs:197)
<re_irc> >>> /tmp/cargo/thumbv7em-none-eabihf/release/deps/f4_rtic2_ewgui-ed4b9595488210b5.f4_rtic2_ewgui.6d495053-cgu.0.rcgu.o:(f4_rtic2_ewgui::app::__rtic_internal_async_0_prio_dispatcher::h054543b9644612bb)
<re_irc> >>> referenced by lib.rs:197 (/Users/ace/.cargo/registry/src/index.crates.io-6f17d22bba15001f/critical-section-1.1.1/src/lib.rs:197)
<re_irc> >>> /tmp/cargo/thumbv7em-none-eabihf/release/deps/f4_rtic2_ewgui-ed4b9595488210b5.f4_rtic2_ewgui.6d495053-cgu.0.rcgu.o:(f4_rtic2_ewgui::app::__rtic_internal_async_0_prio_dispatcher::h054543b9644612bb)
<re_irc> >>> referenced 4 more times
<re_irc> flip-link: the native linker failed to link the program normally; please check your project configuration and linker scripts
<re_irc> <@dngrs:matrix.org> ah there's apparently a ferrous article (https://ferrous-systems.com/blog/defmt-rtt-linker-error/) on that, reading…
<re_irc> <@dngrs:matrix.org> oh it's the critical-section update
<re_irc> <@dngrs:matrix.org> never had to bother with that until now
<re_irc> <@dngrs:matrix.org> cool, fixed
dc740 has quit [Remote host closed the connection]
gajwani_ has joined #rust-embedded
gajwani_ has quit [Ping timeout: 260 seconds]
<re_irc> <@dngrs:matrix.org> hm. How to best convert an "u32" into an "f32" in the range -1.0 .. 1.0? "n as f32 / (u32::MAX as f32 / 2.) - 1.0" works but I'm not sure about performance & precision