Renesas
RZ/V AI

4.00

The best solution for
starting your AI applications.

Provided by Renesas Electronics Corporation




To keep you updated,
Watch our GitHub repository
Watch



This project is maintained by renesas-rz

Hosted on GitHub Pages — Theme by orderedlist

RZ/V2L EVK Getting Started



This page explains how to start-up the AI SDK on the RZ/V2L Evaluation Board Kit.
Supported version: RZ/V2L AI SDK v2.10
Terminology


Getting Started Flow

This page explains RZ/V2L EVK dependent instructions.
Common instructions are explained in Getting Started page.
flow

Introduction

RZ/V2L EVK

The RZ/V2L EVK is the ideal board kit for RZ/V2L evaluation.

Since MIPI camera module is included, you can start evaluating RZ/V2L immediately by building an environment.

board
Following items are included in the RZ/V2L EVK.

Equipment Details
RZ/V2L Evaluation Board Evaluation board itself.
MIPI Camera Module Google Coral Camera.
Note that the CMOS sensor (OV5645) in the camera is no longer available, and should not be used for mass production.
Any software support provided is for evaluation purposes only.
MicroUSB to Serial Cable For serial communication between PC and the board.



Step 7: Deploy AI Application

This section explains how to deploy the AI Application to the RZ/V2L EVK.


To boot the board, bootloader and other Linux necessary files are required.
There are two types of bootloader available on RZ/V2L AI SDK.
  • eSD Bootloader: The board boots up using the bootloader written on microSD card.
  • eMMC Bootloader: The board boots up using the bootloader written in eMMC on the board.
Other necessary files, i.e. Linux kernel and root filesystem, are stored on microSD card.
You can use Linux PC to format the microSD card and expand the kernel and the root filesystem using SD card reader.
docker

Preparation

Click the button This step contains both eSD and eMMC Bootloader explanation.
Please click the button below to update the explanation according to your bootloader interface.
eSD Bootloader eMMC Bootloader
For eSD eSD explanation will be shown in this style if you click "eSD Bootloader" button above.
For eMMC eMMC explanation will be shown in this style if you click "eMMC Bootloader" button above.

1. Setup RZ/V2L EVK

