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
rainingmessages1 has quit [Quit: bye]
rainingmessages1 has joined #rust-embedded
_whitelogger has joined #rust-embedded
az1[m] has joined #rust-embedded
<az1[m]> But those are all dependencies you'd add at the start of a project, right? In that context a template might be more useful.
bandini has joined #rust-embedded
mkj[m] has joined #rust-embedded
<mkj[m]> I wonder if battery packs would be useful to tie together matching crate versions. like how in embassy you have to make sure you've got compatible versions of all the crates, similarly for some the rustcrypto crate ecosystem
sroemer has joined #rust-embedded
Socke has quit [Ping timeout: 246 seconds]
Socke has joined #rust-embedded
thejpster[m] has joined #rust-embedded
<thejpster[m]> one challenge here is that many MCU families have multiple choices of HALs (rp-rs vs embassy-rp, stm32-rs vs embassy-stm32, etc).
<thejpster[m]> The Rust Embedded Working Group, as a rule, has never picked a favourite. It just explains what the options are.
raymondr has joined #rust-embedded
sroemer has quit [Quit: WeeChat 4.7.2]
glitchy has quit [Ping timeout: 244 seconds]
glitchy has joined #rust-embedded
whitequark[cis] has quit [Quit: Idle timeout reached: 172800s]
dcz[m]1 has joined #rust-embedded
<dcz[m]1> is it a data race if I write a memory area over JTAG? it is, right?
<Darius> as in race with code that is executing?
<Darius> not if you halt the CPU(s) :D
<dcz[m]1> in the sense of "it's always UB to have a data race in Rust" :P
<dcz[m]1> well I can use Atomic types in the beginning
<dcz[m]1> the other question would be: how do I designate a well-known address to exchange data via JTAG?
<dcz[m]1> or do I analyze the binary symbols every time before I write data?
<dcz[m]1> there's #[link_section = ".foo"] but I don't know how much control I have over placement at a concrete address within the section
Socke has quit [Ping timeout: 276 seconds]
Socke has joined #rust-embedded
<thejpster[m]> this sounds like defmt-rtt, or any kind of RTT in fact?
<thejpster[m]> the compiler can put things in sections, and the linker chooses where to put the sections. If you want the section in a specific place you have to tell the linker to do that. Or you can let the linker place it, and you can ask the linker where it put it (on the target side) or look it up in the symbol table (on the host side)
<Darius> dcz[m]1: you should start with the problem you are trying to solve
<dcz[m]1> Darius: synchronize clock. Straight way from there: link to a computer via JTAG as the simplest, already present interface (ESP32). I need to declare a fixed address.
<Darius> easy enough to do that in a linker file
<dcz[m]1> weird, defmt-rtt has , link_section = ".uninit.defmt-rtt.BUFFER" but there's no linker file declaring that in the repo
<Darius> hm
<Darius> perhaps it expects you to pick an address/size
<dcz[m]1> except it's not documented that you should pick it
<dcz[m]1> that linker file doesn't seem to have any "rtt" mention
<az1[m]> Right, the RTT buffer doesn't necessarily need a fixed location. You can either get the address from the symbol or IIRC scan the memory for the signature.
<az1[m]> With Cortex-M, the linker script from the cortex-m crate places the .uninit stuff appropriately.
<dcz[m]1> thanks. Gonna have to implement it and see what comes out. Also, probe-rs might have the code
<az1[m]> Yep, probe-rs will generally DTRT without having to manually place the buffer.
<dcz[m]1> since I don't want to implement JTAG myself...
<az1[m]> If you need bidirectional comms you should also look at rtt-target
<dcz[m]1> yup, already on my list :)
<dcz[m]1> that actually solves another problem of mine (moving data out of the chip), so double thanks
Socke has quit [Ping timeout: 252 seconds]
Socke has joined #rust-embedded
gkoebel has joined #rust-embedded
gkoebel has quit [Changing host]
gkoebel has joined #rust-embedded
JamesMunns[m] has joined #rust-embedded
<JamesMunns[m]> <dcz[m]1> is it a data race if I write a memory area over JTAG? it is, right?
<JamesMunns[m]> I mention this, because Hubris (and our debugger, Humility), do this a _lot_, and there has been a lot of hammering to make sure _how_ we do it is sound and doesn't lead to miscompilations.
<JamesMunns[m]> Debuggers can't necessarily directly participate in things like atomic CAS operations, it might be necessary to halt the core if you need to do a read/modify/write loop for "check if the lock is taken, and if not, take the lock", or you can use "asynchronous" coordination like RTT does, where the core and debugger aren't trying to write the same address at the same time (one moves the read pointer, one moves the write pointer)
Soumu[m] has quit [Quit: Idle timeout reached: 172800s]
rainbyte has quit [Read error: Connection reset by peer]
rainbyte has joined #rust-embedded
gkoebel has quit [Ping timeout: 276 seconds]
gkoebel has joined #rust-embedded
jjido has joined #rust-embedded
jjido has quit [Quit: Client closed]
sroemer has joined #rust-embedded
gkoebel has quit [Ping timeout: 256 seconds]
gkoebel has joined #rust-embedded
raymondr has quit [Ping timeout: 252 seconds]
raymondr has joined #rust-embedded
bandini has quit [Ping timeout: 272 seconds]
HarshVerma[m] has joined #rust-embedded
<HarshVerma[m]> Hi folks, I'm Harsh, I was looking for some rust related repositories where i can contribute and I came across heapless, am I in the correct channel?
<thejpster[m]> yes the heapless maintainers will be here (but they'll also be in #rust-embedded-wg:matrix.org )
Foxyloxy has quit [Ping timeout: 268 seconds]
WSalmon has quit [Remote host closed the connection]
WSalmon has joined #rust-embedded
WSalmon has quit [Remote host closed the connection]
WSalmon has joined #rust-embedded
WSalmon has quit [Client Quit]
WSalmon has joined #rust-embedded
raymondr has quit [Remote host closed the connection]
WSalmon has quit [Ping timeout: 276 seconds]
jjido has joined #rust-embedded
WSalmon has joined #rust-embedded
WSalmon has quit [Remote host closed the connection]
WSalmon has joined #rust-embedded
Foxyloxy has joined #rust-embedded
jjido has quit [Ping timeout: 245 seconds]
Socke has quit [Ping timeout: 241 seconds]
Socke has joined #rust-embedded
sroemer has quit [Ping timeout: 241 seconds]
sroemer has joined #rust-embedded
Artea has quit [Ping timeout: 246 seconds]
cr1901_ has joined #rust-embedded
cr1901 has quit [Ping timeout: 252 seconds]
gkoebel has quit [Quit: gkoebel]