Renesas
RZ/V AI

3.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/V2H EVK Getting Started



This page explains how to start-up the AI SDK on the RZ/V2H Evaluation Board Kit.
Supported version: RZ/V2H AI SDK v3.00
Terminology


Getting Started Flow

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

Introduction

RZ/V2H EVK

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

MIPI camera module is not included in EVK.
As an input device, AI Applications support USB camera with VGA (640x480) resolution.
To use MIPI camera, please refer to e-CAM22_CURZH camera provided by e-con Systems.
e-CAM22_CURZH camera supports FHD (1920x1080) resolution.

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

Equipment Details
RZ/V2H Evaluation Board Evaluation board itself.



Step 7: Deploy AI Application

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


To boot the board, bootloader and other Linux necessary files are required.
Following bootloader is available on RZ/V2H AI SDK.
  • eSD Bootloader: The board boots up using the bootloader written on microSD card.
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

1. Setup RZ/V2H EVK

microSD card needs to contain bootloaders, the Linux kernel and root filesystem to boot-up the board.
RZ/V2H AI SDK supports the WIC format for SD card image.
You can use Linux PC to write the SD card image into microSD card with 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).
Note The size of WIC format SD card image is 4GB.
If you would like to expand the SD card image size, please build the RZ/V2H AI SDK Source Code according to Appendix 2 in How to Build RZ/V2H AI SDK.
  1. Install Necessary Software
  2. As explained in Necessary Software of Getting Started Step 2, make sure that bmap-tools is installed on Linux PC.
    If you have not installed the bmap-tools, install it using following command on Host PC (Not in the docker container).
    sudo apt install bmap-tools

  3. Write the Linux files to SD card
  4. Run the below command to decompress ${WORK}/board_setup/eSD.zip.
    cd ${WORK}/board_setup
    unzip eSD.zip
    Following files are necessary.
    They are in the ${WORK}/board_setup/eSD directory.

    File Description
    core-image-weston-rzv2h-evk-ver1.wic.bmap SD card image
    core-image-weston-rzv2h-evk-ver1.wic.gz
    Follow the instruction below to prepare the microSD card.
    Warning Here, we use "/dev/sdb" as microSD card device name.
    1. To use bmaptools, microSD card partitions must be unmounted.
      Run the following command to check the automatically mounted microSD card partitions.
      df -h
    2. Check the output and find the mount point, which is "/media/user/9016-4EF8" in the following example.
      Filesystem      Size  Used Avail Use% Mounted on
      :
      snip
      :
      /dev/sdb1        15G   32K   15G   1% /media/user/9016-4EF8
      Warning Here, we use "/dev/sdb" as microSD card device name.
    3. Unmount the automatically mounted partitions.
      sudo umount /media/user/9016-4EF8
      Note If there are more than one partitions on microSD card, unmount all partitions.
    4. Run the following command to write SD card image.
      cd ${WORK}/board_setup/eSD
      sudo bmaptool copy --bmap core-image-weston-rzv2h-evk-ver1.wic.bmap core-image-weston-rzv2h-evk-ver1.wic.gz /dev/sdb
      Warning Change /dev/sdb to your microSD card device name.
    5. Eject microSD card and insert it again to mount the partitions.

    6. Run the following command to check two partitions are created on microSD card.
      df -h
      • If the command shows following log, two partitions are created on microSD card successfully.
        Filesystem      Size  Used Avail Use% Mounted on
        :
        snip
        :
        /dev/sdb1        17M  3.0M   14M  18% /media/user/bootloaderf
        /dev/sdb2       3.8G  1.6G  2.0G  45% /media/user/root
        Warning Here, we use "/dev/sdb" as microSD card device name.
    7. Run the following commands to setup the partition 2, which is the root filesystem of the board.
      sudo mkdir /mnt/sd -p
      sudo mount /dev/sdb2 /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.

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/V2H 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.
    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 

  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/V2H EVK

This section explains how to boot the RZ/V2H EVK.

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

  2. Change DSW1 and DSW2 setting as shown in the figure.

  3. Connect the USB mouse and USB keyboard and USB camera via USB hub.
    Note There are USB 2.0 port and USB 3.0 port on RZ/V2H EVK.
    Please connect your USB camera to appropriate port according to its requirement.
    Here, USB camera is connected to USB 2.0 via USB hub.

  4. Connect the HDMI monitor to the Board.

  5. Connect the power cable to the Board.

  6. Turn the SW3 to ON.

  7. Turn the SW2 to ON to power 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/V2H 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 A4. Shutdown RZ/V2H EVK



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

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