.. include:: /keyword.rst =============================== Flash |G510-G700-EVK-REF-BOARD| =============================== This guide shows how to "flash"(write) the system image into the non-volatile flash memory of :doc:`/hw/g510-evk` and :doc:`/hw/g700-evk`. The flashing process is performed over a USB connection between the target board and the host computer containing the image. In order to write the on-board storage with :doc:`AIoT Tools `, you need to set the SoC in **download mode**, which allows AIoT Tools to transfer a **download agent** binary to the SRAM of SoC. The download agent then provides a `fastboot `__ interface for subsequent image transfer and storage write operations. .. important:: All the description shown in he are based on |G700-EVK|. For |G510-EVK|, users can follow the same step to flash the board with changing the naming term from `700` to `510`. .. contents:: :local: :depth: 1 Prerequisites ============= Prepare the following items: * A Linux or Windows host PC with :doc:`AIoT Tools ` installed * |G510-G700-EVK-REF-BOARD| and its 12V Power Adaptor * a **Micro USB cable** for downloading images to on-board storage .. note:: Make sure you have installed **AIoT tools** on your :doc:`Linux ` or :doc:`Windows ` host before continuing the following steps. Step 1. Connect board to host PC ================================ .. warning:: Make sure you are using the accompanied **12V** power adapter for |G510-G700-EVK-REF-BOARD|. Using an adapter with different output voltage results in unstable system and could damage your board. * Plug the **12V** power jack to the **DC JACK IN** port. Once connected to power source, the **Power LED** and **System on LED** should light up, as shown below: .. figure:: /_asset/sw_yocto_flash_g700_evk-led.jpg :align: center :width: 40% * Find the **Micro USB D/L** port (micro USB) on |G510-G700-EVK-REF-BOARD|, and connect it to host PC with a micro USB cable: .. figure:: /_asset/sw_yocto_flash_g700_evk-micro-usb.jpg :align: center :width: 40% Make sure you connect to the **Micro USB D/L** port of the board, rather than the USB-C **USB-C PD** port. **USB download only works on the Micro USB D/L port.** .. note:: The EVK board would power on when the Micro USB D/L port is connected, regardless of the state of the auto power on jumper pin **J3001**. Step 2. Launch genio-flash Tool =============================== Change working directory to the image directory. If you built ``rity-demo-image`` from source, the image is default in: .. prompt:: bash $ auto $ cd $BUILD_DIR/tmp/deploy/images/genio-700-evk If you are using a pre-built image, please change to the directory that you've unarchved the pre-built image. It should contain a ``partitions.json`` file. After switching into the image directory, run following command: .. prompt:: bash $ auto $ genio-flash --load-dtbo gpu-mali.dtbo --load-dtbo apusys.dtbo --load-dtbo video.dtbo By default ``genio-flash`` will use the prefix ``rity-demo-image`` to search for files under image directory. If you are building other images, use ``-i`` option to specify different prefix. For example: .. prompt:: bash $ auto $ cd $BUILD_DIR/tmp/deploy/images/genio-700-evk $ genio-flash -i rity-bringup-image --load-dtbo gpu-mali.dtbo --load-dtbo apusys.dtbo --load-dtbo video.dtbo .. note:: Make sure you load the ``gpu-mali.dtbo``, ``apusys.dtbo``, and ``video.dtbo``. GPU, APU and video codec does not work if you omitting these overlays. ``genio-flash`` should print logs to the terminal similar to this: .. prompt:: bash $ auto AIoT Tools: Yocto Image: name: Rity Demo Image (rity-demo-image) distro: Rity Demo Layer (rity-demo) codename: kirkstone machine: genio-700-evk overlays: ['gpu-mali.dtbo', 'apusys.dtbo', 'video.dtbo'] Looking for MediaTek SoC matching USB device 0e8d:0003 The ```` and ```` strings change according to the tool version and IoT Yocto version. Once you see line ``Looking for MediaTek SoC matching USB device 0e8d:0003`` prompt, proceed to the next step. .. _enter-download-mode-g700-evk: Step 3. Enter Download Mode =========================== Locate the push buttons on the board: .. figure:: /_asset/sw_yocto_flash_g700_dl-buttons.jpg :align: center :width: 640 Follow these steps to enter download mode: 1. Press and keep pressing the **Download** button. 2. Press and release the **RST** button. 3. Hold the **Download** button until you see the log ``Erasing 'mmc0'`` message, as shown below: .. code-block:: text Looking for MediaTek SoC matching USB device 0e8d:0003 Opening COM33 using baudate=115200 Connected to MediaTek MT8188 SoC Sending bootstrap to address: 0x201000 Jumping to bootstrap at address 0x201000 in AArch64 mode erasing mmc0 < waiting for any device > Erasing 'mmc0' (bootloader) request sz: 0xe8f800000, real erase len: 0x0 OKAY [ 1.046s] and then you can release the **Download** button.