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
starblue has quit [Ping timeout: 260 seconds]
starblue has joined #rust-embedded
vancz has quit []
exark_ has quit [Quit: quit]
exark has joined #rust-embedded
AlexandrosLiarok has joined #rust-embedded
<AlexandrosLiarok> s/rtt/rt/
<AlexandrosLiarok> (I /could/ just use mut static MaybeUninit and directly write instead)
<JamesMunns[m]> You can check out the grounded crate
<JamesMunns[m]> It's basically the building blocks of what you're talking about.
<thejpster[m]> you can provide a __pre_init naked assembly function, and cortex-m-rt will run it before it initialises the rest of memory.
<thejpster[m]> use that to copy .ecustom - .scustom bytes from .sicustom to .scustom
<AlexandrosLiarok> thejpster[m]: hmm not sure how to set the sicustom section.
<AlexandrosLiarok> uh of course nvm
<AlexandrosLiarok> s/section/segment/
<thejpster[m]> that seems a bit unsound. With compare-and-swap on the INIT_FLAG: AtomicBool that might also work.
<thejpster[m]> other start-up routines have a table of memory regions to be initialised or zeroed. cortex-m-rt could do that.
<thejpster[m]> the on start-up you walk from .sregion to .eregion picking up two words at a time and zero-ing them. Or I guess three words at a time and doing a memcpy.
<thejpster[m]> s/the/then/
<AlexandrosLiarok> I was not aware of LOADADDR, haven't really used it before.
<AlexandrosLiarok> s/__sitcm/__siitcm/
<thejpster[m]> putting __eitcm outside the .item output section means you can insert extra things in front of it. As that doesn't make sense here, you might as well put it inside the .item section.
<thejpster[m]> but yes that looks about right (I am not a compliant GNU ld syntax parser, no warranty is given express or implied)
<thejpster[m]> You can 'insert' sections into the main link.x script from your memory.x fragment if you don't want to write a whole new script
<thejpster[m]> rp-rs does this to insert a .boot section in front of .text
<AlexandrosLiarok> hmm it seems I get a conflicting FLASH range with .vector_table.
<AlexandrosLiarok> for FLASH specifically.
<AlexandrosLiarok> Do I need something like `AT> LOADADDR(.text) + SIZEOF(.text)` or similar for other sections ?
<thejpster[m]> no the linker should just arrange all of the output sections into the region. Unless you told it not to somewhere.
<AlexandrosLiarok> s/`/~~`/, s/`/`~~/
<AlexandrosLiarok> s/`/<del>`/, s/`/`</del>/
flr7919174955 has joined #rust-embedded
flr7919174955 has quit [Remote host closed the connection]
vancz has joined #rust-embedded
<AlexandrosLiarok> = note: rust-lld: error: section .itcm load address range overlaps with .vector_table
<AlexandrosLiarok> >>> .itcm range is [0x8020000, 0x8020007]
<AlexandrosLiarok> >>> .vector_table range is [0x8020000, 0x8020297]
vancz has quit []
vancz has joined #rust-embedded
<JamesMunns[m]> If postcard-schema's `Schema` derive automatically emitted snapshot test powered by `insta`, would folks here use it? The idea would be that when you are making a postcard(-rpc) `icd` crate with your data types, you would get regression tests for "free" - if you ever change the contents, you'll get a failing snapshot test you have to approve to avoid breaking your wire formats.
<JamesMunns[m]> https://github.com/jamesmunns/postcard/issues/204 for context, open to suggestions :)
<JamesMunns[m]> s/test/tests/
<thejpster[m]> memory.x is included first
<thejpster[m]> You need ‘insert after .text’ or something.
<thejpster[m]> Because cortex-m-rt nails the the vector table to ORIGIN(FLASH).
PeterKrull[m] has joined #rust-embedded
<PeterKrull[m]> James Munns: hey, I have been wondering what the status is on the RawMutex/ScopedMutex/mutex-traits efforts, since it seems to have been still/stable for ~5 months. I have been playing around with the WaitQueue and WaitMap from maitake-sync in my own project, and really like what I do with those. And I believe much of embassy-sync could benefit from building on something like the maitake WaitQueue.
<JamesMunns[m]> Yeah, no progress on it, I'm not sure exactly where we left off, but I believe it was working, just needed review + polish + release.
<JamesMunns[m]> I've been working on postcard/postcard-rpc, so I haven't had cycles to pick it back up.
<JamesMunns[m]> If you're interested in helping to get it released, it would definitely be appreciated, but I don't have a to-do list handy for what is left to check off.
MarcTrius[m] has joined #rust-embedded
<MarcTrius[m]> Hi, I'm looking for some examples of using embedded-sdmmc with AVR
<JamesMunns[m]> MarcTrius[m]: Fwiw, AVR isn't too widely used here, I think there is an Avr specific matrix room if you don't get any answers here.
<JamesMunns[m]> MarcTrius[m]: https://matrix.to/#/#avr-rust_Lobby:gitter.im
<MarcTrius[m]> Thank you