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: 252 seconds]
starblue has joined #rust-embedded
starblue has quit [Ping timeout: 248 seconds]
starblue has joined #rust-embedded
dc740 has joined #rust-embedded
emerent is now known as Guest1276
emerent has joined #rust-embedded
Guest1276 has quit [Killed (zinc.libera.chat (Nickname regained by services))]
thomas25 has left #rust-embedded [Textual IRC Client: www.textualapp.com]
thomas25 has joined #rust-embedded
creich_ has joined #rust-embedded
creich has quit [Ping timeout: 248 seconds]
<re_irc> <kristoff> Hi all, did somebody try "discovery" on the rust-embedded github lately?
<re_irc> <kristoff> I am stuck in "led-roulette":
<re_irc> <kristoff> when I try to compile this for my bbcmicro2, I have this:
<re_irc> <kristoff> $ cargo build --features v2 --target thumbv7em-none-eabihf
<re_irc> Updating crates.io index
<re_irc> error: failed to select a version for `cortex-m-rt`.
<re_irc> ... required by package `microbit v0.8.0`
<re_irc> <kristoff> I am new to embedded-rust. Can somebody help "decode" this error ?
<re_irc> <kristoff> what exactly is the problem here?
<re_irc> <kristoff> and why does it point to a package in "src/03-setup" while I am in src/05-led-roulette ?
<re_irc> <9names (@9names:matrix.org)> i built it earlier today, just did a clean run through to step 5 from a zip downloaded from git master and it built correctly.
<re_irc> is microrust a rust project? it might be picking up settings/config from there.
<re_irc> <kristoff> microrust is the old name of running rust on a microbit . I think it has now been merged in the main embedded-rust repo
<re_irc> <kristoff> I was trying the old version yesterday, so that is why the name still is there in my folders :-)
<re_irc> <9names (@9names:matrix.org)> but are there any cargo.toml/etc files in there?
<re_irc> <kristoff> I will do afull clear try again
<re_irc> <kristoff> * a full
<re_irc> <9names (@9names:matrix.org)> cargo looks back up the directory tree when building, can lead to interesting results if you've got another project there
<re_irc> <kristoff> question .. if you install packages with cargo (I guess that is what it does when you have a "require"), can they "interfere" with other packages ...
<re_irc> <kristoff> OK, looks like you answered my question while I was tying it :-)
<re_irc> <kristoff> how can you create multiple projects and be sure that this issue does not happen ?
<re_irc> <9names (@9names:matrix.org)> you give them their own directory structure, with nothing else below them that can interact:
<re_irc> $HOME/projects/myproject1
<re_irc> $HOME/projects/myproject2
<re_irc> <kristoff> this is the old project:
<re_irc> <9names (@9names:matrix.org)> kristoff: these crates are in the same workspace, so cargo considers their dependencies while building.
<re_irc> they shouldn't have any conflicts currently, so i think the error is being caused by something else
<re_irc> <kristoff> 9names: where does it actually store all the packages?
<re_irc> <kristoff> it seems to install and compile all kind of libraries .. so I guess they must be stored somewhere
<re_irc> <kristoff> * cargo
<re_irc> <kristoff> 9names: I'll first clean up my machine a little bit so I have a fresh slate to start from
<re_irc> <9names (@9names:matrix.org)> programs installed with "cargo install" end up in $HOME/.cargo/bin, and the libraries/binaries for each project brought in by "cargo build" or "cargo run" end up in [project_root]/target
<re_irc> <kristoff> ok .. thanks for the info :-)
causal has quit [Quit: WeeChat 3.6]
neceve has quit [Read error: Connection reset by peer]
neceve has joined #rust-embedded
GenTooMan has quit [Read error: Connection reset by peer]
GenTooMan has joined #rust-embedded
<re_irc> <xldenis> 👋 does anyone have a good way to setup an embedded debugger in VSCode for _non_ Rust projects?
<re_irc> <newam> for debugging it's the same for C/C++/rust since they all make an ELF
<re_irc> <xldenis> well... the the difference is probe.rs has an extension which seems to configure it all for you
<re_irc> <xldenis> and I'm a big idiot when it comes to embedded things, so I have no idea how to properly set up things like openocd etc...
<re_irc> <newam> probe-rs (the binary, not sure what the extension is) does also work for C/C++
<re_irc> if the extension is rust-specific there is an official microsoft extension: https://devblogs.microsoft.com/cppblog/vscode-embedded-development/
<re_irc> <xldenis> ohhh interesting
<re_irc> <newam> Basically you setup openocd to serve a GDB server (default), then you just find a vscode extension that can connect to a GDB server
<re_irc> <xldenis> newam: does this work with SAMD boards? as I said, I'm incredibly unknowledgeable when it comes to embedded, I'm just trying to figure out why the bootloader isn't jumping to my code
<re_irc> <newam> xldenis: I don't know anything about SAMD boards, sorry :/
<re_irc> If the SAMD board has SWD or JTAG, and the probe connected is compatible with OpenOCD then it will work.
<re_irc> <newam> if setting up vscode is giving you problems you can also just use "gdb", bit of a pain to find the commands for what you want to do, but it is much less finiky than vscode for first-time setup
<re_irc> <newam> also I think you don't even need OpenOCD these days? There are some probe-rs tools with a gdbserver built in IIRC
<re_irc> <xldenis> ah, yes it seems like there's a "probe-rs-cli" binary i can install
<re_irc> <xldenis> I'm able to reset my chip with it, but other commands return "Unexpected DAP response: 0" any idea what that means?
<re_irc> <xldenis> also able to read memory, but can't run "probe-rs-cli info"
<re_irc> <xldenis> "probe-rs-cli debug" even works...
<re_irc> <newam> 🤔
<re_irc> <xldenis> and I think the gdb server works!
causal has joined #rust-embedded
dc740 has quit [Remote host closed the connection]