loki_val has quit [Quit: No Ping reply in 180 seconds.]
crabbedhaloablut has joined #rust-embedded
<re_irc>
<pgibson> Is there a preferred way to access a "[u32; 12]" bytewise, eg for i2c transmission? I'm currently allocating a "[0u8; 12*4]" and then copying to/from it using to/from_be_bytes which works but feels clumsy. I've seen "std::mem::transmute" which I expect is unavailable in no_std, and I'm currently looking at "unsafe {data.align_to::<u8>()}" and how to swap endianness
<re_irc>
<pgibson> Some of the structures are probably much larger than u32; 12 really
causal has joined #rust-embedded
<re_irc>
< (@9names:matrix.org)> transmute is also in core::mem
<re_irc>
< (@9names:matrix.org)> so you can still use that with no_std
<re_irc>
<pgibson> Is there any advantage to transmute vs align_to?
<re_irc>
< (@9names:matrix.org)> I'm not familiar with align_to
<re_irc>
< (@9names:matrix.org)> Depending on how much you're doing this you might want something like the bytemuck crate
<re_irc>
<pgibson> Yeah that does look interesting thanks
<re_irc>
< (@grantm11235:matrix.org)> Fun fact: "RangeInclusive" is 50% larger than "Range"
<re_irc>
< (@Ericson2314:matrix.org)> anyone have any idea with thumb1 how to load a 32-bit immediate that is a (defined elsewhere) symbol?
<re_irc>
< (@Ericson2314:matrix.org)> I see newer arm has ":lower16:"
<re_irc>
< (@Ericson2314:matrix.org)> but I don't see anything for each 8 bytes
<re_irc>
< (@Ericson2314:matrix.org)> I guess ldr is the move
<re_irc>
< (@Ericson2314:matrix.org)> or defining symbols in linker script but that sucks
<re_irc>
< (@Ericson2314:matrix.org)> (1 for each 8 bits)
dc740 has quit [Remote host closed the connection]
IlPalazzo-ojiisa has joined #rust-embedded
starblue has quit [Ping timeout: 260 seconds]
starblue has joined #rust-embedded
IlPalazzo-ojiisa has quit [Ping timeout: 256 seconds]
IlPalazzo-ojiisa has joined #rust-embedded
IlPalazzo-ojiisa has quit [Ping timeout: 248 seconds]
IlPalazzo-ojiisa has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
dc740 has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
dc740 has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
crabbedhaloablut has quit [Quit: No Ping reply in 180 seconds.]
crabbedhaloablut has joined #rust-embedded
IlPalazzo-ojiisa has quit [Ping timeout: 260 seconds]
crabbedhaloablut has quit [Ping timeout: 255 seconds]
crabbedhaloablut has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
causal has quit [Quit: WeeChat 3.7.1]
dc740 has joined #rust-embedded
emerent has quit [Ping timeout: 252 seconds]
emerent has joined #rust-embedded
<re_irc>
< (@dirbaio:matrix.org)> with vscode+rust-analyzer, "format on save" has recently stopped working for files not in the main crate
<re_irc>
< (@dirbaio:matrix.org)> has anyone else seen this? any fixes?
IlPalazzo-ojiisa has quit [Quit: Leaving.]
<re_irc>
< (@jessebraham:matrix.org)> I _may_ have seen that happen yesterday, but I'm not entirely sure. I chalked it up to the usual RA weirdness though.
<re_irc>
< (@jessebraham:matrix.org)> Not working today but I can try to check it out later
<re_irc>
< (@jessebraham:matrix.org)> * I'm not
<re_irc>
< (@dirbaio:matrix.org)> lol it fails to format as soon as the file contains one "async fn"
<re_irc>
< (@9names:matrix.org)> i would simply not write one async fn 🤪
Shell has quit [Quit: ZNC 1.8.2+deb2+b1 - https://znc.in]
Shell has joined #rust-embedded
<re_irc>
< (@robgal519:matrix.org)> Hi I have issue with defmt-rtt, I just wanted to have some println! statement in my sample (stm32f103), but I keep getting linker errors:
<re_irc>
error: section .defmt.{"package":"blinky","tag":"defmt_println","data":"main","disambiguator":"8589678049887836088"} virtual address range overlaps with .text
<re_irc>
< (@robgal519:matrix.org)> what am I missing ?
<re_irc>
< (@dirbaio:matrix.org)> enable Cargo feature "critical-section-single-core" in "cortex-m"
<re_irc>
< (@robgal519:matrix.org)> Hi I have issue with defmt-rtt, I just wanted to have some println! statement in my sample (stm32f103), but I keep getting linker errors:
<re_irc>
error: section .defmt.{"package":"blinky","tag":"defmt\_println","data":"main","disambiguator":"8589678049887836088"} virtual address range overlaps with .text
<re_irc>
< (@robgal519:matrix.org)> I was able to use rtt_target, and got some output on RTT, but it is not defmt, that I wanted :( ( I want a printf and logging done by defmt, and in case of rtt_target all strings are embedded in the binary)
<re_irc>
< (@dirbaio:matrix.org)> make sure you have "-Tdefmt.x" in your linker options (usually in ".cargo/config.toml")