Seeed XIAO RP2040

If I am working on tweaking a program using an RP2040, I get the following error:

Sketch uses 56620 bytes (2%) of program storage space. Maximum is 2093056 bytes.
Global variables use 8928 bytes (3%) of dynamic memory, leaving 253216 bytes for local variables. Maximum is 262144 bytes.
Resetting /dev/cu.usbmodem101
Converting to uf2, output size: 146944, start address: 0x2000
Scanning for RP2040 devices
No drive to deploy.
Failed uploading: uploading error: exit status 1

If I press the reset and try again it works. This happens every time! Is this normal for this board?

That "No drive to deploy" message means the board never switched into its UF2 bootloader mode, so the upload tool found no drive to write to. The Seeed XIAO RP2040 wiki has an "Enter Bootloader Mode" section for exactly this case: hold the B (BOOT) button while plugging the board into the computer, then release it, and a disk drive should appear. With the drive showing, run the upload from the IDE again. If the drive appears but the upload still fails, post the new IDE output, because that would point at something else.

Hold BOOTSEL while connecting USB, or use the board's documented BOOT/RESET sequence. The RPI-RP2 drive should appear.

I have done the bootloader thing and it works. The issue happens when the board is still plugged in and I try to upload after tweaking the code.

How much longer will it take before you give up on your 2040 experiment and go back to using the Xiao ESP32 C'3s without the antenna? :wink:

Not long, I do regret buying them. That said, I have two projects in mind and after that I will use XIAO ESP32C3s!

The first upload needs the manual BOOTSEL step, but after that the arduino-pico core supports auto-reset, so repeat uploads should work with the board still plugged in. One catch: this only works if the board's serial port is selected under Tools > Port after the first upload. The docs say that selection sticks, so it is a one time step. If no serial port shows up for the board while your sketch runs, the sketch has probably crashed its own USB. The arduino-pico documentation calls that a hard hang and Seeed's troubleshooting wiki lists the same symptom, and then it is back to manual BOOTSEL each time. My guess is the Port menu selection is what you are missing.

I don’t think so but I will check it out!