Cargo embed cant find supported probe

I was trying to follow a tutorial in order to start working on a mcu in rust as I'm fairly new to rust but I already see the potential in an fixed memory environment.

I have a Adafruit ItsyBity M0 Express that I am trying to use as my development board.


target = "thumbv6m-none-eabi"

rustflags = ["-C","link-arg=-Tlink.x"]




use core::panic::PanicInfo;
use cortex_m_rt::entry;

fn main() -> ! {
    loop {

fn panic(_i: &PanicInfo) -> ! {
    // ...
    loop {}


  FLASH : ORIGIN = 0x00000000, LENGTH = 256K
  RAM : ORIGIN = 0x20000000, LENGTH = 32K

The program builds just fine but every time I try and do cargo embed I get the following error.

PS C:<local file path>\git\mcu> cargo embed
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s
      Config default
      Target C:<local file path>\git\mcu\target\thumbv6m-none-eabi\debug\mcu
       Error No supported probe was found

The board is plugged in and just running a blinky program so that I know its powered on and working. Even when double pressing the reset button (which causes it to attach itself as a mass storage unit in windows) I get the same error when using cargo embed.

What am I doing wrong? I'm still very new at rust but I really want to use it for this use case.

hello and welcome to embedded rust. it would be really helpful if you already have experience in embedded development in traditional languages, namely C (or even C++), but it's not a hard requirement, you just need basic knowledges about how the to interact with bare metal hardware.

the target board is not a probe by itself. a debug "probe" refers to the device sitting between the host PC and the target mcu, typically using JTAG or SWD to connect to the target SoC and USB to connect to the host. commonly used probes includes J-Link, ST-Link, and many open source alternatives.

although some devkit has a on-board probe, some chips even have built-in debug probes, the ItsyBity M0 Express board is not one of them. it comes with pre-programmed firmware for Arduino IDE and Circuit Python environment, and that's it.

I would assume the mass storage device you mentioned is a UF2 bootloader. if so, you can flash your own firmware over it, but you need to convert the elf binary into UF2 format first. check their bootloader documentation for details:

if you need the debugging functionality (e.g. set break point, view register and memory contents, single step, etc), the UF2 bootloader cannot help, you have to get an actual debug probe and connect to the SWD pins of the target board.

the J-Link is one of the most polular debug probes and is supported by almost all embedded development tools. the raspberry pi picoprobe is a good alternative which is much affordable than J-Link. in fact, you can turn any board (with USB) into a debug probe if by implementing the CMSIS-DAP protocol. for example, if you have a rp2040 based board (such as the rpi pico), the rusty-probe firmware can be used with minimal modification.