For eSD microSD card needs to contain bootloaders, the Linux kernel and root filesystem to boot-up the board.
You can use Linux PC to format the microSD card and expand the kernel and the root filesystem using SD card reader.
Note This step is required only when starting the AI SDK or when using the new version of AI SDK.
If you have already setup the microSD card with the latest bootloader, Linux kernel, Linux device tree file and root filesystem, skip this step and proceed to the next procedure (2. Deploy Application to the Board).
For eMMC microSD card needs to contain the Linux kernel and root filesystem to boot-up the board.
You can use Linux PC to format the microSD card and expand the kernel and the root filesystem using SD card reader.
Bootloaders must be written in eMMC on the board. You can use Windows PC to write the bootloaders on eMMC.
Note This step is required only when starting the AI SDK or when using the new version of AI SDK.
If you have already setup the microSD card and the bootloader written in eMMC on the board, skip this step and proceed to the next procedure (2. Deploy Application to the Board).
  1. Format SD card
  2. Create the following partitions on microSD card according to Appendix: A2. Format SD card.
    For eSD
    Type/Number Size Type of Filesystem Contents
    Primary #1 500MB (minimum 128MB) Ext4 Linux kernel
    Device tree
    Primary #2 All remaining Ext4 Root filesystem
    For eMMC
    Type/Number Size Type of Filesystem Contents
    Primary #1 500MB (minimum 128MB) FAT32 Linux kernel
    Device tree
    Primary #2 All remaining Ext4 Root filesystem

  3. Write the Linux files to SD card
  4. For eSD At first, run the below command to decompress ${WORK}/board_setup/eSD.zip.
    cd ${WORK}/board_setup
    unzip eSD.zip
    Following three files are necessary, which must be placed on each partitions on microSD card.
    They are in the ${WORK}/board_setup/eSD directory.

    File Description microSD card partition
    Image-smarc-rzv2l.bin Linux kernel image
    (The boot program)
    Partition 1
    Image-r9a07g054l2-smarc.dtb Linux device tree file
    (The configuration file for booting)
    Partition 1
    core-image-weston-smarc-rzv2l.tar.bz2 Linux Root filesystem Partition 2
    Follow the instruction below to prepare the microSD card.
    Warning Here, we use "/dev/sdb" as microSD card device name.
    1. Check if the two partitions are created successfully by running df command.
      df -h
      Filesystem 	Size		Used	Avail	Use %	Mounted on	
      …		…		…	…	…	…
      /dev/sdb1		…		…	…	…	…	
      /dev/sdb2		…		…	…	…	…	
      Warning Device name of microSD card, /dev/sdb may differ depending on your environment.

    2. Run the following commands to setup the partition 1.
      sudo mkdir -p /mnt/sd
      sudo mount /dev/sdb1 /mnt/sd
      sudo cp $WORK/board_setup/eSD/Image-smarc-rzv2l.bin /mnt/sd
      sudo cp $WORK/board_setup/eSD/Image-r9a07g054l2-smarc.dtb /mnt/sd
      sync
      sudo umount /mnt/sd
      Warning Change /dev/sdb to your microSD card device name.
    3. Run the following commands to setup the partition 2, which is the root filesystem of the board.
      sudo mount /dev/sdb2 /mnt/sd
      sudo tar xfj $WORK/board_setup/eSD/core-image-weston-smarc-rzv2l.tar.bz2 -C /mnt/sd
      sudo cp $WORK/ai_sdk_setup/data/libtvm_runtime.so /mnt/sd/usr/lib64
      sync
      sudo umount /mnt/sd
      Warning Change /dev/sdb to your microSD card device name.
    For eMMC Following three files are necessary, which must be placed on each partitions on microSD card.
    They are in the ${WORK}/board_setup/eMMC directory.

    File Description microSD card partition
    Image-smarc-rzv2l.bin Linux kernel image
    (The boot program)
    Partition 1
    Image-r9a07g054l2-smarc.dtb Linux device tree file
    (The configuration file for booting)
    Partition 1
    core-image-weston-smarc-rzv2l.tar.bz2 Linux Root filesystem Partition 2
    1. Run the below command to decompress ${WORK}/board_setup/eMMC.zip.
      cd ${WORK}/board_setup
      unzip eMMC.zip
    2. Insert the microSD card to Linux PC.

    3. Check if the two partitions are created successfully by running df command.
      df -h
      Filesystem 	Size		Used	Avail	Use %	Mounted on	
      …		…		…	…	…	…
      /dev/sdb1		…		…	…	…	…	
      /dev/sdb2		…		…	…	…	…	
      Warning Device name of microSD card, /dev/sdb, may differ depending on your environment.

    4. Run the following commands to setup the partition 1.
      sudo mkdir -p /mnt/sd
      sudo mount /dev/sdb1 /mnt/sd
      sudo cp $WORK/board_setup/eMMC/Image-smarc-rzv2l.bin /mnt/sd
      sudo cp $WORK/board_setup/eMMC/Image-r9a07g054l2-smarc.dtb /mnt/sd
      sync
      sudo umount /mnt/sd
      Warning Change /dev/sdb, to your microSD card device name.

    5. Run the following commands to setup the partition 2, which is the root filesystem of the board.
      sudo mount /dev/sdb2 /mnt/sd
      sudo tar xfj $WORK/board_setup/eMMC/core-image-weston-smarc-rzv2l.tar.bz2 -C /mnt/sd
      sudo cp $WORK/ai_sdk_setup/data/libtvm_runtime.so /mnt/sd/usr/lib64
      sync
      sudo umount /mnt/sd
      Warning Change /dev/sdb, to your microSD card device name.

      Note If you would like to eject the microSD card, please run following command and remove the microSD card from Linux PC.
      sudo eject /dev/sdb
      Warning Change /dev/sdb to your microSD card device name.
  5. Write the bootloaders to SD card Write the bootloaders to eMMC
  6. For eSD Before booting up the board, you must write the latest bootloaders to microSD card.
    This procedures needs to be done only once as long as you use the same version of AI SDK.

    There are three files in ${WORK}/board_setup/eSD/bootloader to boot up the board.
    • bl2_bp_esd-smarc-rzv2l_pmic.bin
    • bl2_bp-smarc-rzv2l_pmic.srec
    • fip-smarc-rzv2l_pmic.srec

    Run the following commands to write these files to the microSD card to boot for eSD.
    cd ${WORK}/board_setup/eSD/bootloader
    sudo dd if=bl2_bp_esd-smarc-rzv2l_pmic.bin of=/dev/sdb seek=1 count=1
    sudo dd if=bl2-smarc-rzv2l_pmic.bin of=/dev/sdb seek=8
    sudo dd if=fip-smarc-rzv2l_pmic.bin of=/dev/sdb seek=128
    sync
    Warning Change /dev/sdb, to your microSD card device name.

    Note If you would like to eject the microSD card, please run following command and remove the microSD card from Linux PC.
    sudo eject /dev/sdb
    Warning Change /dev/sdb to your microSD card device name.
    For eMMC Please write the bootloaders to eMMC on the board according to Appendix: A1.Setup for eMMC Bootloader.

