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
dc740 has quit [Remote host closed the connection]
dc740 has joined #rust-embedded
lehmrob has quit [Ping timeout: 255 seconds]
lehmrob has joined #rust-embedded
rardiol has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
starblue has quit [Ping timeout: 276 seconds]
starblue has joined #rust-embedded
dc740 has quit [Remote host closed the connection]
cr1901_ is now known as cr1901
bjc has quit [Ping timeout: 255 seconds]
<re_irc> <@soundguy:matrix.org> : I can't tell, does this look right?
<re_irc> <@9names:matrix.org> It looks fine to me.
<re_irc> Are you building the code from the discovery repo with the command specified in the discovery book?
<re_irc> "cargo build --target thumbv7em-none-eabihf"
<re_irc> <@soundguy:matrix.org> Oh man I was doing "cargo embed ...", I'm getting a slightly more interesting error and lot less printing when I run your command.
<re_irc> Here are the last couple of lines:
<re_irc> sadedwar@sams-macbook 03-setup % cargo build --target thumbv7em-none-eabihf
<re_irc> Compiling nb v1.1.0
<re_irc> Compiling void v1.0.2
<re_irc> Compiling vcell v0.1.3
<re_irc> Compiling bitfield v0.13.2
<re_irc> Compiling bare-metal v0.2.5
<re_irc> Compiling ufmt-write v0.1.0
<re_irc> Compiling cortex-m-rt v0.7.3
<re_irc> Compiling bitfield v0.14.0
<re_irc> error[E0463]: can't find crate for `core`
<re_irc> |
<re_irc> = note: the `thumbv7em-none-eabihf` target may not be installed
<re_irc> = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
<re_irc> error[E0463]: can't find crate for `compiler_builtins`
<re_irc> error[E0405]: cannot find trait `Copy` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/vcell-0.1.3/src/lib.rs:31:18
<re_irc> |
<re_irc> 31 | where T: Copy
<re_irc> | ^^^^ not found in this scope
<re_irc> error[E0405]: cannot find trait `Copy` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/vcell-0.1.3/src/lib.rs:39:18
<re_irc> |
<re_irc> 39 | where T: Copy
<re_irc> | ^^^^ not found in this scope
<re_irc> <@soundguy:matrix.org> * first**
<re_irc> <@soundguy:matrix.org> Oh man I was doing "cargo embed ...", I'm getting a slightly more interesting error and lot less printing when I run your command.
<re_irc> Here are the first** couple of lines:
<re_irc> Compiling nb v1.1.0
<re_irc> sadedwar@sams-macbook 03-setup % cargo build --target thumbv7em-none-eabihf
<re_irc> Compiling vcell v0.1.3
<re_irc> Compiling void v1.0.2
<re_irc> Compiling bitfield v0.13.2
<re_irc> Compiling bare-metal v0.2.5
<re_irc> Compiling ufmt-write v0.1.0
<re_irc> Compiling cortex-m-rt v0.7.3
<re_irc> Compiling bitfield v0.14.0
<re_irc> error[E0463]: can't find crate for `core`
<re_irc> |
<re_irc> = note: the `thumbv7em-none-eabihf` target may not be installed
<re_irc> = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
<re_irc> error[E0463]: can't find crate for `compiler_builtins`
<re_irc> error[E0405]: cannot find trait `Copy` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/vcell-0.1.3/src/lib.rs:31:18
<re_irc> |
<re_irc> 31 | where T: Copy
<re_irc> | ^^^^ not found in this scope
<re_irc> error[E0405]: cannot find trait `Copy` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/vcell-0.1.3/src/lib.rs:39:18
<re_irc> |
<re_irc> 39 | where T: Copy
<re_irc> | ^^^^ not found in this scope
<re_irc> error[E0463]: can't find crate for `core`
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/ufmt-write-0.1.0/src/lib.rs:14:5
<re_irc> |
<re_irc> 14 | core::mem::uninitialized()
<re_irc> | ^^^^ can't find crate
<re_irc> |
<re_irc> = note: the `thumbv7em-none-eabihf` target may not be installed
<re_irc> = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
<re_irc> error[E0463]: can't find crate for `core`
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/void-1.0.2/src/lib.rs:16:5
<re_irc> |
<re_irc> 16 | extern crate core;
<re_irc> | ^^^^^^^^^^^^^^^^^^ can't find crate
<re_irc> |
<re_irc> = note: the `thumbv7em-none-eabihf` target may not be installed
<re_irc> = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
<re_irc> error: cannot find attribute `derive` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/void-1.0.2/src/lib.rs:28:3
<re_irc> |
<re_irc> 28 | #[derive(Copy)]
<re_irc> | ^^^^^^
<re_irc> Some errors have detailed explanations: E0405, E0463.
<re_irc> For more information about an error, try `rustc --explain E0405`.
<re_irc> error[E0412]: cannot find type `Result` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/ufmt-write-0.1.0/src/lib.rs:27:41
<re_irc> |
<re_irc> 27 | fn write_str(&mut self, s: &str) -> Result<(), Self::Error>;
<re_irc> | ^^^^^^ not found in this scope
<re_irc> error[E0412]: cannot find type `Result` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/ufmt-write-0.1.0/src/lib.rs:34:42
<re_irc> |
<re_irc> 34 | fn write_char(&mut self, c: char) -> Result<(), Self::Error> {
<re_irc> | ^^^^^^ not found in this scope
<re_irc> error[E0463]: can't find crate for `core`
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/nb-1.1.0/src/lib.rs:192:5
<re_irc> |
<re_irc> 192 | use core::fmt;
<re_irc> | ^^^^ can't find crate
<re_irc> |
<re_irc> = note: the `thumbv7em-none-eabihf` target may not be installed
<re_irc> = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
<re_irc> error: cannot find attribute `derive` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/nb-1.1.0/src/lib.rs:201:3
<re_irc> |
<re_irc> 201 | #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
<re_irc> | ^^^^^^
<re_irc> error[E0463]: can't find crate for `core`
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/nb-1.1.0/src/lib.rs:195:27
<re_irc> |
<re_irc> 195 | pub type Result<T, E> = ::core::result::Result<T, Error<E>>;
<re_irc> | ^^^^ can't find crate
<re_irc> |
<re_irc> = note: the `thumbv7em-none-eabihf` target may not be installed
<re_irc> = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
<re_irc> error: requires `receiver` lang_item
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/ufmt-write-0.1.0/src/lib.rs:27:18
<re_irc> |
<re_irc> 27 | fn write_str(&mut self, s: &str) -> Result<(), Self::Error>;
<re_irc> | ^^^^^^^^^
<re_irc> error: requires `receiver` lang_item
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/ufmt-write-0.1.0/src/lib.rs:34:19
<re_irc> |
<re_irc> 34 | fn write_char(&mut self, c: char) -> Result<(), Self::Error> {
<re_irc> | ^^^^^^^^^
<re_irc> error: cannot find attribute `derive` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/bare-metal-0.2.5/src/lib.rs:10:3
<re_irc> |
<re_irc> 10 | #[derive(Debug)]
<re_irc> | ^^^^^^
<re_irc> error[E0405]: cannot find trait `Sync` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/bare-metal-0.2.5/src/lib.rs:101:16
<re_irc> |
<re_irc> 101 | unsafe impl<T> Sync for Mutex<T> where T: Send {}
<re_irc> | ^^^^ not found in this scope
<re_irc> error[E0405]: cannot find trait `Send` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/bare-metal-0.2.5/src/lib.rs:101:43
<re_irc> |
<re_irc> 101 | unsafe impl<T> Sync for Mutex<T> where T: Send {}
<re_irc> | ^^^^ not found in this scope
<re_irc> error[E0405]: cannot find trait `FnOnce` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/nb-1.1.0/src/lib.rs:239:12
<re_irc> |
<re_irc> 239 | F: FnOnce(E) -> T,
<re_irc> | ^^^^^^ not found in this scope
<re_irc> error[E0405]: cannot find trait `From` in this scope
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/nb-1.1.0/src/lib.rs:248:9
<re_irc> |
<re_irc> 248 | impl<E> From<E> for Error<E> {
<re_irc> | ^^^^ not found in this scope
<re_irc> error: could not compile `vcell` due to 4 previous errors
<re_irc> warning: build failed, waiting for other jobs to finish...
<re_irc> Some errors have detailed explanations: E0412, E0463.
<re_irc> For more information about an error, try `rustc --explain E0412`.
<re_irc> <@soundguy:matrix.org> I tried re-running "rustup target add thumbv7em-none-eabihf" but only got:
<re_irc> (fun) sadedwar@sams-macbook 03-setup % rustup target add thumbv7em-none-eabihf
<re_irc> info: component 'rust-std' for target 'thumbv7em-none-eabihf' is up to date
<re_irc> <@9names:matrix.org> yeah, very strange
<re_irc> <@9names:matrix.org> i've seen a few weird issues like this with m1/m2 mac users, but no idea if/how they resolved them
<re_irc> <@9names:matrix.org> TIL aarch64-apple-darwin is only tier2, because of the lack of CI
<re_irc> <@soundguy:matrix.org> dang. so is there any hope?
<re_irc> <@9names:matrix.org> hope? sure! but understand that it's hard to help troubleshoot problems on a platform you aren't familiar with and have no access to.
<re_irc> i know that there are folks in this community that use the same hardware, so it must be possible
<re_irc> <@burrbull:matrix.org> rustc version? default? required by project?
<re_irc> <@soundguy:matrix.org> : what does this mean. I'm sorry I'm very new to rust
<re_irc> <@soundguy:matrix.org> rustc --version
<re_irc> rustc 1.68.0 (2c8cc3432 2023-03-06) (built from a source tarball)
<re_irc> <@9names:matrix.org> oh, you're trying to build in the 03-setup directory? try changing to the 05-led-roulette directory
<re_irc> <@soundguy:matrix.org> : yes
<re_irc> <@9names:matrix.org> yes you're building from the 03-setup directory, or yes you're in the 05-led-routette directory, or yes something else?
<re_irc> <@soundguy:matrix.org> lol sorry I'm pretty tired. yes, I've been building from the 03-setup dir
<re_irc> <@soundguy:matrix.org> I'll try building from the 05-led-roulette dir
<re_irc> <@9names:matrix.org> if that fails can you try downloading saving this toolchain file to that dir and see if it makes a difference:
<re_irc> <@soundguy:matrix.org> building from the 05-led-roulette directory failed:
<re_irc> sadedwar@sams-macbook 05-led-roulette % cargo build --target thumbv7em-none-eabihf
<re_irc> Compiling vcell v0.1.3
<re_irc> Compiling nb v1.1.0
<re_irc> Compiling void v1.0.2
<re_irc> Compiling panic-halt v0.2.0
<re_irc> Compiling bitfield v0.13.2
<re_irc> Compiling led-roulette v0.1.0 (/Users/sadedwar/code/fun/discovery/microbit/src/05-led-roulette)
<re_irc> Compiling bare-metal v0.2.5
<re_irc> Compiling cortex-m-rt v0.7.3
<re_irc> error[E0463]: can't find crate for `core`
<re_irc> |
<re_irc> = note: the `thumbv7em-none-eabihf` target may not be installed
<re_irc> = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
<re_irc> error[E0463]: can't find crate for `compiler_builtins`
<re_irc> error[E0463]: can't find crate for `core`
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/void-1.0.2/src/lib.rs:16:5
<re_irc> |
<re_irc> 16 | extern crate core;
<re_irc> | ^^^^^^^^^^^^^^^^^^ can't find crate
<re_irc> |
<re_irc> = note: the `thumbv7em-none-eabihf` target may not be installed
<re_irc> = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
<re_irc> error[E0463]: can't find crate for `core`
<re_irc> --> /Users/sadedwar/.cargo/registry/src/github.com-1ecc6299db9ec823/nb-1.1.0/src/lib.rs:192:5
<re_irc> |
<re_irc> 192 | use core::fmt;
<re_irc> | ^^^^ can't find crate
<re_irc> |
<re_irc> = note: the `thumbv7em-none-eabihf` target may not be installed
<re_irc> = help: consider downloading the target with `rustup target add thumbv7em-none-eabihf`
<re_irc> <@soundguy:matrix.org> : trying this now. should I try in the 05-led-routlette dir or 03?
<re_irc> <@9names:matrix.org> what are you trying to say, burrbull? they provided the output of "rustup --show" at the beginning of this conversation and it looks okay.
<re_irc> I'll re-post it here to avoid you having to scroll back through the compiler output:
<re_irc> Default host: aarch64-apple-darwin
<re_irc> installed toolchains
<re_irc> rustup home: /Users/sadedwar/.rustup
<re_irc> --------------------
<re_irc> stable-aarch64-apple-darwin (default)
<re_irc> stable-x86_64-apple-darwin
<re_irc> installed targets for active toolchain
<re_irc> --------------------------------------
<re_irc> aarch64-apple-darwin
<re_irc> thumbv7em-none-eabihf
<re_irc> active toolchain
<re_irc> ----------------
<re_irc> stable-aarch64-apple-darwin (default)
<re_irc> rustc 1.68.1 (8460ca823 2023-03-20)
<re_irc> <@burrbull:matrix.org> I try to say that "thumbv7em-none-eabihf" is installed for "1.68.1" only. If the project requires "nigthly" (for example by "rust-toolchain" file), he needs to install target for nightly toolchain.
<re_irc> <@9names:matrix.org> it's the f3 discovery book, it does not require nightly and they were not specifying it.
<re_irc> <@9names:matrix.org> i was suggesting a nightly toolchain file to see if -Z build-std solves this or not, since i don't really have any idea what is going wrong
<re_irc> <@soundguy:matrix.org> : how do I make use of this nightly build? I've added the file "rust-toolchain.toml" with the contents in the url you provided
<re_irc> <@9names:matrix.org> it should automatically use that file when doing a cargo build.
<re_irc> rustup toolchain install nightly
<re_irc> you might need to install a nightly toolchain via rustup first though?
<re_irc> or maybe just
<re_irc> cargo +nightly build -Z build-std --target thumbv7em-none-eabihf
<re_irc> would have done the trick
<re_irc> <@soundguy:matrix.org> I got:
<re_irc> $ cargo +nightly build -Z build-std --target thumbv7em-none-eabihf
<re_irc> error: no such command: `+nightly`
<re_irc> Did you mean to invoke `cargo` through `rustup` instead?
<re_irc> Cargo does not handle `+toolchain` directives.
<re_irc> <@soundguy:matrix.org> : trying this first command you listed: "$ rustup toolchain install nightly"
<re_irc> <@soundguy:matrix.org> that all installed fine and dandy. but because of this error from running "cargo +nightly ..." I wasn't able to run the command and got the following errors:
<re_irc> (base) sadedwar@sams-macbook 05-led-roulette % cargo +nightly build -Z build-std --target thumbv7em-none-eabihf
<re_irc> error: no such command: `+nightly`
<re_irc> Cargo does not handle `+toolchain` directives.
<re_irc> Did you mean to invoke `cargo` through `rustup` instead?
<re_irc> (base) sadedwar@sams-macbook 05-led-roulette % cargo build -Z build-std --target thumbv7em-none-eabihf
<re_irc> error: "/opt/homebrew/Cellar/rust/1.68.0/lib/rustlib/src/rust/Cargo.lock" does not exist, unable to build with the standard library, try:
<re_irc> rustup component add rust-src
<re_irc> <@9names:matrix.org> can you run "cargo --version"
<re_irc> <@soundguy:matrix.org> yes
<re_irc> <@soundguy:matrix.org> cargo --version
<re_irc> cargo 1.68.0 (115f34552 2023-02-26)
<re_irc> <@9names:matrix.org> can you run "which cargo"
<re_irc> <@soundguy:matrix.org> yeah
<re_irc> <@soundguy:matrix.org> which cargo
<re_irc> /opt/homebrew/bin/cargo
<re_irc> the +nightly thing only works if you've installed rust through rustup
<re_irc> <@9names:matrix.org> ah. well that at least explains one thing :D
<re_irc> <@burrbull:matrix.org> Yeah. First rule of Rust. Don't use rust from package manager
<re_irc> <@9names:matrix.org> okay, so i think the best course of action is to uninstall the homebrew version of rust, and install rustup from https://rustup.rs/
<re_irc> <@9names:matrix.org> then we can try again with "rustup target add thumbv7em-none-eabihf", and then build the 05-led-roulette project
<re_irc> <@soundguy:matrix.org> ok cool. I uninstalled rust from home-brew via "brew uninstall rust". Now when I run "which cargo" it returns: "/Users/sadedwar/.cargo/bin/cargo".
<re_irc> <@burrbull:matrix.org> remove "rust-toolchain" file. You don't need it
<re_irc> <@soundguy:matrix.org> I went back to the 03-setup directory and built and it worked!
<re_irc> <@soundguy:matrix.org> thank you guys!
dc740 has joined #rust-embedded
brazuca has quit [Quit: Client closed]
IlPalazzo-ojiisa has joined #rust-embedded
bjc has joined #rust-embedded
rardiol has joined #rust-embedded
brazuca has joined #rust-embedded
brazuca has quit [Quit: Client closed]
IlPalazzo-ojiisa has quit [Quit: Leaving.]
IlPalazzo-ojiisa has joined #rust-embedded
rardiol has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
brazuca has joined #rust-embedded
<re_irc> <@boiethios:matrix.org> Hey, do you have an example of a library that has an abstraction over a timer, allowing to track several “countdowns” at once? I imagine such a trait to have a method returning a handle, and another one checking if the handle has elapsed, but with an example, that would be cool.
Foxyloxy_ has quit [Quit: Textual IRC Client: www.textualapp.com]
Foxyloxy has joined #rust-embedded
<re_irc> <@dirbaio:matrix.org> : embassy-time
<re_irc> <@ithinuel:matrix.org> jessebraham
<re_irc> <@ithinuel:matrix.org> * .
emerent has quit [Ping timeout: 240 seconds]
emerent has joined #rust-embedded
<re_irc> <@boiethios:matrix.org> : Thanks, I will have a look at it
<re_irc> <@thejpster:matrix.org> Any Rust support for the Renesas chip on the new Arduino Uno?
<re_irc> <@thejpster:matrix.org> I wonder why they picked that one. Seems … left-field. I guess availability still constrains choices.
<re_irc> Oh wait, it has 5V VCC support. That’s very rare on an Arm chip. There’s an NXP LPC you can’t get any more and maybe something from Nuvoton?
<re_irc> <@thejpster:matrix.org> But generally the Arm stuff is all 3.3V VCC with a 5V “tolerant” input. That doesn’t work for an Uno variant that has to work with the multitude of pre existing shields.
<re_irc> <@9names:matrix.org> Looks like you can still buy Kinetis E series chips, that would been my choice for 5v tolerant cortex-m Arduino. A bit pricey though, and maybe not available in the qty they needed
<re_irc> <@9names:matrix.org> * native
<re_irc> <@thejpster:matrix.org> The RA4 is $3.50 in 1ku
<re_irc> <@thejpster:matrix.org> Ah yes. I bought a Kinetis E for that reason. Never got around to doing anything with it.
<re_irc> <@thejpster:matrix.org> Looked on octopart and they seemed to all be out of stock. I could find the RA4 though.
<re_irc> <@9names:matrix.org> Could also be a partnership thing since they used Renesas for Portenta?
<re_irc> I should check if they have improved access to info, last time I used a Renesas part they pushed you pretty hard to use their IDE to get any docs
<re_irc> <@thejpster:matrix.org> The data sheet was easy to find at least.