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
<re_irc> <GrantM11235> dirbaio: It is possible to add external storage support to heapless::vec in a backwards compatible way https://github.com/japaric/heapless/compare/main...GrantM11235:heapless:vec-external-storage
<re_irc> <GrantM11235> I'm still not sure how useful it is though
<re_irc> <ignormies> From the reference manual:
<re_irc> > Transmit-only mode is similar to full-duplex mode (BIDIMODE=0, RXONLY=0): the data are transmitted on the transmit pin ... In this case, the application just needs to ignore the Rx buffer (if the data register is read, it does not contain the received value).
<re_irc> > After transmitting two data items in transmit-only mode, the OVR flag is set in the SPI_SR register since the received data are never read.
<re_irc> Based on this, is the check for the overrun flag -> Error something that should _always_ happen in ".read()", esp. in situations where "NoMiso" is used? It seems perfectly allowable to completely ignore the OVR flag after writing data.
<re_irc> <GrantM11235> The read method comes from the "FullDuplex" (https://docs.rs/embedded-hal/latest/embedded_hal/spi/trait.FullDuplex.html). If you are only writing, I would suggest using the blocking "Write" trait (https://docs.rs/embedded-hal/latest/embedded_hal/blocking/spi/trait.Write.html)
<re_irc> <GrantM11235> +trait
<re_irc> <GrantM11235> * and send methods
starblue has quit [Ping timeout: 268 seconds]
starblue has joined #rust-embedded
crabbedhaloablut has quit [*.net *.split]
crabbedhaloablut has joined #rust-embedded
<re_irc> <boondocker> Had a little change merged upstream into litex/vexriscv so Rust atomics now work using riscv32imac targets on the imac variant
starblue has quit [Ping timeout: 252 seconds]
starblue has joined #rust-embedded
causal has quit [Quit: WeeChat 3.6]
dc_740 has joined #rust-embedded
<re_irc> <burrbull> @ignormies If you are still fighting with ws2812 I would recommend to use "ws2812_spi::prerendered::Ws2812" instead of that in the core of crate. As it makes all calculation before sending them with SPI, it works much more stable. Also you can use it with "blocking::spi::Write" (https://github.com/burrbull/ws2812-spi-rs/tree/blocking_write) or "blocking::spi::WriteIter" (even better)
<re_irc> <burrbull> * ignormies:
limpkin has quit [Remote host closed the connection]
limpkin has joined #rust-embedded
dc_740 has quit [Ping timeout: 252 seconds]
brazuca has joined #rust-embedded
<re_irc> <chrysn (@chrysn:matrix.org)> A new release of RIOT-OS is just out, and since this one we can have OS-level modules written in Rust -- with one wrapping eldruin's lsm303agr as a first practical application.
<re_irc> <andersonwatts✪> I'll help 10individuals how to earn $30,000 in 72 hours from the crypto market. But you will pay me 10% commission when you receive your profit. if interested send me a direct message on WhatsApp by asking me (HOW) for more details on how to get started
<re_irc> +1 (559) 666‑3967
<re_irc> <jessebraham> James Munnsadamgreig spam!
limpkin has quit [Quit: No Ping reply in 180 seconds.]
limpkin has joined #rust-embedded
<cr1901> You can tell Matrix has made it as a chat protocol b/c spam bots go there now
<re_irc> <adamgreig> hah, yea. more spam on matrix than irc...
<re_irc> <adamgreig> i think irc has the advantage of server opers so you get klined from the whole server, not sure how matrix handles that
<re_irc> <K900> Matrix doesn't really have per-server bans, but you can use a moderation bot to have a big shared ban list
<re_irc> <adamgreig> finally, a use for a blockchain :P
rardiol has joined #rust-embedded
brazuca has quit [Quit: Client closed]
aflanagan has joined #rust-embedded
<cr1901> agg: Could you please post this code snippet again? https://libera.irclog.whitequark.org/rust-embedded/2022-08-23#32788838; (along w/ relevant Cargo settings)?
<cr1901> the link died and I didn't manage to get to it in time
<cr1901> Oh cool, thanks
<re_irc> <adamgreig> there's not much cargo settings wise, I had
<re_irc> [profile.release]
<re_irc> codegen-units = 1
<re_irc> incremental = false
<cr1901> I meant the target
<re_irc> <adamgreig> it was thumbv6m-none-eabi
<cr1901> B/c there's 10 billion arm ones :P
<cr1901> tybm
<cr1901> tyvm* even
aflanagan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aflanagan has joined #rust-embedded
aflanagan has quit [Quit: Textual IRC Client: www.textualapp.com]
rardiol has quit [Ping timeout: 252 seconds]
<cr1901> agg: Did you use a custom linker script to get it to link, or did you just analyze the output without doing the final link?
<re_irc> <adamgreig> cr1901: it's linked with cortex-m-rt
<cr1901> Yes, when I link w/ cortex-m-rt, I get "_start" not found
<cr1901> it's not picking up the link.x script
<re_irc> <adamgreig> https://dpaste.org/U8kPR
<re_irc> <adamgreig> you need to set the link script in either .cargo/config.toml or in build.rs
<re_irc> <adamgreig> that pastebin has every file in the project
<cr1901> thanks, I'm not firing on all cylinders today
<re_irc> <adamgreig> np
<cr1901> I don't think I've ever copied memory.x to OUT_DIR. I think I've always relied on it being picked up by running cargo in the root dir
<cr1901> I _probably_ shouldn't do this going forward though
dc_740 has joined #rust-embedded
<re_irc> <adamgreig> It's fine unless the project is in a workspace, then it needs to be in the workspace root iirc
rardiol has joined #rust-embedded
dc_740 has quit [Ping timeout: 268 seconds]
causal has joined #rust-embedded
brazuca has joined #rust-embedded
<re_irc> <maix522> Hi, I want to use atomic-polyfill on a thumbv4 cpu (ARM7TDMI) but I it complains that the "cortex_m" crate isn't found.
<re_irc> I don't know which crate I should add to my project to make this work.
<re_irc> Any help is welcomed
brazuca has quit [Quit: Client closed]
<cr1901> agg: I'm able to duplicate the bloat on cortex-m: https://github.com/cr1901/msp430-size
<cr1901> Run "cargo build --manifest-path=./take-api/Cargo.toml --target=thumbv6m-none-eabi --release -Zbuild-std=core --example=critical --features=use-extern-cs,critical/cortex-m,critical/inline"
<cr1901> "llvm-size target/thumbv6m-none-eabi/release/examples/critical" should be about 416 bytes
<cr1901> Then run "cargo build --manifest-path=./take-api/Cargo.toml --target=thumbv6m-none-eabi --release -Zbuild-std=core --example=critical --features=critical/cortex-m,critical/inline"
<cr1901> "llvm-size target/thumbv6m-none-eabi/release/examples/critical" will be 400 bytes. This is the same code, the only thing that changed is that acquire and release became "extern" functions
<cr1901> if you remove "critical/inline" from both invocations, the resulting binaries have the same size at 416 bytes (somehow Rust decides not to optimize properly in either case)
<re_irc> <dirbaio> maix522: what's thee xact error?
<re_irc> <maix522> error[E0433]: failed to resolve: use of undeclared crate or module "cortex_m"
<re_irc> |
<re_irc> 112 | let primask = cortex_m::register::primask::read();
<re_irc> --> /home/maix/.cargo/registry/src/github.com-1ecc6299db9ec823/critical-section-0.2.7/src/lib.rs:112:27
<re_irc> <maix522> I don't know if there is a crate that implement critical section for my cpu tho
<re_irc> <maix522> I might need to implement it myself
limpkin has quit [Quit: No Ping reply in 180 seconds.]
limpkin has joined #rust-embedded
<re_irc> <GrantM11235> Would it work to do circular dma into a "&[AtomicU8]"?
<re_irc> <dirbaio> maix522: seems like a bug in critical-section 0.2, it assumes all thumbv* is cortex-m (https://github.com/rust-embedded/critical-section/blob/v0.2.7/build.rs#L6) which it's not.
<re_irc> Probably not worth fixing at this point... Use atomic-polyfill 1.0 which uses critical-section 1.0
<re_irc> <dirbaio> and yes you'll have to supply your own critical-section impl, check the readme for details
rardiol has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]