RZ-V/RZ-V2L SMARC: Difference between revisions

From Renesas.info
m (fixed typo)
(โ†’โ€ŽGetting Started: updated script for VLP 3.0.5)
ย 
(116 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:RZ/V2L SMARC Board by Renesas}}
{{DISPLAYTITLE:RZ/V2L SMARC Board by Renesas}}
<img height="200" style="float:right" src=http://linuxgizmos.com/files/renesas_rzg2l_carrier.jpg>
[[File:image 2022-10-31 201234042.png|right|439x439px]]
โ† [[RZ-V]]


= General Information =
= General Information =


* [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzv2l-general-purpose-microprocessor-equipped-renesas-original-ai-dedicated-accelerator-drp-ai-12ghz-dual Official RZ/V2L Website ]
* '''Official RZ/V2L Device Website'''
** [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzv2l-general-purpose-microprocessor-equipped-renesas-original-ai-dedicated-accelerator-drp-ai-12ghz-dual Product Page ]
** Please review the '''Documentation & Downloads''' section
** Please review the '''Documentation & Downloads''' section
* Board Documentation
* '''Evaluation Board Documentation'''
** https://www.renesas.com/rzv2l-evaluation-kit
** Since the RZ/V2L and RZ/G2L devices are pin compatible, the same evaluation board design is used for both.
** Since the RZ/V2L and RZ/G2L devices are pin compatible, the same evaluation board design is used for both.
* Linux Board Support Package Download
* '''Software Downloads'''
** Since December 24th 2021, the BSP is available for download at the official RZ/V2L Website. (Download access requires registration for a "MyRenesas" account.)
** Check "Software & Tool Pages" section on '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzv2l-general-purpose-microprocessor-equipped-renesas-original-ai-dedicated-accelerator-drp-ai-12ghz-dual on this page]'''
** RZ/V2L Linux Package
** Mali Graphic Library
** Video Codec Library
** RZ/V2L DRP-AI Support Package
** RZ/V2L ISP Support Package
** DRP-AI Translator
** RZ/V2L Cortex-M33 Multi-OS Package (optional)
* [https://renesasrulz.com/rz/m/rz_files/3478 RZ/V2L SMARC EVK gadget: simple Coral camera holder (3D model)]
* [https://renesasrulz.com/rz/m/rz_files/3478 RZ/V2L SMARC EVK gadget: simple Coral camera holder (3D model)]


Line 17: Line 25:
* [https://renesas.info/wiki/RZ-G/RZ-G2L_SMARC#Board_Setup_Information Board setup (button and switch) information]
* [https://renesas.info/wiki/RZ-G/RZ-G2L_SMARC#Board_Setup_Information Board setup (button and switch) information]
* Suggested [https://renesas.info/wiki/RZ-G/RZ-G2L_SMARC#LCD_Monitors LCD Monitors]
* Suggested [https://renesas.info/wiki/RZ-G/RZ-G2L_SMARC#LCD_Monitors LCD Monitors]
= RZ/V2L Boot Loaders Warning =
โš ๏ธ Warning.
The pre-loaded bootloaders (u-boot and ARM Trusted Firmware) on the RZ/V2L Evaluation Kit (SMARC board) are not up to date with the current BSP.
It is strongly recommended that the bootloaders generated when building the BSP described in the '''Startup Guide''' document that is distributed with the BSP Package.
Known issues with pre-loaded loaders.
* DRP Demos will prematurely exit.
* ISP Demos will prematurely exit.
* RZV2L Multi-OS CM33 Debug fails connection
= Available Demos =
== '''โญ''' Prebuilt Demo Images '''โญ''' ==
Renesas has prepared pre-built images available for download from renesas.com.<br>
[[File:image 2023-11-01 102816095.png|thumb]]
'''โญโญ''' '''RZ/V2L AI SDK Applications Demo SD Image'''
* Choice between USB Camera orย  MIPI-CSI Coral Camera
* Standalone demo requires HDMI LCD, USB keyboard and USB mouse.
* Recommended because easy setup.
* This is a '''complete SD Card image''' file that can be programmed using a Windows or Linux.
* https://www.renesas.com/us/en/document/sws/rzv2l-ai-applications-demo-sd-image-version-200
[[File:RZV2L DRP-AI Object Detection Demo.png|thumb]]
'''RZ/V2L DRP-AI Object Detection and Pose Estimation DEMO'''
* Uses MIPI-CSI Coral camera and external HDMI Display
* Recommended because easy setup
* This is a '''complete SD Card image''' file that can be programmed using a Windows or Linux.
* https://www.renesas.com/us/en/document/sws/rzv2l-drp-ai-object-detection-and-pose-estimation-demo
[[File:rzv2l-drp-ai-usb-camera-http-demo.png|thumb]]
'''RZ/V2L DRP-AI USB Camera HTTP Demo <font color=navy>SD Image</font> version'''
* Images are captured using a USB Camera and then processed using DRP-AI. The results are then sent over Ethernet to be viewed in a web browser.
* This is a '''complete SD Card image''' file that can be programmed using a Windows or Linux.
* https://www.renesas.com/us/en/document/sws/rzv2l-drp-ai-usbcamera-http-demo-sd-image-version
'''RZ/V2L DRP-AI USB Camera HTTP Demo <font color=navy>Pre-build</font> version'''
* Images are captured using a USB Camera and then processed using DRP-AI. The results are then sent over Ethernet to be viewed in a web browser.
* This package contains '''individual binary files''' that can be used to create an bootable SD Card.
* A '''Linux PC is required''' to format the SD Card, and then extract and copy the files to the correct location on the SD Card.
* https://www.renesas.com/us/en/document/sws/rzv2l-drp-ai-usbcamera-http-demo-pre-build-version
== DRP-AI Pretrained Applications ==
Please see the [[Pre-trained Free AI Application Libraries for RZ/V2L|DRP-AI Pretrained Models]] page for details about pretrained applications.
==DRP-AI Demos==
The RZV2L DRP-AI Demos can be found [[DRP-AI Demos|'''here''']].
These demos include pre-build applications, source code and documentation about the DRP-AI.
== Simple ISP Demos ==
Information about the RZV2L Simple ISP can be found '''[[RZ/V ISP|here]]'''.
These demos include pre-build applications, source code and documentation about the DRP-AI and ISP.
== Camera Data Receive Unit (CRU) Sample Application ==
* https://github.com/renesas-rz/rz_cru_sample_code
* This sample application demonstrates using CRU functions for various image processing tasks like demosaicing raw camera data, color correction, and some simple camera functions.
== GStreamer Application Note ==
* [https://www.renesas.com/us/en/document/mas/rzg2l-group-and-rzv2l-group-linux-interface-specification-gstreamer-users-manual-software?utm_nooverride=1&language=en RZ/G2L Group and RZ/V2L Group Linux Interface Specification GStreamer User's Manual]
* This User's Manual (Application Note) explains GStreamer and the custom plug-ins created by Renesas.
* Usage examples are also included.
= Getting Started =
= Getting Started =
'''1. Software BSP Components'''
'''๐Ÿ“„ Board User Manual'''ย 
<br>Up to 5 packages are used to build the BSP.
*The User Manual for the boards can be found their website pages on renesas.com.
*Check the 'General Information' section on this page for the links.
ย 
'''๐Ÿ“ฆ What is included in the kit'''
*A Micro USB cable for serial console.
ย 
'''๐Ÿ›’ What you will need to purchase'''
*'''Power:''' (Required) USB Type-C power supply. 5V or 9V can be used. To use 9V, switch SW11-4 change is needed (please see the board manual).
* '''HDMI LCD:''' An LCD monitor with an HMDI input. Here is a list of tested touchscreen monitors: [[RZ-G/RZ-G2L_SMARC#LCD_Monitors]]
* '''mini-HDMI Adapter:''' The connector on the board is type mini-HDMI.
*'''USB Camera:''' A camera supporting USB Video Class (UVC) such as Logitec C270, C920, C922, BRIO Ultra HD Pro.
* '''USB Mouse:''' In the case that you do not have a touchscreen LCD monitor.
ย 
'''๐Ÿ’ป Build Environment'''
<center><div style="padding: 2px; border: 2px solid maroon; margin: 0;">
<font size=+1>โš ๏ธ The BSP will only build in Ubuntu 20.04</font></div>
</center>
*To build the BSP, you will need a Linux PC running '''Ubuntu 20.04'''. This was the only host OS that was tested and that specific version is a requirement of Yocto 3.1 (dunfell). '''Using Ubuntu <font color=red>22.04</font> will not work'''
*You can use a Linux PC (recommended) or a Virtual Machine. If using a Virtual Machine, 200GB of hard drive space is recommended for the minimum build.
*If you are '''not currently running Ubuntu 20.04''', you can use a '''[https://www.docker.com/ docker container]'''.
** Example: Host Machine = Ubuntu 22.04 + Docker Container running Ubuntu 20.04 inside of it
* Some docker setup instructions and scripts are provided to make it easy to get started.
** https://github.com/renesas-rz/rzg2_bsp_scripts/tree/master/docker_setup
ย 
'''๐Ÿ’พ Downloading the Linux BSP'''
ย 
Up to 5 packages are used to build the BSP.


Please download from the [https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzv2l-general-purpose-microprocessor-equipped-renesas-original-ai-dedicated-accelerator-drp-ai-12ghz-dual Official RZ/V2L Website] :
Please download from the '''[https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-arm-based-high-end-32-64-bit-mpus/rzv2l-general-purpose-microprocessor-equipped-renesas-original-ai-dedicated-accelerator-drp-ai-12ghz-dual Official RZ/V2L Website]'''. Please look in the "Software Downloads" section.
* '''Linux BSP package''': <font color="blue">r01an6221ej<version>-rzv2l-linux.zip.</font> Unzip the contents and copy to a Linux PC.
*'''Mali Graphic Library package (*)''': <font color="blue">RTK0EF0045Z13001ZJ-v<version>_EN.zip</font> to enable graphs. Copy the ZIP file to a Linux PC.
*'''Video Codec Library package (*)''': <font color="blue">RTK0EF0045Z15001ZJ-v<version>_EN.zip</font>. Unzip the contents and copy to a Linux PC.
* '''DRP-AI Support package''': <font color="blue">r11an0549ej<version>-rzv2l-drpai-sp.zip</font>. Unzip the contents and copy to a Linux PC.
* '''RZ/V2L ISP Support package''' ("Simple ISP" by DRP-AI): <font color="blue">r11an0561ej<version>-rzv2l-isp-sp.zip.</font> Unzip the contents and copy to a Linux PC.


'''Links''' to all the downloads can be found on the '''[[RZ-G/RZ-G2 BSP|๐Ÿ“ฆ RZ/V2 Linux BSP]]''' on this site. Please refer to the sections that support RZ/V2L.


(*): The "Mali Graphics Library package" and the "Video codec Library package" are currently available as "evaluation version" only.
'''Copy''' all ZIP file to a Linux PC.


As the name indicates, the evaluation version should be used for evaluation purposes only. It contains a time limitation that stops the software after a few hours.
The evaluation versions contain a time limitation that stops the software after a few hours.


For unlimited runtime, please switch to the "production version".
* '''RZ/V Verified Linux Package''': <font color="navy">RTK0EF0045Z0024AZJ-<version>.zip.</font>
* '''RZ MPU Graphics Library Evaluation Version''': <font color="navy">RTK0EF0045Z13001ZJ-<version>_EN.zip</font>
* '''RZ MPU Video Codec Library Evaluation Version''': <font color="navy">RTK0EF0045Z15001ZJ-<version>_EN.zip</font>
* '''RZ/V2L DRP-AI Support Package''': <font color="navy">r11an0549ej<version>-rzv2l-drpai-sp.zip</font>
* '''RZ/V2L ISP Support Package''' ("Simple ISP" by DRP-AI): <font color="navy">r11an0561ej<version>-rzv2l-isp-sp.zip</font>
* '''HTML5 Packages for Gecko91 or Gecko102''' (firefox and webviewer; released for RZ/G2L only, but could be used for RZ/V2L as well): <font color="navy">RTK0EF0045Z40001ZJ_<version>.zip</font>


As these are not available for download yet, please request them from your Renesas representative.
(*): Refer to DRP-AI Demos section for changes to the DRP-AI package that could effect you application.<br>


<br>
<br>
'''2. Build Environment'''
* To build the BSP, you will need a Linux PC running '''Ubuntu 20.04'''. Only this Host OS version was tested.
* You can use a Linux PC (recommended) or a Virtual Machine.


<br>
'''๐Ÿ”จ Building the BSP'''
'''3. Build the BSP'''
* โš ๏ธ The complete build environment created by 'Linux BSP package' + 'DRP-AI Support package' + 'ISP Support package' must be '''combined into the same directory'''.
* The complete build environment created by "Linux BSP package" + "DRP-AI Support package" (combine into the same directory).
* Use the directory name "rzv_vlp_v3.0.4"
* Detailed instructions for setup and building are located in the '''Release Note''' documents in each "Linux BSP" and "DRP-AI Support" package.
* '''Detailed instructions''' for setup and building are located in the '''Release Note''' documents included in each ZIP package for "Linux BSP" and "DRP-AI Support".
** โš ๏ธ You must first follow the Linux BSP Release Note instructions (r01an6221ej<version>-rzv2l-linux.pdf) Section 3.1 (1),(2),(3),(4),(5)
* โš ๏ธ You must '''first''' follow the Linux BSP Release Note instructions '''Section 3.1''', but stop ๐Ÿ›‘ '''before''' the 'bitbake' command.
** Then follow DRP-AI Support Release Note (r11an0549ej<version>-rzv2l-drpai-sp.pdf) Sections 3.1 and 3.2
** Then, follow '''DRP-AI Support 'Release Note'''' (r11an0549ej<version>-rzv2l-drpai-sp.pdf) '''Sections 3.1 and 3.2''', but stop ๐Ÿ›‘ '''before''' the 'bitbake' command.
** Finally Follow the ISP Support Release Note ( r11an0561ej<version>-rzv2l-isp-sp.pdf) Section 2.0.
** Finally Follow the '''ISP Support 'Release Note'''' ( r11an0561ej<version>-rzv2l-isp-sp.pdf) Section 2.0.
ย 
* A summary of the instructions located in the Release Notes are below. Simply Copy/Paste the commands.
* A summary of the instructions located in the Release Notes are below. Simply Copy/Paste the commands.
{| class="mw-collapsible mw-collapsed wikitable"
{| class="mw-collapsible mw-collapsed wikitable"
| Simple build instructions for BSP v1.00 &nbsp; &nbsp; &nbsp; &nbsp;
| Simple build instructions for BSP v3.0,4&nbsp; &nbsp;
|-
|-
|
|
These instructions are a summary of what is explained in the package Release Notes.
These instructions are a summary of what is explained in the package Release Notes.
export WORK_DIR=<set to path to Yocto build directory>
export SRC_DIR=<set to path to Renesas RZV zip file>
mkdir $WORK_DIR
ย  ย 
ย  ย 
export WORK_DIR=$PWD/rzv2l_bsp_v1.00
mkdir $WORK_DIR
ย  ### Extract the BSP Linux package
ย  ### Extract the BSP Linux package
ย  cd $WORK_DIR ย 
ย  cd $WORK_DIR ย 
ย  unzip ../r01an6221ej0100-rzv2l-linux.zip
ย  unzip $SRC_DIR/RTK0EF0045Z0024AZJ-v3.0.5.zip
ย  tar -xf ./r01an6221ej0100-rzv2l-linux/rzv2l_bsp_v100.tar.gz -C .
ย  tar -xf ./RTK0EF0045Z0024AZJ-v3.0.5/rzv_vlp_v3.0.5.tar.gz
ย 
### Please modify the following file $WORK_DIR/meta-rzv/recipes-bsp/u-boot/u-boot_2020.10.bb
ย  ### Extract the 'RZV2L Graphics Library v1.1.0'
### Replace SRCREV = "35a832d08bddaf64b3dccbf364732ac7f8dfb647" with
### withย  ย  SRCREV = "c12017179a8ca11d38486f1ace08d52a489056d0"
### to avoid a failing "saveenv" command within the u-boot console
### this will be fixed in one of the next BSPs
sed -i -e 's|35a832d08bddaf64b3dccbf364732ac7f8dfb647|c12017179a8ca11d38486f1ace08d52a489056d0|g' $WORK_DIR/meta-rzv/recipes-bsp/u-boot/u-boot_2020.10.bb
ย 
ย  ### Copy/Move the 'Mali Graphics library' Zip file (RTK0EF0045Z13001ZJ-v0.51_forV2L_EN.zip) under the BSP directory.
ย  cd $WORK_DIR
ย  cd $WORK_DIR
ย  unzip ../RTK0EF0045Z13001ZJ-v0.8_EN.zip ย 
ย  unzip $SRC_DIR/RTK0EF0045Z13001ZJ-v1.2.0_EN.zip
ย  tar -zxvf RTK0EF0045Z13001ZJ-v0.8_EN/meta-rz-features.tar.gz .
ย  tar -zxvf RTK0EF0045Z13001ZJ-v1.2.0_EN/meta-rz-features_graphics_v1.2.0.tar.gz
ย  ย 
ย  ย 
ย  ### Copy/Move the 'MRZG2L Codec Library v0.4' Zip file (RTK0EF0045Z13001ZJ-v0.51_forV2L_EN.zip) under the BSP directory.
ย  ### Extract the 'RZV2L Video Codec Library v1.1.0' Zip file.
ย  cd $WORK_DIR
ย  cd $WORK_DIR
ย  tar -xf ../RTK0EF0045Z15001ZJ-v0.51_EN.zip
ย  unzip $SRC_DIR/RTK0EF0045Z15001ZJ-v1.2.0_EN.zip
ย  tar zxvf RTK0EF0045Z15001ZJ-v0.51_EN/meta-rz-features.tar.gz
ย  tar zxvf RTK0EF0045Z15001ZJ-v1.2.0_EN/meta-rz-features_codec_v1.2.0.tar.gz
ย  ย 
ย  ย 
ย  ### Copy/Move the DRP Support archive file ( rr11an0549ej0500-rzv2l-drpai-sp.zip )
ย  ### Extract the DRP Support archive file ย 
ย  ### Extract the 'DRP-AI Driver Support' package file (rzv2l_meta-drpai_ver0.90.tar.gz) under the BSP directory.
ย  ### Extract the 'DRP-AI Driver Support' package file ( meta-rz-drpai.tar.gz) under the rzv2l_drpai-driver directory.
ย  ### After exacting using the command below, this will add a new directory "meta-drpai" and file "rzv2l-drpai-conf.patch"
ย  unzip $SRC_DIR/r11an0549ej0741-rzv2l-drpai-sp.zip -d drp
cd $WORK_DIR
ย  tar -xvf drp/rzv2l_drpai-driver/meta-rz-drpai.tar.gz
unzip ../r11an0549ej0500-rzv2l-drpai-sp.zip -d drp
ย  tar -xvf ../drp/rzv2l_meta-drpai_ver5.00.tar.gz
ย  ย 
ย  ย 
ย  ### Copy/Move the ISP Support archive file ( r11an0561ej0100-rzv2l-isp-sp.zip )
ย  ### Extract the ISP Support archive file ย 
ย  ### Extract the ISP Support Package ( rzv2l_meta-isp_ver1.00.tar.gz ) nder the BSP directory.
ย  ### Extract the ISP Support Package ( meta-rz-simple-isp.tar.gz ).
### After exacting using the command below, this will add a new directory "meta-isp" and file "rzv2l-isp-conf.patch"
ย  cd $WORK_DIR
ย  cd $WORK_DIR
ย  unzip ../r11an0561ej0100-rzv2l-isp-sp.zip ย 
ย  unzip $SRC_DIR/r11an0561ej0130-rzv2l-isp-sp.zip ย 
ย  tar -zxvf ./rzv2l_meta-isp_ver1.00.tar.gz
ย  tar -zxvf r11an0561ej0130-rzv2l-isp-sp/meta-rz-simple-isp.tar.gz
ย  ย 
ย  ย 
### Extract the Multi-OS Package archive file
ย  ### Set up the Yocto Environment and copy a default configuration
ย  ### Set up the Yocto Environment and copy a default configuration
ย  cd $WORK_DIR
ย  cd $WORK_DIR
ย  source poky/oe-init-build-env
ย  unzip $SRC_DIR/r01an6238ej0112-rzv2l-cm33-multi-os-pkg.zip
ย  cp ../meta-rzv/docs/template/conf/smarc-rzv2l/*.conf ./conf/
ย  tar -zxvf r01an6238ej0112-rzv2l-cm33-multi-os-pkg/meta-rz-features_multi-os_v1.1.2.tar.gz
ย  ย 
ย  ย 
cd $WORK_DIR
TEMPLATECONF=${WORK_DIR}/meta-renesas/meta-rzv2l/docs/template/conf/ source poky/oe-init-build-env build
ย  ย 
ย  ย 
ย  ### Apply the patch from the 'DRP-AI Support' package
ย  bitbake-layers add-layer ../meta-rz-features/meta-rz-graphics
ย  ### (the current directory should still be the 'build' directory)
ย  bitbake-layers add-layer ../meta-rz-features/meta-rz-codecs
ย  cd $WORK_DIR/build
ย  bitbake-layers add-layer ../meta-rz-features/meta-rz-drpai
ย  patch -p2 < ../rzv2l-drpai-conf.patch
ย  bitbake-layers add-layer ../meta-rz-features/meta-rz-simple-isp
ย  ### Apply Simple ISP Patch
ย  bitbake-layers add-layer ../meta-rz-features/meta-rz-multi-os
patch -p2 < ../rzv2l-isp-conf.patch
ย  ย 
ย  ย 
ย  ### Build
ย  ### Build
ย  bitbake core-image-weston
ย  MACHINE=smarc-rzv2l bitbake core-image-weston
ย  bitbake core-image-weston -c populate_sdk
ย  MACHINE=smarc-rzv2l bitbake core-image-weston -c populate_sdk
|}
|}
'''๐Ÿ‘“ Verification'''
After the above script is run there will be a new folder call meta-rz-features. This will include, among others sub-folders for the MALI GPU, Video Codec, DRP, and ISP.
<pre>
meta-rz-features/
โ”œโ”€โ”€ meta-rz-codecs
โ”œโ”€โ”€ meta-rz-drpai
โ”œโ”€โ”€ meta-rz-graphics
โ”œโ”€โ”€ meta-rz-multi-os
โ”œโ”€โ”€ meta-rz-simple-isp
โ””โ”€โ”€ Readme.md
</pre>'''OSS_Package'''
This archive contains many of the yocto pacakges used to build the RZ BSP. Between releases some of these packages may no longer be supported in the current Renesas VLP. By modifying the yocto local.conf configuration file to use the packages in this archive allows continued build support of the current released VLP. Add the following to the locat.conf file.
<code>DL_DIR = "Absolute Path to extracted oss_package"</code>


<br>
= Prepare an SD Card =
'''4. Prepare an SD Card'''
*The evaluation boards can be booted from SD Cards. The SD card must be formatted and loaded using a Linux PC. A helpful script has been created '''([https://github.com/renesas-rz/rzg2_bsp_scripts/tree/master/usb_sd_partition usb_sd_partition])''' that you can run on your Linux PC.
* The evaluation boards can be booted from SD Cards. The SD card must be formatted and loaded using a Linux PC. A helpful script has been created '''([https://github.com/renesas-rz/rzg2_bsp_scripts/tree/master/usb_sd_partition usb_sd_partition])''' that you can run on your Linux PC.


* Insert your micro SD card into a '''USB-SD-Card reader''' and then plug into a Linux PC.
*Insert your micro SD card into a '''USB-SD-Card reader''' and then plug into a Linux PC.


* Use the commands below to download the formatting script and run. Please select your card and choose the default settings.
*Use the commands below to download the formatting script and run. Please select your card and choose the default settings.


<pre>
<pre>
Line 126: Line 232:
$ ./usb_sd_partition.sh
$ ./usb_sd_partition.sh
</pre>
</pre>
* Use the commands below to copy the files you build with the BSP to the SD card. '''Start in the base of your Yocto BSP'''.
*Use the commands below to copy the files you build with the BSP to the SD card. '''Start in the base of your Yocto BSP'''.
<pre>
<pre>
# Change to the Yocto output directory that contains the files
# Change to the Yocto output directory that contains the files
Line 146: Line 252:
* Safely remove your USB card reader by right clicking on the drive icon (either RZ_FAT or RZ_ext) in Ubuntu and selecting "Eject"
* Safely remove your USB card reader by right clicking on the drive icon (either RZ_FAT or RZ_ext) in Ubuntu and selecting "Eject"


'''5. Power the Board and Connect to the Serial Port '''
''' Power the Board and Connect to the Serial Port '''
* Supply power the board using the '''USB-C connection''' on the carrier board labeled "Power Input"
*Supply power the board using the '''USB-C connection''' on the carrier board labeled "Power Input"
* On the carrier board, press the '''red button''' in order to turn on power to the board. The green LED labeled "Carrier PWR On" will be lit when power is on.
*On the carrier board, press the '''red button''' in order to turn on power to the board. The green LED labeled "Carrier PWR On" will be lit when power is on.
* Now that the board is powered, plug a USB micro cable into the carrier board to the USB connector labeled '''"SER 3 UART"'''. Use a '''serial terminal program''' to interact as you board. With a Linux PC, we recommend using "putty" (connects to /dev/USB0), and with a Windows PC we recommend "TeraTerm" that connects to COMx. The baud rate of the Serial connection is '''115200 bps'''.
* Now that the board is powered, plug a USB micro cable into the carrier board to the USB connector labeled '''"SER 3 UART"'''. Use a '''serial terminal program''' to interact as you board. With a Linux PC, we recommend using "putty" (connects to /dev/USB0), and with a Windows PC we recommend "TeraTerm" that connects to COMx. The baud rate of the Serial connection is '''115200 bps'''.
* Press the '''blue reset button''', and then "u-boot" will start. Within 3 seconds, '''press the space bar''' on your keyboard in order to stop the auto-boot sequence.
*Press the '''blue reset button''', and then "u-boot" will start. Within 3 seconds, '''press the space bar''' on your keyboard in order to stop the auto-boot sequence.


<br>
<br>
'''6. Switch settings for the CPU SOM board.'''
'''Switch settings for the CPU SOM board.'''
* The SOM board contains a eMMC Flash device and a Micro SD Card socket. On the SOM board, you can only use one or the other because they are both connected to the same peripheral channel on the RZ/V2L.
*The SOM board contains a eMMC Flash device and a Micro SD Card socket. On the SOM board, you can only use one or the other because they are both connected to the same peripheral channel on the RZ/V2L.
* Set the switches on the SOM board to what you want to use.
*Set the switches on the SOM board to what you want to use.
* โš ๏ธ u-boot environment variables are always stored in eMMC Flash (not SPI flash). This means if you change switch SW1-2 to OFF on the SOM board, you cannot access saved u-boot environments variables and you will alwaysย  get the message "*** Warning - MMC init failed, using default environment"
*โš ๏ธ u-boot environment variables are always stored in eMMC Flash (not SPI flash). This means if you change switch SW1-2 to OFF on the SOM board, you cannot access saved u-boot environments variables and you will alwaysย  get the message "*** Warning - MMC init failed, using default environment"
* Note that the SD Card slot on the Carrier board will always work regardless of the setting of SW1-2 because it uses a separate peripheral channel on the RZ/V2L.
*Note that the SD Card slot on the Carrier board will always work regardless of the setting of SW1-2 because it uses a separate peripheral channel on the RZ/V2L.
* On the SOM (CPU) board, there is a little switch (SW1) near the SD card socket.
*On the SOM (CPU) board, there is a little switch (SW1) near the SD card socket.
<pre>
<pre>
SOM board uses SD Card socketย  ย  ย  ย  ย  ย  ย  ย  SOM board uses eMMC Flash (recommended)
SOM board uses SD Card socketย  ย  ย  ย  ย  ย  ย  ย  SOM board uses eMMC Flash (recommended)
Line 172: Line 278:


<br>
<br>
'''7. Boot the Board'''
'''Boot the Board'''


Choose option '''7-1''' or '''7-2''' or '''7-3''' below. <br>
Choose option '''7-1''' or '''7-2''' or '''7-3''' below. <br>
Line 179: Line 285:
<br>
<br>


'''7-1. Boot the Board using SD Card on Carrier Board (Recommended)'''
'''Boot the Board using SD Card on Carrier Board (Recommended)'''
* Insert the '''SD card''' into the socket on '''Carrier Board'''.
*Insert the '''SD card''' into the socket on '''Carrier Board'''.
<pre style="background-color:#FFFFFF; border:0px">
<pre style="background-color:#FFFFFF; border:0px">
โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”
โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”
Line 191: Line 297:
ย  SD Card Socket
ย  SD Card Socket
</pre>
</pre>
* Press the '''blue reset button''', and then "u-boot" will start. Within 3 seconds, '''press the space bar''' on your keyboard in order to stop the auto-boot sequence.
*Press the '''blue reset button''', and then "u-boot" will start. Within 3 seconds, '''press the space bar''' on your keyboard in order to stop the auto-boot sequence.
* At the u-boot prompt ( => ), enter the following commands to boot the board:
*At the u-boot prompt ( => ), enter the following commands to boot the board:
'''RZ/V2L EVK Booting Commands:'''
<pre>
<pre>
ย ย  # Create command macros and save them:
ย ย  # Create command macros and save them:
=> setenv sd_boot1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image ; fatload mmc 1:1 0x48000000 /r9a07g054l2-smarc.dtb'
=> setenv sd_boot1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image ; fatload mmc 1:1 0x48000000 r9a07g054l2-smarc.dtb'
=> setenv sd_boot2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000'
=> setenv sd_boot2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000'
=> setenv bootcmd 'run sd_boot1 sd_boot2'
=> setenv bootcmd 'run sd_boot1 sd_boot2'
Line 203: Line 310:
</pre>
</pre>


'''7-2. Boot the Board using eMMC Flash on SOM Board''' (Advanced)
'''Boot the Board using eMMC Flash on SOM Board''' ย 
* Set switch SW1-2 = OFF
*Set switch SW1-2 = OFF
* The boot loader (u-boot) by default will try to boot from eMMC after 3 seconds.
*The boot loader (u-boot) by default will try to boot from eMMC after 3 seconds.
* Press the '''blue reset button''' and wait.
* Press the '''blue reset button''' and wait.


'''7-3. Boot the Board using SD Card on SOM Board (eMMC Flash disabled)''' (Advanced)
'''Boot the Board using SD Card on SOM Board (eMMC Flash disabled)''' ย 
* Set switch SW1-2 = ON
*Set switch SW1-2 = ON
* Insert the '''SD card''' into the socket on '''SMARC SOM CPU board''' (not the carrier board).
*Insert the '''SD card''' into the socket on '''SMARC SOM CPU board''' (not the carrier board).
* Press the '''blue reset button''', and then "u-boot" will start. Within 3 seconds, '''press the space bar''' on your keyboard in order to stop the auto-boot sequence.
*Press the '''blue reset button''', and then "u-boot" will start. Within 3 seconds, '''press the space bar''' on your keyboard in order to stop the auto-boot sequence.
* Note that you will get this message every time "*** Warning - MMC init failed, using default environment" because u-boot environment variables are stored in eMMC Flash (that you disabled)
*Note that you will get this message every time "*** Warning - MMC init failed, using default environment" because u-boot environment variables are stored in eMMC Flash (that you disabled)
* At the u-boot prompt ( => ), enter the following commands to boot the board:
*At the u-boot prompt ( => ), enter the following commands to boot the board:
<pre>
<pre>
ย ย  # Manually enter the following commands to boot
ย ย  # Manually enter the following commands to boot
Line 221: Line 328:


<br>
<br>
'''8. Linux Login'''
'''Linux Login'''
* The login will be "root" (no password is needed)
* The login will be "root" (no password is needed)


= Programming Boot Loaders into SPI Flash =
= RZV2L Cortex-M33 Multi-OS Package=
* The RZ/V2L board come pre-programmed with the boot loaders in SPI Flash. Normally, they should not need to be updated.
Instructions for RZV Cortex-M33 Multi-OS Package is located below.
* However, if you wish to update them, please refer to the document '''RZV2L_SMARC_EVK_Start-up_Guide_rev0.8.pdf''' for instruction.
* โš ๏ธ The RZ/V2L BSP v0.8 will build the bootloader binaries (bl2_bp-smarc-rzv2l.srec, fip-smarc-rzv2l.srec). However, the 'Flash Writer' binary that is needed for programming as described in the Start-up Guide is '''only provided as binary''' at this time. Please download them below:
** RZ/V2L SMARC Board (Discrete Power version) [https://raw.githubusercontent.com/seebe/rzg_stuff/master/boards/rzv2l_smarc/flash_writer_binaries/Flash_Writer_SCIF_RZV2L_SMARC_DDR4_4GB.mot ๐Ÿ’พ (Right Click and Save As)]
** RZ/V2L SMARC Board (PMIC Power version) [https://raw.githubusercontent.com/seebe/rzg_stuff/master/boards/rzv2l_smarc/flash_writer_binaries/Flash_Writer_SCIF_RZV2L_SMARC_PMIC_DDR4_2GB_1PCS.mot ๐Ÿ’พ (Right Click and Save As)]
= Convert RZ/G2L BSP to RZ/V2L BSP =
ย 
* Some users have started with a RZ/G2L BSP and board and would like to migrate to RZ/VL2.
* Since the RZ/V2L and RZ/G2L devices are very similar, the BSP software is almost the same.
* Below are some ways you can convert the RZ/G2L BSP to build software for the RZ/V2L board.
ย 
'''Method #1: Build RZ/V2L files when selecting RZ/G2L in Yocto'''
* The Yocto build environment for the RZ/V2L is almost same as the RZ/G2L. However, you will need to modify some files in Yocto in order to be able to build files for the RZ/V2L SMARC board.
* These patches are only for the RZ/G2L BSP v1.3
* [[File:0001-rzg2l-common-add-v2l-dtb.patch]]
** This patch will include the RZ/V2L Device Tree as part of the build.
* [[File:0002-bin_file-overwrite-G2L-for-V2L.patch]]
** This patch will build files for the RZ/V2L board even when MACHINE is set to "smarc-rzg2l"
* After applying these patches, just build Yocto for G2L SMARC (smarc-rzg2l) as normal.
ย 
ย 
'''Method #2: Build Outside of Yocto'''
* Some software components of the BSP are very easy to build outside of Yocto, and a Yocto environment is not needed. These are '''ARM Trusted Firmware''', '''u-boot''' and '''Flash Writer'''. These software components can be built completely independent of Yocto.
* In general, the same '''Root File System''' (rootfs) of a Linux system can be used on many different boards. For example, the rootfs of the RZ/V2L board is almost identical to the rootfs of the RZ/G2L, and you can swap them. Of course, the applications loaded into each might be different, but booting is always possible.
* The '''Linux kernel''' also does not require Yocto to be built, however, some output files such as kernel modules will need to be copied to the root file systems that Yocto builds.
* '''Build scripts''' are available to built BSP software components outside of Yocto. Please see below.
ย 
{| class="mw-collapsible mw-collapsed wikitable"
| Build Instructions for RZ/V2L Software Components &nbsp;ย  &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp; &emsp;
|-
|
Use the commands below to prepare a build environment for the RZ/V2L SMARC board.
<pre>
# Download and install a toolchain
cd /tmp
wget https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz
sudo mkdir -p /opt/arm
cd /opt/arm
sudo tar xvf /tmp/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz
ย 
# Download Build Scripts
cd /home/$USERย  ย  # Choose your own location
git clone https://github.com/renesas-rz/rzg2_bsp_scripts


# Download source code repositories
'''[[Cortex-M33 Multi-OS Package Support]]'''
cd build_scripts
git clone --branch rz_g2lย  ย  ย  ย  https://github.com/renesas-rz/rzg2_flash_writer
git clone --branch v2.5/rzg2lย  ย  https://github.com/renesas-rz/rzg_trusted-firmware-a
git clone --branch v2020.10/rzg2l https://github.com/renesas-rz/renesas-u-boot-cip


# Build
= Supported MIPI Camera modules for RZ/V2L EVK =
./build.sh sย  ย  ย  # Select RZ/V2L SMARC, and the toolchain "ARM gcc-arm-10.2-2020.11" you downloaded
Additional Supported Camera Modules are listed below:
./build.sh fย  ย  ย  # Build Flash Writer
./build.sh uย  ย  ย  # Build u-boot
./build.sh tย  ย  ย  # Build Trusted Firmware-ARM


</pre>
* [https://www.e-consystems.com/renesas/ar0234-global-shutter-camera-for-renesas-rz-v2.asp '''e-CAM20_CURZ - AR0234 Global Shutter Camera for Renesas''']<br>
|}
e-CAM20_CURZ is an AR0234-based Full HD Color Global Shutter Camera. It supports the UYVY image format and is provided with an M12 lens holder โ€“ which together make it compatible with Renesas ยฎ RZ/V2L. Its key features make e-CAM20_CURZ a perfect fit for applications like AMR, smart shopping, smart traffic, etc. (Order number: e-CAM20_CURZ_1H01R2)


* [https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.e-consystems.com%2Frenesas%2Fsony-starvis-imx462-ultra-low-light-camera-for-renesas-rz-v2l.asp&data=05%7C01%7Cbrian.witzen.wt%40renesas.com%7C545bb0ae16d94e16fa6408db192388d5%7C53d82571da1947e49cb4625a166a4a2a%7C0%7C0%7C638131412638280647%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=B8QgvZSx16zF2nX%2F%2Bq6DO8GgJkTAYZBBXX87qsCdt9c%3D&reserved=0 '''Sony Starvis IMX462 Ultra Low Light Camera for Renesasยฎ RZ/V2L (e-consystems.com)''']<br>
e-CAM21_CURZ is a Full HD Ultra low light camera for Renesas ยฎ RZ/V2L based on the Sonyยฎ STARVISโ„ข IMX462 sensor. It comes with superior NIR performance and is equipped with an inbuilt ISP and an M12 lens holder โ€“ making it ideal for applications like people counting, animal tracking, smart agriculture, etc. (Order Number: 2. e-CAM21_CURZ_1H01R2 )


=Enable eMMcC Flash=
The instructions to enable the RZV2L to boot from eMMC Flash at on the [[RZ-G2L_SMARC#Enable_eMMC_Boot|RZG2L Page here]]


= RZV2L ISP Demos =
=Program On-Board eMMC Flash=
The instructions to enable the RZV2L to load the Linux kernel, DTB, and Filesystem [[RZ-G2L_SMARC#Program__On-Board_eMMC_Flash|RZG2L Page here]]


====== Requirements ======
=Fix rngd bug that randomly keeps all CPUs busy after startup=
RZ MPUs (at least non-secure versions) do not have a hardware random number generation module (/dev/hwrng), but that's the default setting for the systemd rngd service.


* Linux BSP SDK : The SDK must include the DRP-AI and ISP packages. Refer to Linux BSP Release Note instructions (r01an6221ej<version>-rzv2l-linux.pdf)ย  Section 6.
With that, rngd occupies the CPU resources to build up entropies during start-up.
* RZV2L DRP-AI Sample Application : ( rzv2l_drpai-sample-application_ver5.00.tar.gz )
* Power : A powered hub or PC may not provide sufficient power. A USB Power Block is suggested.


====== Buildย  ISP Monitoring Application ======
Randomly, this process does not end properly and slows down the entire system significantly.
Detailed instructions for setup and building are located in the '''Application Note Revision''' documents in "Simple ISP Sample Application Note Revision" package.


* โš ๏ธ You must first follow the Simple ISP Sample Application Note Revision instructions (r11an0563ej<version>-rzv2l-simple-isp.pdf) Section 2.0 and 2.6
But if an available pseudorandom number generator is selected, rngd finishes properly always.


{| class="mw-collapsible mw-collapsed wikitable"
The following modification is sufficient:
| Simple build instructions for ISP Monitioring Application&nbsp; &nbsp; &nbsp;
|-
|
These instructions are a summary of what is explained in the package Release Notes.
<pre>
export ISP_FILE=r11an0561ej0100-rzv2l-isp-sp.zip


# Step 1. Extract the ISP package and ISP sample application files. Enter the ISP Montitoring source directory.
Before you build the BSP, modify
unzip $ISP_FILE -d isp_work
cd isp_work
tar zxvf rzv2l_isp-sample-application_ver1.00.tar.gz
cd app_isp_monitoring/src


# Step 2. Start the SDK
'''poky/meta/recipes-support/rng-tools/rng-tools/default'''
source /opt/poky/3.1.5/environment-setup-aarch64-poky-linux


# Step 3. Build the source with make
from
make
ย  ย  EXTRA_ARGS="-r /dev/hwrng"
</pre>
to
|}
ย  ย  EXTRA_ARGS="'''-r /dev/urandom -x jitter'''"
====== Build ISP Tiny YoloV2 Application ======


However, normally you do not want to modify the original recipe but instead create a new one to override the old one.


Detailed instructions for setup and building are located in the '''Application Note Revision''' documents in "Simple ISP Sample Application Note Revision" package.
#Create a new folder: <code>mkdir - p meta-renesas/recipes-rzg2l/recipes-support/rng-tools</code>
#Change dir: <code>cd meta-renesas/recipes-rzg2l/recipes-support/rng-tools</code>
#Create a new file in that folder: <code>vi rng-tools_%.bbappend</code>
#Edit the file just created and add these lines:ย  ย  <code>FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"</code>ย  <code>SRC_URI += "file://default"<sup>(1)</sup></code>
#Create another folder: <code>mkdir -p rng-tools</code>
#Add a file <code>vi default</code>
#Add the new content into it:ย  <code>EXTRA_ARGS="'''-r /dev/urandom -x jitter'''"</code>
#Rebuild the image with the new package: <code>bitbake core-image-weston</code>


* โš ๏ธ You must first follow the Simple ISP Sample Application Note Revision instructions (r11an0563ej<version>-rzv2l-simple-isp.pdf) Section 2.0 and 2.7
<sup>(1)</sup> Note that this is the new Yocto syntax. For older versions of Yocto you may need to replace ''''':''''' (colon) with '''''_''''' (underscore): so <code>FILESEXTRAPATHS_prepend</code>. ย 


This build requires the DRP-AI Tiny Yolo V2 Cam source is needed for this build ( /rzv2l_drpai-sample-application/app_tinyyolov2_cam/src ).
Alternatively, you can modify the


This build requires theDRP-AI Tiny Yolo V2 Cam directory "tinyyolov2_cam" is needed for this build ( /rzv2l_drpai-sample-application/app_tinyyolov2_cam/exe ).
'''/etc/default/rng-tools'''
{| class="mw-collapsible mw-collapsed wikitable"
| Simple build instructions for ISP Tiny Yolo V2 Application &nbsp; &nbsp; &nbsp; &nbsp;
|-
|
These instructions are a summary of what is explained in the package Release Notes.
<pre>
export DRP_FILE=r11an0549ej0500-rzv2l-drpai-sp.zip


# Step 1. Extract the DRP-AI package and the DRP-AI Sample application
file in the current target rootfs accordingly.
unzip $DRP_FILE -d drp_work
cd drp_work/rzv2l_drpai-sample-application
tar zxvf rzv2l_drpai-sample-application_ver5.00.tar.gz


#Step 2. Copy the DRP-AI Tiny Yolo V2 source directory to the ISP Tiny Yolo V2 directory.
= DRP-AI Driver Version 7.00 =
cp -rn app_tinyyolov2_cam/ ../../isp_work/
This version to the DRP-AI Reserve Area has changed from 0x70000000 to 0x80000000, because of this older versions of the DRP-AI Implementation Source code will fail with the following errors.


#Step 3. Open the isp_work directory created in the "Build ISP Monitoring Application"
<code>[ERROR] Failed to run DRPAI_ASSIGN : errno=22</code>
cd ../../isp_work/app_tinyyolov2_cam/src


# Step 4.ย  Start the SDK
<code>[ERROR] Failed to run load_data_to_mem : resnet50_cam/drp_desc.bin</code>
source /opt/poky/3.1.5/environment-setup-aarch64-poky-linux


# Step 5. Execute the patch
<code>[ERROR] Failed to load DRPAI Data</code>
patch -p 1 < rzv2l_app_tinyyolov2_cam_usb2mipi.patch


# Step 6. Compile using make
This is due to the generated DRP Translator files map to the older address. Please use the DRP Translator version 1.70 when generating the DRP files and use the latest sample code included in the DRP-AI package version 7.0.
make
</pre>
|}

Latest revision as of 19:12, 14 February 2024

image 2022-10-31 201234042.png

General Information

Sharing of RZ/G2L Board Documentation

RZ/V2L Boot Loaders Warning

โš ๏ธ Warning.

The pre-loaded bootloaders (u-boot and ARM Trusted Firmware) on the RZ/V2L Evaluation Kit (SMARC board) are not up to date with the current BSP. It is strongly recommended that the bootloaders generated when building the BSP described in the Startup Guide document that is distributed with the BSP Package.

Known issues with pre-loaded loaders.

  • DRP Demos will prematurely exit.
  • ISP Demos will prematurely exit.
  • RZV2L Multi-OS CM33 Debug fails connection

Available Demos

โญ Prebuilt Demo Images โญ

Renesas has prepared pre-built images available for download from renesas.com.

image 2023-11-01 102816095.png

โญโญ RZ/V2L AI SDK Applications Demo SD Image

RZV2L DRP-AI Object Detection Demo.png

RZ/V2L DRP-AI Object Detection and Pose Estimation DEMO

rzv2l-drp-ai-usb-camera-http-demo.png

RZ/V2L DRP-AI USB Camera HTTP Demo SD Image version

RZ/V2L DRP-AI USB Camera HTTP Demo Pre-build version

DRP-AI Pretrained Applications

Please see the DRP-AI Pretrained Models page for details about pretrained applications.

DRP-AI Demos

The RZV2L DRP-AI Demos can be found here.

These demos include pre-build applications, source code and documentation about the DRP-AI.

Simple ISP Demos

Information about the RZV2L Simple ISP can be found here.

These demos include pre-build applications, source code and documentation about the DRP-AI and ISP.

Camera Data Receive Unit (CRU) Sample Application

GStreamer Application Note

Getting Started

๐Ÿ“„ Board User Manual

  • The User Manual for the boards can be found their website pages on renesas.com.
  • Check the 'General Information' section on this page for the links.

๐Ÿ“ฆ What is included in the kit

  • A Micro USB cable for serial console.

๐Ÿ›’ What you will need to purchase

  • Power: (Required) USB Type-C power supply. 5V or 9V can be used. To use 9V, switch SW11-4 change is needed (please see the board manual).
  • HDMI LCD: An LCD monitor with an HMDI input. Here is a list of tested touchscreen monitors: RZ-G/RZ-G2L_SMARC#LCD_Monitors
  • mini-HDMI Adapter: The connector on the board is type mini-HDMI.
  • USB Camera: A camera supporting USB Video Class (UVC) such as Logitec C270, C920, C922, BRIO Ultra HD Pro.
  • USB Mouse: In the case that you do not have a touchscreen LCD monitor.

๐Ÿ’ป Build Environment

โš ๏ธ The BSP will only build in Ubuntu 20.04
  • To build the BSP, you will need a Linux PC running Ubuntu 20.04. This was the only host OS that was tested and that specific version is a requirement of Yocto 3.1 (dunfell). Using Ubuntu 22.04 will not work
  • You can use a Linux PC (recommended) or a Virtual Machine. If using a Virtual Machine, 200GB of hard drive space is recommended for the minimum build.
  • If you are not currently running Ubuntu 20.04, you can use a docker container.
    • Example: Host Machine = Ubuntu 22.04 + Docker Container running Ubuntu 20.04 inside of it
  • Some docker setup instructions and scripts are provided to make it easy to get started.

๐Ÿ’พ Downloading the Linux BSP

Up to 5 packages are used to build the BSP.

Please download from the Official RZ/V2L Website. Please look in the "Software Downloads" section.

Links to all the downloads can be found on the ๐Ÿ“ฆ RZ/V2 Linux BSP on this site. Please refer to the sections that support RZ/V2L.

Copy all ZIP file to a Linux PC.

The evaluation versions contain a time limitation that stops the software after a few hours.

  • RZ/V Verified Linux Package: RTK0EF0045Z0024AZJ-<version>.zip.
  • RZ MPU Graphics Library Evaluation Version: RTK0EF0045Z13001ZJ-<version>_EN.zip
  • RZ MPU Video Codec Library Evaluation Version: RTK0EF0045Z15001ZJ-<version>_EN.zip
  • RZ/V2L DRP-AI Support Package: r11an0549ej<version>-rzv2l-drpai-sp.zip
  • RZ/V2L ISP Support Package ("Simple ISP" by DRP-AI): r11an0561ej<version>-rzv2l-isp-sp.zip
  • HTML5 Packages for Gecko91 or Gecko102 (firefox and webviewer; released for RZ/G2L only, but could be used for RZ/V2L as well): RTK0EF0045Z40001ZJ_<version>.zip

(*): Refer to DRP-AI Demos section for changes to the DRP-AI package that could effect you application.


๐Ÿ”จ Building the BSP

  • โš ๏ธ The complete build environment created by 'Linux BSP package' + 'DRP-AI Support package' + 'ISP Support package' must be combined into the same directory.
  • Use the directory name "rzv_vlp_v3.0.4"
  • Detailed instructions for setup and building are located in the Release Note documents included in each ZIP package for "Linux BSP" and "DRP-AI Support".
  • โš ๏ธ You must first follow the Linux BSP Release Note instructions Section 3.1, but stop ๐Ÿ›‘ before the 'bitbake' command.
    • Then, follow DRP-AI Support 'Release Note' (r11an0549ej<version>-rzv2l-drpai-sp.pdf) Sections 3.1 and 3.2, but stop ๐Ÿ›‘ before the 'bitbake' command.
    • Finally Follow the ISP Support 'Release Note' ( r11an0561ej<version>-rzv2l-isp-sp.pdf) Section 2.0.
  • A summary of the instructions located in the Release Notes are below. Simply Copy/Paste the commands.
Simple build instructions for BSP v3.0,4   
These instructions are a summary of what is explained in the package Release Notes.
export WORK_DIR=<set to path to Yocto build directory> 
export SRC_DIR=<set to path to Renesas RZV zip file>
mkdir $WORK_DIR

### Extract the BSP Linux package
cd $WORK_DIR 
unzip $SRC_DIR/RTK0EF0045Z0024AZJ-v3.0.5.zip
tar -xf ./RTK0EF0045Z0024AZJ-v3.0.5/rzv_vlp_v3.0.5.tar.gz

### Extract the 'RZV2L Graphics Library v1.1.0'
cd $WORK_DIR
unzip $SRC_DIR/RTK0EF0045Z13001ZJ-v1.2.0_EN.zip
tar -zxvf RTK0EF0045Z13001ZJ-v1.2.0_EN/meta-rz-features_graphics_v1.2.0.tar.gz

### Extract the 'RZV2L Video Codec Library v1.1.0' Zip file.
cd $WORK_DIR
unzip $SRC_DIR/RTK0EF0045Z15001ZJ-v1.2.0_EN.zip
tar zxvf RTK0EF0045Z15001ZJ-v1.2.0_EN/meta-rz-features_codec_v1.2.0.tar.gz

### Extract the DRP Support archive file 
### Extract the 'DRP-AI Driver Support' package file ( meta-rz-drpai.tar.gz) under the rzv2l_drpai-driver directory.
unzip $SRC_DIR/r11an0549ej0741-rzv2l-drpai-sp.zip -d drp
tar -xvf drp/rzv2l_drpai-driver/meta-rz-drpai.tar.gz

### Extract the ISP Support archive file 
### Extract the ISP Support Package ( meta-rz-simple-isp.tar.gz ).
cd $WORK_DIR
unzip $SRC_DIR/r11an0561ej0130-rzv2l-isp-sp.zip 
tar -zxvf r11an0561ej0130-rzv2l-isp-sp/meta-rz-simple-isp.tar.gz

### Extract the Multi-OS Package archive file
### Set up the Yocto Environment and copy a default configuration
cd $WORK_DIR
unzip $SRC_DIR/r01an6238ej0112-rzv2l-cm33-multi-os-pkg.zip
tar -zxvf r01an6238ej0112-rzv2l-cm33-multi-os-pkg/meta-rz-features_multi-os_v1.1.2.tar.gz

cd $WORK_DIR
TEMPLATECONF=${WORK_DIR}/meta-renesas/meta-rzv2l/docs/template/conf/ source poky/oe-init-build-env build

bitbake-layers add-layer ../meta-rz-features/meta-rz-graphics
bitbake-layers add-layer ../meta-rz-features/meta-rz-codecs
bitbake-layers add-layer ../meta-rz-features/meta-rz-drpai
bitbake-layers add-layer ../meta-rz-features/meta-rz-simple-isp
bitbake-layers add-layer ../meta-rz-features/meta-rz-multi-os

### Build
MACHINE=smarc-rzv2l bitbake core-image-weston
MACHINE=smarc-rzv2l bitbake core-image-weston -c populate_sdk

๐Ÿ‘“ Verification

After the above script is run there will be a new folder call meta-rz-features. This will include, among others sub-folders for the MALI GPU, Video Codec, DRP, and ISP.

 
meta-rz-features/
โ”œโ”€โ”€ meta-rz-codecs
โ”œโ”€โ”€ meta-rz-drpai
โ”œโ”€โ”€ meta-rz-graphics
โ”œโ”€โ”€ meta-rz-multi-os
โ”œโ”€โ”€ meta-rz-simple-isp
โ””โ”€โ”€ Readme.md

OSS_Package

This archive contains many of the yocto pacakges used to build the RZ BSP. Between releases some of these packages may no longer be supported in the current Renesas VLP. By modifying the yocto local.conf configuration file to use the packages in this archive allows continued build support of the current released VLP. Add the following to the locat.conf file.

DL_DIR = "Absolute Path to extracted oss_package"

Prepare an SD Card

  • The evaluation boards can be booted from SD Cards. The SD card must be formatted and loaded using a Linux PC. A helpful script has been created (usb_sd_partition) that you can run on your Linux PC.
  • Insert your micro SD card into a USB-SD-Card reader and then plug into a Linux PC.
  • Use the commands below to download the formatting script and run. Please select your card and choose the default settings.
$ wget https://raw.githubusercontent.com/renesas-rz/rzg2_bsp_scripts/master/usb_sd_partition/usb_sd_partition.sh
$ chmod +x usb_sd_partition.sh
$ ./usb_sd_partition.sh
  • Use the commands below to copy the files you build with the BSP to the SD card. Start in the base of your Yocto BSP.
# Change to the Yocto output directory that contains the files
$ cd build/tmp/deploy/images/smarc-rzv2l

# Copy the Linux kernel and Device Tree to partition 1
$ sudo cp -v Image /media/$USER/RZ_FAT
$ sudo cp -v r9a07g054l2-smarc.dtb /media/$USER/RZ_FAT

# Copy and expand the Root File System to partition 2
$ sudo tar -xvf core-image-weston-smarc-rzv2l.tar.gz   -C /media/$USER/RZ_ext
    (or if NOT using graphics)
$ sudo tar -xvf core-image-minimal-smarc-rzv2l.tar.gz   -C /media/$USER/RZ_ext

# Make sure all files are finished writing before removing the USB card reader from the PC
$ sync
  • Safely remove your USB card reader by right clicking on the drive icon (either RZ_FAT or RZ_ext) in Ubuntu and selecting "Eject"

Power the Board and Connect to the Serial Port

  • Supply power the board using the USB-C connection on the carrier board labeled "Power Input"
  • On the carrier board, press the red button in order to turn on power to the board. The green LED labeled "Carrier PWR On" will be lit when power is on.
  • Now that the board is powered, plug a USB micro cable into the carrier board to the USB connector labeled "SER 3 UART". Use a serial terminal program to interact as you board. With a Linux PC, we recommend using "putty" (connects to /dev/USB0), and with a Windows PC we recommend "TeraTerm" that connects to COMx. The baud rate of the Serial connection is 115200 bps.
  • Press the blue reset button, and then "u-boot" will start. Within 3 seconds, press the space bar on your keyboard in order to stop the auto-boot sequence.


Switch settings for the CPU SOM board.

  • The SOM board contains a eMMC Flash device and a Micro SD Card socket. On the SOM board, you can only use one or the other because they are both connected to the same peripheral channel on the RZ/V2L.
  • Set the switches on the SOM board to what you want to use.
  • โš ๏ธ u-boot environment variables are always stored in eMMC Flash (not SPI flash). This means if you change switch SW1-2 to OFF on the SOM board, you cannot access saved u-boot environments variables and you will always get the message "*** Warning - MMC init failed, using default environment"
  • Note that the SD Card slot on the Carrier board will always work regardless of the setting of SW1-2 because it uses a separate peripheral channel on the RZ/V2L.
  • On the SOM (CPU) board, there is a little switch (SW1) near the SD card socket.
SOM board uses SD Card socket                 SOM board uses eMMC Flash (recommended)
SW1-1 = ON/OFF(JTAG)                          SW1-1 = ON/OFF(JTAG)
SW1-2 = ON                                    SW1-2 = OFF
      +-----+                                       +-----+
      | ON  |                                       | ON  |
      | = = |                                       | =   |
      |     |                                       |   = |
      | 1 2 |                                       | 1 2 |
      +-----+                                       +-----+


Boot the Board

Choose option 7-1 or 7-2 or 7-3 below.
Option 7-1 is recommended.


Boot the Board using SD Card on Carrier Board (Recommended)

  • Insert the SD card into the socket on Carrier Board.
โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”
โ”‚     โ”‚ SOM โ”‚     โ”‚
โ”‚     โ””โ”€โ”€โ”€โ”€โ”€โ”˜     โ”‚
โ”‚  Carrier Board  โ”‚
โ”‚     โ”Œโ”€โ”         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ†‘
 SD Card Socket
  • Press the blue reset button, and then "u-boot" will start. Within 3 seconds, press the space bar on your keyboard in order to stop the auto-boot sequence.
  • At the u-boot prompt ( => ), enter the following commands to boot the board:

RZ/V2L EVK Booting Commands:

   # Create command macros and save them:
=> setenv sd_boot1 'mmc dev 1 ; fatload mmc 1:1 0x48080000 Image ; fatload mmc 1:1 0x48000000 r9a07g054l2-smarc.dtb'
=> setenv sd_boot2 'setenv bootargs 'root=/dev/mmcblk1p2 rootwait' ; booti 0x48080000 - 0x48000000'
=> setenv bootcmd 'run sd_boot1 sd_boot2'
=> saveenv

   # Reset the board and it will automatically boot

Boot the Board using eMMC Flash on SOM Board

  • Set switch SW1-2 = OFF
  • The boot loader (u-boot) by default will try to boot from eMMC after 3 seconds.
  • Press the blue reset button and wait.

Boot the Board using SD Card on SOM Board (eMMC Flash disabled)

  • Set switch SW1-2 = ON
  • Insert the SD card into the socket on SMARC SOM CPU board (not the carrier board).
  • Press the blue reset button, and then "u-boot" will start. Within 3 seconds, press the space bar on your keyboard in order to stop the auto-boot sequence.
  • Note that you will get this message every time "*** Warning - MMC init failed, using default environment" because u-boot environment variables are stored in eMMC Flash (that you disabled)
  • At the u-boot prompt ( => ), enter the following commands to boot the board:
  # Manually enter the following commands to boot
=> mmc dev 0 ; fatload mmc 0:1 0x48080000 Image ; fatload mmc 0:1 0x48000000 /r9a07g054l2-smarc.dtb
=> setenv bootargs 'root=/dev/mmcblk0p2 rootwait' ; booti 0x48080000 - 0x48000000


Linux Login

  • The login will be "root" (no password is needed)

RZV2L Cortex-M33 Multi-OS Package

Instructions for RZV Cortex-M33 Multi-OS Package is located below.

Cortex-M33 Multi-OS Package Support

Supported MIPI Camera modules for RZ/V2L EVK

Additional Supported Camera Modules are listed below:

e-CAM20_CURZ is an AR0234-based Full HD Color Global Shutter Camera. It supports the UYVY image format and is provided with an M12 lens holder โ€“ which together make it compatible with Renesas ยฎ RZ/V2L. Its key features make e-CAM20_CURZ a perfect fit for applications like AMR, smart shopping, smart traffic, etc. (Order number: e-CAM20_CURZ_1H01R2)

e-CAM21_CURZ is a Full HD Ultra low light camera for Renesas ยฎ RZ/V2L based on the Sonyยฎ STARVISโ„ข IMX462 sensor. It comes with superior NIR performance and is equipped with an inbuilt ISP and an M12 lens holder โ€“ making it ideal for applications like people counting, animal tracking, smart agriculture, etc. (Order Number: 2. e-CAM21_CURZ_1H01R2 )

Enable eMMcC Flash

The instructions to enable the RZV2L to boot from eMMC Flash at on the RZG2L Page here

Program On-Board eMMC Flash

The instructions to enable the RZV2L to load the Linux kernel, DTB, and Filesystem RZG2L Page here

Fix rngd bug that randomly keeps all CPUs busy after startup

RZ MPUs (at least non-secure versions) do not have a hardware random number generation module (/dev/hwrng), but that's the default setting for the systemd rngd service.

With that, rngd occupies the CPU resources to build up entropies during start-up.

Randomly, this process does not end properly and slows down the entire system significantly.

But if an available pseudorandom number generator is selected, rngd finishes properly always.

The following modification is sufficient:

Before you build the BSP, modify

poky/meta/recipes-support/rng-tools/rng-tools/default

from

   EXTRA_ARGS="-r /dev/hwrng"

to

   EXTRA_ARGS="-r /dev/urandom -x jitter"

However, normally you do not want to modify the original recipe but instead create a new one to override the old one.

  1. Create a new folder: mkdir - p meta-renesas/recipes-rzg2l/recipes-support/rng-tools
  2. Change dir: cd meta-renesas/recipes-rzg2l/recipes-support/rng-tools
  3. Create a new file in that folder: vi rng-tools_%.bbappend
  4. Edit the file just created and add these lines: FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" SRC_URI += "file://default"(1)
  5. Create another folder: mkdir -p rng-tools
  6. Add a file vi default
  7. Add the new content into it: EXTRA_ARGS="-r /dev/urandom -x jitter"
  8. Rebuild the image with the new package: bitbake core-image-weston

(1) Note that this is the new Yocto syntax. For older versions of Yocto you may need to replace : (colon) with _ (underscore): so FILESEXTRAPATHS_prepend.

Alternatively, you can modify the

/etc/default/rng-tools

file in the current target rootfs accordingly.

DRP-AI Driver Version 7.00

This version to the DRP-AI Reserve Area has changed from 0x70000000 to 0x80000000, because of this older versions of the DRP-AI Implementation Source code will fail with the following errors.

[ERROR] Failed to run DRPAI_ASSIGN : errno=22

[ERROR] Failed to run load_data_to_mem : resnet50_cam/drp_desc.bin

[ERROR] Failed to load DRPAI Data

This is due to the generated DRP Translator files map to the older address. Please use the DRP Translator version 1.70 when generating the DRP files and use the latest sample code included in the DRP-AI package version 7.0.