Get started with the System-on-Module

The Coral System-on-Module (SoM) is a fully-integrated Linux system that includes NXP's iMX8M system-on-chip (SoC). It's the same SoM included with the Dev Board, so it runs the same software and has similar setup procedures. This page is your guide to get started.

The SoM setup requires mounting it to a baseboard and flashing Mendel Linux to the board. Then you can access the board's shell and begin running TensorFlow Lite models.

If you want to learn more about the hardware, see the SoM datasheet.

Warning: Use caution when handling the SoM to avoid electrostatic discharge or contact with conductive materials (metals). Failure to properly handle the SoM can result in a short circuit, electric shock, serious injury, death, fire, or damage to your board and other property.

Requirements

Before you begin, collect the following hardware:

  • Linux or Mac computer (referred to below as "host computer").
  • A baseboard (carrier board) to which you can attach the SoM. See the baseboard developer guide. (One option is to use the baseboard provided with the Coral Dev Board.)

    The baseboard must have a USB port that's connected to the SoM to allow flashing with fastboot.

  • A USB cable to connect your host computer to the baseboard.

You also need the following software tools on your host computer:

  • The latest fastboot tool.

    Even if you already have fastboot (perhaps for Android projects), you may need to update it, so we suggest you get the latest version now.

    Download the Android SDK Platform-tools.

    There are many tools in this package, but you only need fastboot, so save that one (and delete the rest):

    mkdir -p ~/.local/bin
    
    sudo mv ~/Downloads/platform-tools/fastboot ~/.local/bin/

    Now verify it works:

    fastboot --version

    For Mac compatibility, the version must be 28.0.2 or higher.

  • The Mendel Development Tool (MDT).

    MDT is a command line tool that helps you perform tasks with connected Mendel devices, such as this SoM. For example, MDT can list connected devices, install Debian packages on a device, open a shell with a device, and more.

    Install MDT using pip as follows:

    python3 -m pip install --user mendel-development-tool
    Note: The --user flag installs the mdt executable in your user directory. On Linux, that's ~/.local/bin/. On a Mac, it's something like /Users/yourname/Library/Python/3.7/bin/. If you remove that flag, it requires root access and will install at /usr/local/bin. So make sure that the appropriate path is in your PATH environment variable.

Now you're ready to flash the SoM and log in.

Flash the board

Flash the SoM with Mendel Linux as follows:

  1. Mount the module.

    If you haven't already, connect the SoM to your baseboard.

  2. Set the boot mode.

    Verify that your boot mode is set to boot internally from eMMC (which is pre-flashed with the U-Boot bootloader):

    • BOOT_MODE1 must be set high.
    • BOOT_MODE0 must be set low.

    Note: For further details, such as information about boot fuses, see the iMX 8M SoC documentation.
  3. Connect your host and connect power.

    Connect your host computer to the SoM over USB, and then power the board as appropriate for your baseboard. (The SoM main power supply requires 5 V.)

    Caution: Do not attempt to power the board by connecting it to your computer.
  4. Verify fastboot sees your device.

    Open a new terminal on your host computer and execute the following command:

    fastboot devices
    

    You should see a line printed like this (your numbers will be different):

    1b0741d6f0609912        fastboot
    

    Help! If you don't see anything printed, be sure you have the latest version of fastboot (as per the requirements above). If you updated fastboot but the device still isn't found, then make sure your SoM is in fastboot mode:
    1. Connect to the serial console and execute sudo reboot-bootloader.
    2. When you reach the u-boot prompt, execute fastboot 0.
    3. Again try fastboot devices from the host computer.
  5. Download and flash the system image.

    From the terminal on your host computer, execute the following:

    cd ~/Downloads
    
    curl -O https://dl.google.com/coral/mendel/enterprise/enterprise-eagle-20211117215217.zip
    unzip enterprise-eagle-20211117215217.zip \ && cd enterprise-eagle-20211117215217
    bash flash.sh

    This starts the flashing process and you'll see various output.

It takes about 5 minutes for flashing to complete. When it's done, the SoM reboots and your terminal prompt returns to you.

Caution: When removing the SoM from your baseboard, avoid lifting it from only one side, or you might damage the board-to-board connectors.

Next steps

Now that you have the Mendel system on the board, you can initiate a secure shell session using the MDT tool, update software packages, and run inference on the Edge TPU.

All such procedures for the SoM are the same as when using the Dev Board, so you should continue by following the Dev Board guide to connect to the board's shell via MDT and keep going through that document to try some TensorFlow Lite models.