MBot Setup: Flashing the MBot Control Board
The MBot Control Board uses a Raspberry Pi Pico microcontroller for its processing. You can flash firmware onto the microcontroller in order to program it.
The main MBot firmware for the supported hardware, as well as calibration and test programs, are available on the Firmware GitHub page.
Flashing Firmware
To flash the firmware onto the MBot Control Board, either download the firmware file to the Raspberry Pi, or compile it from the source code. The firmware file will have a .uf2 extension.
1. Put the Pico in BOOTSEL Mode
For the mbot-upload-firmware script to flash new firmware, the Pico must be in BOOTSEL mode. Do this every time before you flash:
-
Locate the “BOOTSEL” and “RST” buttons on the board (short for “Boot Select” and “Reset”).
- Hold down both “RST” and “BOOTSEL”
- Release “RST” then “BOOTSEL” to put the board into flashing mode.
Tip: The Pico stays in BOOTSEL mode until it is flashed or reset, so you can run the flash command right after pressing the buttons.
2. Flashing the Firmware
From a terminal on the MBot’s Raspberry Pi, do:
sudo mbot-upload-firmware flash <MY-FIRMWARE>.uf2
replacing <MY-FIRMWARE> with the name of the firmware file you downloaded. If you compiled from the source code, the file should be located in the build folder.
Getting an error? If you see a message that says No accessible RP2040 devices in BOOTSEL mode were found when you run the script, the Pico is not in BOOTSEL mode. Put the Pico in BOOTSEL mode and run the command again.
Still getting an error? See I can’t flash the MBot Control Board in the Troubleshooting Guide, or try flashing the firmware from the file explorer.
Note: The mbot-upload-firmware script is installed as part of the MBot System Utilities. If you don’t have it, install it from mbot_sys_utils.
Manually Flashing Firmware
You can also flash the firmware manually, through the Raspberry Pi desktop (e.g. through NoMachine), or from a laptop connected to the MBot Control Board through USB.
To manually flash firmware, you will need the firmware downloaded onto the device you are flashing from (the Raspberry Pi or your laptop). Then, follow these steps:
- Put the Pico in BOOTSEL mode.
- The Pico should now show up as a device in the file explorer as a USB device (see Raspberry Pi below).

- Open the USB device in the file explorer.
- Drag and drop the firmware you want to flash (it should end with a
.uf2extension) into the folder. The Pico will reboot automatically, and will then run the script you flashed.