Skip to main content

Flashing the firmware

All boards on these pages run the same firmware, uc2-esp32. What differs per board is the build environment (pin map, role on the bus, default node ID). CI builds one image per board for every release, and the web flasher at youseetoo.github.io writes it over USB. You do not need a toolchain.

What you need​

  • Chrome, Edge or Opera on a desktop computer. Firefox and Safari have no WebSerial.
  • A USB data cable to the board's own USB port. For CAN satellites that is the USB-C port of the XIAO, not the port of the HAT+.
  • Nothing else holding the serial port: close ImSwitch and any serial monitor first.

XIAO ESP32-S3 boards show up as a native USB device and need no driver. Boards with a USB-UART chip (HAT+, standalone board) need the CP2102 or CH340 driver if no port appears.

Steps​

  1. Open youseetoo.github.io.
  2. 1. Board: pick the board. The names used by the flasher are listed below.
  3. 2. Firmware version: pick a release. "Newest release with this board (incl. pre-releases)" is the right choice for all CAN boards, because the CANopen firmware is currently published as pre-release.
  4. 3. Install: click Install firmware, choose the serial port and confirm.
  5. After the flash, click Connect and use the Test tab to move a motor or switch a laser, or the Configure CAN tab to set the node ID.

The flasher writes a full image from address 0. That resets everything stored on the board: node ID, role, motor positions. Set the node ID again afterwards if the board is not supposed to run on its default.

Which board is which​

BoardName in the flasherFirmware envDefault node
HAT+HAT+ ESP32 (CAN master)UC2_canopen_master_release1
Stepper backpackMotor satelliteUC2_canopen_slave_motor_release11
Laser interfaceLaser satelliteUC2_canopen_slave_laser_release20
Illumination boardLED / illumination satelliteUC2_canopen_slave_led_release30
Galvo interfaceGalvo satelliteUC2_canopen_slave_galvo_release40
CAN GPIO boardGPIO / E-stop satelliteUC2_canopen_slave_gpio_release60
Standalone board, with CANStandalone v4 + CAN (hybrid)UC2_canopen_standalone_v4_release1
Standalone board, USB onlyStandalone v4UC2_4–
PS4 controller bridgePS4 controller bridgeUC2_canopen_bridge_ps4_usbhost_release5

A FRAME has four stepper backpacks. They all get the same image and boot as node 11 (X). Before you plug more than one into the bus, give each its own ID in the Configure CAN tab: 10 = A, 11 = X, 12 = Y, 13 = Z. The details are in Add a CAN satellite.

If it does not work​

SymptomWhat to do
No port in the listTry another cable (many are charge-only). On ESP32 boards install the CP2102 / CH340 driver.
Port is there, flashing does not startPut the board into the bootloader by hand. XIAO ESP32-S3: hold BOOT while plugging in USB. ESP32 (HAT+, standalone): hold BOOT, tap RESET/EN, release BOOT.
Flashing stops halfwayClose other programs on the port, use a shorter cable or a port directly on the computer, flash again. An interrupted flash does no harm.
Board behaves oddly after an updateErase tab, "Everything", then flash again.
"This board is not in the selected release"Pick another release or "Newest release with this board".

Serial settings for a terminal, if you want to talk to the board yourself: 921600 baud on the HAT+, 115200 baud on the standalone board. XIAO boards are USB-CDC, the baud rate is ignored.

Without the browser​

  • Satellites that are already on the bus can be updated through the master, without USB: Update firmware over CAN.
  • The release images are in youseetoo/uc2-esp32-binaries, one branch per release. They are full images for offset 0x0 and can be written with esptool.py write_flash 0x0 <file>.bin.
  • To build yourself, clone uc2-esp32 and run pio run -e <env> -t upload. Pin maps live in main/config/<env>/PinConfig.h. Do not build the *_default envs, they pick up a stale PinConfig.h.

Stuck? Ask in the forum.