SL2610 Build and Flash with CLI

This document provides concise, CLI-only steps to build and flash SL2610 applications.

Throughout this guide, <sdk-root> refers to the directory where you extracted or cloned the SDK.

Table of Contents

Prerequisites

CLI Flow (Build + Image Generation + Flash)

  1. Build the System Manager and bootloader (SDK build + image assets):

    cd <sdk-root>/examples/system_manager
    export SRSDK_DIR=<sdk-root>
    make sl2610_rdk_system_manager_defconfig BUILD=SRSDK
    
    cd <sdk-root>
    make sl2610_bootloader_rdk_defconfig BOARD=SL2610_RDK
    make astrasdk
    
    • The first command builds the System Manager using the SDK build system.

    • The second pair builds the bootloader needed for USB boot and image packaging.

  2. Generate MCU sub-images using the SDK image generator (run from <sdk-root>/examples/<example_type>/<app>):

    Before running make imagegen, ensure the bootloader is built:

    cd <sdk-root>
    make sl2610_bootloader_rdk_defconfig BOARD=SL2610_RDK
    make astrasdk
    
    cd <sdk-root>/examples/<example_type>/<app>
    make imagegen
    

    Expected outputs:

    • System Manager sub-image (for run-sm, uncompressed): <sdk-root>/examples/<example_type>/<app>/out/image/eMMCimg/sysmgr.subimg.gz

    • Compressed sub-images (for eMMC packaging, includes sysmgr.subimg.gz): <sdk-root>/examples/<example_type>/<app>/out/image/eMMCimg/

    • xSPI flash image (for xSPI flashing): <sdk-root>/examples/<example_type>/<app>/out/image/XSPIimg/spi.bin

    • USB boot inputs (SPK/keys/bootloader): <sdk-root>/examples/<example_type>/<app>/out/image/USBimg/

    If you see permission errors on Linux/macOS, run:

    cd <sdk-root>/examples
    chmod +x tools/scripts/image/bin/gen*
    
  3. Flash with the USB boot tool (SDK USB boot utility):

    Enter USB boot mode first:

    • Press and hold USB_BOOT, then press RESET.

    • Release RESET, then release USB_BOOT.

    • There are three supported modes of flashing:

      • Flash Entire eMMC Folder

      • Flash System Manager Sub-Image (eMMC)

      • Flash xSPI Image

    Flash Entire eMMC Folder

    cd <sdk-root>/tools/usb_boot_python_tool/USB_BOOT_TOOL
    python usb_boot_tool.py --op run-sm \
      --sm <sdk-root>/examples/<example_type>/<app>/out/image/eMMCimg/sysmgr.subimg.gz \
      --spk <sdk-root>/examples/<example_type>/<app>/out/image/USBimg/spk.bin \
      --keys <sdk-root>/examples/<example_type>/<app>/out/image/USBimg/key.bin \
      --m52bl <sdk-root>/examples/<example_type>/<app>/out/image/USBimg/m52bl.bin
    
    # For full eMMC flashing, use a Yocto-generated eMMCimg folder (see Notes).
    python usb_boot_tool.py --op emmc --img-dir <path-to-eMMCimg>
    

    Flash System Manager Sub-Image (eMMC)

    python usb_boot_tool.py --op emmc-sm \
      --sm <sdk-root>/examples/<example_type>/<app>/out/image/eMMCimg/sysmgr.subimg.gz \
      --sm-image <sdk-root>/examples/<example_type>/<app>/out/image/eMMCimg/sysmgr.subimg.gz
    

    Flash xSPI Image

    Programs the NOR-flash image (spi.bin) generated by make imagegen into the on-board xSPI flash. --keys, --spk, --m52bl, and --sm default to the files bundled next to usb_boot_tool.py; override only what you need.

    cd <sdk-root>/tools/usb_boot_python_tool/USB_BOOT_TOOL
    python usb_boot_tool.py --op xspi-sm \
      --spi-img <sdk-root>/examples/<example_type>/<app>/out/image/XSPIimg/spi.bin
    

    To override all inputs explicitly:

    python usb_boot_tool.py --op xspi-sm \
      --keys   <sdk-root>/examples/<example_type>/<app>/out/image/USBimg/key.bin \
      --spk    <sdk-root>/examples/<example_type>/<app>/out/image/USBimg/spk.bin \
      --m52bl  <sdk-root>/examples/<example_type>/<app>/out/image/USBimg/m52bl.bin \
      --sm     <sdk-root>/examples/<example_type>/<app>/out/image/USBimg/sysmgr.subimg \
      --spi-img <sdk-root>/examples/<example_type>/<app>/out/image/XSPIimg/spi.bin
    

    xSPI utilities (SM must already be running on the target):

    # Read the JEDEC chip ID of the attached xSPI NOR
    python usb_boot_tool.py --op xspi-jedec-id
    
    # Erase the entire xSPI flash chip
    python usb_boot_tool.py --op xspi-chip-erase
    
    # Dump a region of xSPI flash to a host file
    python usb_boot_tool.py --op xspi-read \
      --read-offset 0x0 \
      --read-size   0x100000 \
      --read-out    dump.bin
    

WSL USB Flashing Flow (usbipd)

