Renesas RZ/V2M Startup Manual
Hide thumbs Also See for RZ/V2M:

Advertisement

Quick Links

RZ/V2M Linux Package
Start-Up Guide
RZ/V2M
All information contained in these materials, including products and product specifications,
represents information on the product at the time of publication and is subject to change by
Renesas Electronics Corp. without notice. Please review the latest information published by
Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
website (http://www.renesas.com).
www.renesas.com
Rev.1.10 Oct 2021

Advertisement

Table of Contents
loading

Summary of Contents for Renesas RZ/V2M

  • Page 1 All information contained in these materials, including products and product specifications, represents information on the product at the time of publication and is subject to change by Renesas Electronics Corp. without notice. Please review the latest information published by Renesas Electronics Corp. through various means, including the Renesas Electronics Corp.
  • Page 2 Renesas Electronics disclaims any and all liability for any damages or losses incurred by you or any third parties arising from the use of any Renesas Electronics product that is inconsistent with any Renesas Electronics data sheet, user’s manual or other Renesas Electronics document.
  • Page 3 Unit Products The following usage notes are applicable to all Microprocessing unit and Microcontroller unit products from Renesas. For detailed usage notes on the products covered by this document, refer to the relevant sections of the document as well as any technical updates that have been issued for the products.
  • Page 4 This document provides users with an understanding of the information to develop software for the RZ/VM2 microprocessor. It is intended for users to develop software incorporating the RZ/V2M microprocessor. To use this document, you need basic knowledge of software development and Linux systems.
  • Page 5 2. List of Abbreviations and Acronyms Abbreviation Full form Board support package Character user interface Clock serial interface Direct memory access EHCI Enhanced Host Controller Interface eMMC Embedded multimedia card Graphical user interface GPIO General peripheral input output Inter-integrated circuit OHCI Open Host Controller Interface PCIe...
  • Page 6: Table Of Contents

    Table of Contents Introduction ........................1 RZ/V2M Linux BSP Package files......................1 Environmental Requirement ........................1 Building Instructions ...................... 3 Preparations ......................... 6 SD Card Setting ............................6 3.1.1 Files for SD card booting ........................6 3.1.2 Prepare for booting from SD Card ......................6 3.1.3...
  • Page 7: Introduction

    How to create a software development kit (SDK) This RZ/V2M Yocto recipe is a basic package to operate built-in Linux and software on the RZ/V2M Evaluation Kit. Please contact your Renesas representatives if you have any questions about this package.
  • Page 8 Details RZ/V2M Evaluation Kit Evaluation kit for RZ/V2M. RZ/V2M Board (Main) Target board. Main functional components for RZ/V2M are mounted on this board. Note that the boot loader and U-Boot images are pre-written to the eMMC (THGBMJG7C1LBAIL). RZ/V2M Base Board Connected to CN12 and CN 13 on the RZ/V2M Board.
  • Page 9: Building Instructions

    The BSP in this package is built by using Yocto Project. Follow the steps below in the working directory ${WORK} on Linux PC. The file system made by the following instruction is the one for testing the current BSP package in Renesas. Note that Renesas has not verified with any other build configuration or modified recipes.
  • Page 10 Run the bitbake command to build a core image for the target. Table 2-1 shows the supporting core image targets. Note: For a user of RZ/V2M DRP-AI Support Package or RZ/V2M ISP Support Package, apply all necessary recipes required for the build environments for these packages before executing bitbake commands.
  • Page 11 RZ/V2M Linux Package Start-Up Guide 2. Building Instructions Table 2-2. Generated files Generated files File name File stored path Device tree file r9a09g011gbg-evaluation-board.dtb ${WORK}/build/tmp/deploy/images/rzv2m Linux kernel image Image rootfs core-image-bsp-rzv2m.tar.bz2 1st loader binary loader_1st_128kb.bin Boot parameter for 2nd loader loader_2nd.bin 2nd loader binary loader_2nd_param.bin...
  • Page 12: Preparations

    Note that the booting is from an SD card in the following procedure. For eMMC booting, refer to 8.2 eMMC Boot. SD Card Setting To boot from the SD card, mount a micro-SD card and extract image files to the memory on the RZ/V2M Evaluation Kit. Here explains how to boot from the SD card. 3.1.1 Files for SD card booting The files for booting from the SD card are as follows.
  • Page 13 RZ/V2M Linux Package Start-Up Guide 3. Preparation renesas@renesas:~$ sudo fdisk /dev/sdb Welcome to fdisk (util-linux 2.27.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): Created a new DOS disklabel with disk identifier 0x412fc34f.
  • Page 14 RZ/V2M Linux Package Start-Up Guide 3. Preparation Device Boot Start Sectors Size Id Type /dev/sdb1 2048 264191 262144 128M 83 Linux /dev/sdb2 264192 30199807 29935616 14.3G 83 Linux renesas@renesas:~$ sudo mkfs.vfat -F 32 /dev/sdb1 mkfs.fat 3.0.28 (2015-05-16) renesas@renesas:~$ sudo mkfs.ext3 -L rootfs /dev/sdb2 mke2fs 1.42.13 (17-May-2015)
  • Page 15: Set U-Boot Environment Variables

    (Tera Term) on Windows PC. Refer to 3.2.2 Terminal software setting and set up the terminal software. After this setting, power on the RZ/V2M Evaluation Kit and U-Boot will start. When starting the countdown on the console, press Enter to move U-Boot command mode. Send the following command to set the environment variables of U-Boot to boot from the SD card.
  • Page 16: Board Setting

    RZ/V2M Linux Package Start-Up Guide 3. Preparation Board Setting 3.2.1 Switch Confirm the switch setting shown in the red frame shown below. SW1 (Base) SW2 (Main) Normal mode Debug Mode Figure 3-1. Switch location and setting Table 3-2. SW2(Main) setting...
  • Page 17: Terminal Software Setting

    RZ/V2M Linux Package Start-Up Guide 3. Preparation 3.2.2 Terminal software setting Connect a serial to micro-USB cable to Windows PC shown below. Socket (Main CN5) Figure 3-2. Serial to micro-USB cable connection Two serial ports are detected on the PC after injecting the cable.
  • Page 18: Insert A Micro-Sd

    (Main CN6) Figure 3-5. micro-SD card slot Note: The booting data should be written to the SD card beforehand to run the SD card booting on the RZ/V2M Evaluation Kit. R01US0527EJ0110 Rev.1.10 Page 12 of 39...
  • Page 19: Leds

    RZ/V2M Linux Package Start-Up Guide 3. Preparation 3.2.4 LEDs In this package, LEDs shown in the following figure are used to know the status of Linux (power on or shutdown). LED3 (Main) LED1 (Base) LED2 (Base) Figure 3-6. LEDs R01US0527EJ0110 Rev.1.10 Page 13 of 39 Oct.8.2021...
  • Page 20: Boot Loader, U-Boot (Loader Binaries)

    Boot. Boot loader and U-Boot Images The boot loader and U-Boot binaries are stored in the eMMC on RZ/V2M in advance. The bootloader and U- Boot will be booted after powering on the RZ/V2M Evaluation Kit. The following table lists the address information stored in the eMMC on RZ/V2M.
  • Page 21 4. Boot Loader, U-Boot Step 3. Start U-Boot Power on the RZ/V2M Evaluation Kit and start U-Boot. After a few seconds, U-Boot will count down. Press the enter key to enter U-Boot command mode during this count down. Note: Before connecting the AC adapter to an electrical outlet, make sure that the SW1 (Base) for the power supply is turned off.
  • Page 22 RZ/V2M Linux Package Start-Up Guide 4. Boot Loader, U-Boot This message will appear when the writing process is completed. Figure 4-3. Writing process complete image If the above message does not appear, this writing process has uncompleted. Check the error message in the log file and take appropriate action according to the error message.
  • Page 23 RZ/V2M Linux Package Start-Up Guide 4. Boot Loader, U-Boot Case of eMMC Writes Succeed The following log shows the case of successful writing of the loader files to the eMMC. echo eMMC_writer script Version 1.1.0 rev 1 eMMC_writer script Version 1.1.0 rev 1 =>...
  • Page 24 RZ/V2M Linux Package Start-Up Guide 4. Boot Loader, U-Boot => ======== CRC check of U-boot ======== crc32 41140200 7f179 crc32 for 41140200 ... 411bf378 ==> 173c8549 => ======== Switch to eMMC Boot Partition 0 ======== mmc dev 1 1 switch to partitions #1, OK mmc1(part 1) is current device =>...
  • Page 25 RZ/V2M Linux Package Start-Up Guide 4. Boot Loader, U-Boot MMC erase: dev # 1, block # 0, count 1024 ... 1024 blocks erased: OK => mmc erase 400 400 MMC erase: dev # 1, block # 1024, count 1024 ... 1024 blocks erased: OK =>...
  • Page 26 RZ/V2M Linux Package Start-Up Guide 4. Boot Loader, U-Boot => ======== Read 2nd loader param to eMMC ======== mmc read 42030000 100 1 MMC read: dev # 1, block # 256, count 1 ... 1 blocks read: OK => ======== Read 2nd loader to eMMC ======== mmc read 42030200 101 300 MMC read: dev # 1, block # 257, count 768 ...
  • Page 27 CRC error u-boot.bin is CRC error switch to partitions 1 error Failed to switch the partition in eMMC. Check whether the eMMC board is connected to RZ/V2M Evaluation Kit. MMC read error Failed to data load from eMMC. Check whether the eMMC board is connected to RZ/V2M Evaluation Kit.
  • Page 28 After executing rdk_shutdown, confirm LED2 (Base) and LED3 (Main) are turned off. Check the LED2 (Base) and LED3 (Main) and turn off the power switch SW1(Base) on the RZ/V2M Evaluation Kit. Note: Be sure to follow the steps correctly when shut down the system.
  • Page 29: Run-On The Board

    5. Run-on the Board 5. Run-on the Board This chapter explains how to set up the RZ/V2M Evaluation Kit and run the system. Power on the board Before connecting the AC adapter to an electrical outlet, make sure that the SW1 (Base) for the power supply is turned off.
  • Page 30: Shutdown The Board

    RZ/V2M Linux Package Start-Up Guide 5. Run-on the Board Shutdown the Board To power down the system, follow the step below. Step 1. Run shutdown command Enter the command “rdk_shutdown” on the console. root@rzv2m:~# rdk_shutdown Note: Run this command during the power-off sequence on rootfs.
  • Page 31: Exporting Toolchains

    2. You may reuse ${WORK}/build while using the same configuration after executing bitbake shown as in section 2 for this purpose. 2. If you use RZ/V2M DRP-AI Support Package or RZ/V2M ISP Support Package, deploy them before building SDK. Refer to each package’s document for the detail to apply each application to SDK.
  • Page 32: Flash Writer

    7. Flash Writer Flash writer provided in this package is the software for writing loader binaries to the eMMC on the RZ/V2M Evaluation Kit via your PC. If the loader binaries have already been written to the eMMC, update to the latest version according to Chapter 4.
  • Page 33: Write Loader Binaries To Emmc

    Step 1. Equipment settings Run the following commands and install essential host packages on your build machine. Connect your Windows PC and RZ/V2M Evaluation Kit with a serial to micro-USB cable as shown in Figure 7-1. Start the terminal software on your PC. The setting of the terminal software is shown in Table 7-2.
  • Page 34 Step 2. Write the flash writer to eMMC Start RZ/V2M in the forced write mode and write the Flash writer binary to the eMMC as the following steps. Note that refer to "RZ/V2M User’s Manual: Hardware” about the forced write mode for details.
  • Page 35 RZ/V2M Linux Package Start-Up Guide 7. Flash Writer Step 4. Write loader binaries to eMMC with Flash writer Enter each command in red for Flash writer on the terminal software(Tera Term) on Windows PC. Erase the data of boot partition 1. Run the command EM_E as follows.
  • Page 36 RZ/V2M Linux Package Start-Up Guide 7. Flash Writer >EM_WB EM_WB Start -------------- --------------------------------------------------------- Please select,eMMC Partition Area. 0:User Partition Area : 15388672 KBytes eMMC Sector Cnt : H'0 - H'01D59FFF 1:Boot Partition 1 : 4096 KBytes eMMC Sector Cnt : H'0 - H'00001FFF...
  • Page 37 RZ/V2M Linux Package Start-Up Guide 7. Flash Writer eMMC Sector Cnt : H'0 - H'00001FFF 2:Boot Partition 2 : 4096 KBytes eMMC Sector Cnt : H'0 - H'00001FFF --------------------------------------------------------- Select area(0-2)>1 -- Boot Partition 1 Program ----------------------------- *Input in hexadecimal...
  • Page 38 RZ/V2M Linux Package Start-Up Guide 7. Flash Writer -- Boot Partition 1 Program ----------------------------- Please Input Start Address in sector :902 Work RAM(H'B6000000-H'B60FFFFF) Clear..Please Input File size(byte) : 7F179 please send binary file! <Send “u-boot.bin”> SAVE -FLASH..EM_WB Complete! [How to send files by Tera term] 1.
  • Page 39 Check this box. Figure 7-5. Send files by Tera Term Power off the RZ/V2M Evaluation Kit. Step 5. Confirm booting by the boot loader and U-boot Confirm that the loader binaries are written to eMMC normally by checking the operation of the boot loader and U-boot.
  • Page 40: Appendix

    Building Instructions 8.1.1 Offline build Obtain OSS packages for RZ/V2M Linux Package from your Renesas representatives before stepping instructions below. OSS packages should be stored in the directory “${WORK}/build”. Before starting this procedure, follow the steps from Step 1 to Step 5 described in Chapter 2.
  • Page 41: Boot Loader And U-Boot

    RZ/V2M Linux Package Start-Up Guide 8. Appendix 8.1.2 Boot loader and U-Boot Before building loader binaries, follow the steps from Step 1 to Step 5 described in Chapter 2. After that, run the following commands to build boot loader and U-Boot.
  • Page 42: Emmc Boot

    Details RZ/V2M Evaluation Kit Evaluation kit for RZ/V2M. RZ/V2M Board (Main) Target board. Main functional components for RZ/V2M are mounted on this board. Note that the boot loader and U-Boot images are pre-written to the eMMC (THGBMJG7C1LBAIL). RZ/V2M Base Board Connected to CN12 and CN 13 on the RZ/V2M Board.
  • Page 43: Emmc Booting Procedure

    RZ/V2M Linux Package Start-Up Guide 8. Appendix 8.2.2 eMMC booting procedure Step 1. Run bitbake Run bitbake following the description in 2. Building Instructions. Step 2. Store required files for eMMC boot to an SD card. Prepare an SD card for SD card boot. *Refer to 3.1 SD Card Setting for this procedure.
  • Page 44 RZ/V2M Linux Package Start-Up Guide 8. Appendix Enter> Created a new partition 2 of type 'Linux' and of size 14.6 GiB. Command (m for help): The partition table has been altered. Calling ioctl() to re-read partition table. Syncing disks. Step 4. Confirm eMMC partitions Confirm eMMC partition information by the following commands.
  • Page 45 RZ/V2M Linux Package Start-Up Guide 8. Appendix Write the kernel image, device tree, and RTOS image files to the 1st partition of eMMC as follows. root@rzv2m:~# dd if=eMMC_Image/Image of=/mnt/image/Image root@rzv2m:~# dd if=eMMC_Image/r9a09g011gbg-evaluation-board.dtb of=/mnt/image/r9a09g011gbg-evaluation-board.dtb Mount the 2nd partition (ext3 area) of eMMC as follows.
  • Page 46 Revision History RZ/V2M Linux Package Start-Up Guide Rev. Date Description Page Summary ⎯ 1.00 Jun.30.2021 First edition issued. 1.10 Oct.8.2021 3. Preparations Added the notice about eMMC boot in the head of this page. Table 4-1. Boot loader data stored in the eMMC Updated the file sizes of loader_2nd.bin and u-boot.bin for Version 1.1.0.
  • Page 47 RZ/V2M Linux Package Start-Up Guide Publication Date: Rev.1.10 Oct.8.2021 Published by: Renesas Electronics Corporation...
  • Page 48 RZ/V2M Linux Package Start-Up Guide R01US0528EJ0110...

Table of Contents