Skip to content

3. Flash the board

You send the firmware to the board over the USB cable. The board keeps running and installs it itself; CrossPad calls this an OTA update, even over USB.

By default the board’s USB port carries MIDI and audio. The flash script switches it to USB serial mode, and the board asks you on its screen first, so keep it in front of you.

You do not flash the STM32 co-processor here: the ESP firmware carries its image and offers that update on the board’s screen when one is due. Details: Flash the STM32.

  1. Plug the board in with a USB data cable (not a charge-only cable) and switch it on. Then go to the project, load ESP-IDF and start the flash script.

    Terminal window
    cd ~/CrossPad
    . "$CROSSPAD_IDF_DIR/export.sh"
    python3 tools/ota_flash.py

    You should see:

    CDC port not found. Checking MIDI...
    Found CrossPad MIDI: …
    Sending USB mode switch SYSEX (-> CDC + MIDI)...
    Waiting for CDC port (up to 10s)...

    If the board is already in USB serial mode, it does not ask: the output starts at Auto-detected CrossPad on … (shown in step 2), and you go on with step 3.

    If not: OTA flash cannot find the board

  2. Press Allow when the board asks USB serial mode? You have 10 seconds.

    You should see:

    CrossPad CDC available on /dev/ttyACM0
    Auto-detected CrossPad on /dev/ttyACM0
    Board: dev_… v2 -> image v2: …/build_v2/CrossPad.bin
    Firmware: …/build_v2/CrossPad.bin (… bytes, … MB)
    Connecting to /dev/ttyACM0...
    Sending: OTA_BEGIN …
    Waiting for user confirmation on device...

    If not: OTA flash cannot find the board. If it stops with Error: the revision of the board on … is unknown: OTA flash says the revision of the board is unknown.

  3. Press Update when the board shows it. You have 60 seconds.

    You should see:

    Device ready. Sending firmware...
    OTA complete! (…s, … KB/s)
    Device restarting...
    Running slot: trial

    If not: OTA times out waiting for confirmation. If OTA does not work at all, flash over UART instead.

  4. Leave the board alone for 10 seconds: do not unplug or reset it. The new firmware runs on trial and confirms itself; a reset before that rolls it back.

    You should see: the board restarts into its home screen and stays there. If it then offers an STM32 update, press Update and wait until it says Done: STM32 …; the pads are off meanwhile.

    If not: board rolls back to the old firmware

Optional Skip the Update question next time

When the board asks you to confirm an update, tick Auto-accept updates once. From then on, flashes start without the Update press.

Optional Watch the boot log

Wait 10 seconds after the flash first, because opening the console port restarts the board. Then follow Read the console and backtraces, which opens the console on the STM32 bridge port (0483:5740). A healthy boot prints this line (the screen lines App registry initialized and LoadMainScreen completed successfully follow it):

I (…) crosspad_main: All systems operational - Crosspad ready

If not: no boot log on the console

Next: 4. Check it works