Use this flow when flashing from WSL (Windows Subsystem for Linux). It uses usbipd to forward SL2610 USB CDC interfaces from Windows into WSL.

CDC VID:PID Reference

Stage

VID

PID

Description

Initial Boot & BL Flash

0x06CB

0x019E

Device in bootloader mode (used for SPK, BL, keys upload)

After SM Flash

0xCAFE

0x4002

System Manager (SM) is running

Workflow Overview

[Device in BL mode]
       │
       ▼
 Step 1: Bind & Attach 0x06CB:0x019E  (Admin Windows Terminal)
       │
       ▼
 Step 2: Flash SPK  →  python usb_boot_tool.py --op run-spk
       │
       ▼
 Step 3: Device re-enumerates as 0x06CB:0x019E (M52BL CDC)
         Bind & Attach again
       │
       ▼
 Step 4: Flash SM   →  python usb_boot_tool.py --op run-sm --sm <path>
       │
       ▼
 Step 5: Device re-enumerates as 0xCAFE:0x4002 (SM CDC)
         Bind & Attach
       │
       ▼
 Step 6: Flash eMMC →  python usb_boot_tool.py --op emmc --img-dir <path>

For xSPI, use --op xspi-sm --spi-img <path_to_spi.bin> — it performs SPK + SM + xSPI in one call, so Steps 4–6 collapse into a single command.

Flashing steps (WSL)

  1. Identify the USB device (BL Flash CDC) in an Administrator Windows terminal:

    usbipd list
    

    Find VID:PID 06CB:019E and note its BUSID (for example 2-4).

  2. Bind and attach the BL CDC:

    # Admin Windows terminal
    usbipd bind --busid <bus_id> --force
    
    # Second Windows terminal (non-admin)
    usbipd attach --wsl --busid <bus_id>
    
  3. In WSL, verify USB and flash SPK:

    lsusb | grep "06cb"
    cd <sdk-root>/tools/usb_boot_python_tool/USB_BOOT_TOOL
    python usb_boot_tool.py --op run-spk
    
  4. Re-bind and re-attach after re-enumeration (still 06CB:019E):

    # Admin Windows terminal
    usbipd bind --busid <bus_id> --force
    
    # Second Windows terminal (non-admin)
    usbipd attach --wsl --busid <bus_id>
    

    If BUSID changed after re-enumeration, run usbipd list again and use the new value.

  5. In WSL, flash System Manager:

    python usb_boot_tool.py --op run-sm --sm <sdk-root>/examples/<example_type>/<app>/out/image/eMMCimg/sysmgr.subimg.gz
    
  6. Bind and attach SM CDC (CAFE:4002):

    # Admin Windows terminal
    usbipd list
    usbipd bind --busid <new_bus_id> --force
    
    # Second Windows terminal (non-admin)
    usbipd attach --wsl --busid <new_bus_id>
    
  7. In WSL, flash eMMC:

    python usb_boot_tool.py --op emmc --img-dir <path-to-eMMCimg>
    

    For xSPI flashing, run instead (replaces steps 3–7):

    python usb_boot_tool.py --op xspi-sm \
      --spi-img <sdk-root>/examples/<example_type>/<app>/out/image/XSPIimg/spi.bin
    

    Tip: If flashing does not start after running a command, unplug and replug the USB cable, then re-run usbipd list/bind/attach and retry.

Quick Reference (WSL)

# [Admin Windows terminal]
usbipd list
usbipd bind --busid <bus_id> --force
# [Second Windows terminal]
usbipd attach --wsl --busid <bus_id>
# [WSL terminal]
cd <sdk-root>/tools/usb_boot_python_tool/USB_BOOT_TOOL
python usb_boot_tool.py --op run-spk
python usb_boot_tool.py --op run-sm --sm <sdk-root>/examples/<example_type>/<app>/out/image/eMMCimg/sysmgr.subimg.gz
python usb_boot_tool.py --op emmc --img-dir <path-to-eMMCimg>

# For xSPI flashing
python usb_boot_tool.py --op xspi-sm --spi-img <sdk-root>/examples/<example_type>/<app>/out/image/XSPIimg/spi.bin

Notes

  • Use --op run-sm to program only the System Manager sub-image.

  • --op emmc requires an eMMCimg folder that includes emmc_part_list and emmc_image_list. These are generated by Yocto when you build the full Astra image.

  • For SM-to-eMMC flashing (--op emmc-sm), ensure emmc_image_list is present in the eMMCimg folder.

  • --op xspi-sm requires the xSPI NOR image spi.bin produced under out/image/XSPIimg/ by make imagegen (or syna_img_tool.py --boot_source xspi). --keys, --spk, --m52bl, and --sm default to the files bundled with usb_boot_tool.py and can be overridden.

  • The xSPI utilities --op xspi-jedec-id, --op xspi-chip-erase, and --op xspi-read require SM to already be running on the target.

  • Yocto is only required if you need a full Linux/eMMC image; MCU image generation is handled entirely by the SDK tools above.

  • If run-sm fails because SM CDC is already running, power-cycle the board and try again.

  • usbipd bind must be run in an Administrator Windows terminal; usbipd attach can be run in a normal Windows terminal.

  • After flashing from WSL, unbind/detach USB forwarding in Windows if you want normal native Windows USB access.