2. Deploy Application to the Board

This section explains how to copy the application binary created in Step 6 to the board.
Users are expected to have finished the instructions in Setup RZ/V2L EVK in Step 7-1.

  1. Insert the microSD card to Linux PC.

  2. Run the following command to mount the partition 2, which contains the root filesystem.
    sudo mount /dev/sdb2 /mnt/sd
    Warning Change /dev/sdb to your microSD card device name.
  3. Create the application directory on root filesystem.
    sudo mkdir /mnt/sd/home/root/tvm
    Note Directory name tvm can be determined by user.
  4. Copy the necessary files in execution environment.
    Select the appropriate option below based on the application type explained in Building instructions in Step 6.

    Option 1: <Application 1>

    Check the README.md document provided in application directory and follow the instruction in the chapter called "Application: Deploy Stage" (or similar) to deploy the application.

    Example:
    In R01_object_detection application, follow the instruction in here to find files to be copied.

    Use the following command to copy the files to root filesystem.

    sudo cp $WORK/ai_sdk_setup/data/<Path to target file>/<filename> /mnt/sd/home/root/tvm 

    Option 2: <Application 2>

    Run the following command to copy the whole repository to the root filesystem.

    sudo cp $WORK/ai_sdk_setup/data/<Path to repository>/RZV2L_AiLibrary /mnt/sd/home/root/tvm -r
  5. Run the following command to sync the data with memory.
    sync 
  6. Run the following command to unmount the partition 2.
    sudo umount /mnt/sd
  7. Eject the microSD card by running the following command and remove the microSD card from Linux PC.
    sudo eject /dev/sdb
    Warning Change /dev/sdb to your microSD card device name.

3. Boot RZ/V2L EVK

This section explains how to boot the RZ/V2L EVK.
eSD Bootloader eMMC Bootloader

Follow the instruction below to boot the board.
For eSD
  1. Insert the microSD card to the Board.
    Note Use the microSD card slot CN3 as shown in the figure.

  2. Change SW1 and SW11 setting as shown in the figure.

  3. Connect the USB mouse and USB keyboard via USB hub.

  4. Connect the Google Coral camera to the Board.

  5. Connect the HDMI monitor to the Board.

  6. Connect the power cable to the Board.

  7. Press power button for 1 second to turn on the board.
boot
  1. After the boot-up, following screen will be displayed on HDMI monitor.
wayland
  1. Click the icon at the top-left corner to open the terminal.
wayland
For eMMC
Note After bootloader is written and U-boot setting is changed, terminal emulator is no longer needed.
Users can detach the serial port connection.
  1. Insert the microSD card to the Board.
    Note Use the microSD card slot CN10 as shown in the figure.

  2. Change SW1 and SW11 setting as shown in the figure.

  3. Connect the USB mouse and USB keyboard via USB hub.

  4. Connect the Google Coral camera to the Board.

  5. Connect the HDMI monitor to the Board.

  6. Connect the power cable to the Board.

  7. Press power button for 1 second to turn on the board.
boot
  1. After the boot-up, following screen will be displayed on HDMI monitor.
wayland
  1. Click the icon at the top-left corner to open the terminal.
wayland
After the boot up, please go back to Getting Started Step 8 or proceed directly to RZ/V2L EVK Getting Started Step 8.

Step 8: Run AI Application

  1. Follow the instructions explained in the document (README.md) of applications on GitHub.

    Example:
    For R01_object_detection application, follow the instruction here to run the application.
    If you have successfully run the application, you will see following window on HDMI screen.

    object_detection

Note To shutdown the board safely, please refer to A3. Shutdown RZ/V2L EVK



This is the end of RZ/V2L EVK Getting Started.

To see what comes next, please refer to the Getting Started Ending.