Skip to content

renesas-rz/rz_cru_sample_code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

RZ MPU CRU Sample Application

Overview

This is a sample application for understanding how to control Camera Receiving Unit (CRU) on RZ MPUs using Linux driver and other modules.

Target Devices and Supported Environments

Target Devices

Supported Environments

Features

This sample application highlights the following features on CRU.

  • Demosaicing
  • Linear Matrix Processing
  • Statistics

License and notice

The CRU Sample Application source file "src" is licensed under the MIT License. It is provided "AS IS" with no warranty. See the LICENSE file for more details.

The Coral Camera driver patch file in the "patch" folder is provided "AS IS" with no warranty and follows the same license as the driver.

Renesas does not provide any support for this sample application. Questions about this sample will not be answered and no corrections will be made.

The code is not intended for production purposes. It may still contain bugs, lack critical error handling, etc. Please check the code yourself and use it at your own risk.

Build Instructions

Download the Sample Application Source Code

Please git clone the sample application source code to your local Linux PC or manually download it.
The file list is as follows:

rz_cru_sample_code
├── patch
│   └── 0001-media-i2c-ov5645-support-SBGGR8-format-instead-of-UY.patch # Coral Camera Driver Patch
└── src
    ├── cru_img_proc.c # Image Processing Library
    ├── cru_img_proc.h #Image Processing Library Headfile
    ├── LICENSE # src File LICENSE Information
    ├── main.c # Sample Application
    └── Makefile # Makefile

Building the Image with Coral Camera Driver Patch

To build the Board Support Package with the Coral Camera driver patch, follow the instructions below. First, refer to the Yocto Build layer (v3.0.6-update3) or the RZ/G Verified Linux Package (VLP) Linux Start-up Guide, Section 2.2 (1)-(6) and Chapter 6 to build the image and SDK. Secondly, build the linux package and SDK, and install SDK to your environment.
The current implementation utilizes the CMOS sensor from the Coral camera bundled with the RZ/V2L evaluation board kit. Should you choose a different CMOS sensor, please adjust the source code accordingly to suit your production needs.

  1. Patch the Coral Camera driver in the kernel source inside Yocto:

    $ cd ~/rzg_vlp_v3.0.6/build/tmp/work-shared/<board>/kernel-source
    $ patch -p1 < /path/to/patch/0001-media-i2c-ov5645-support-SBGGR8-format-instead-of-UY.patch
  2. Rebuild the kernel (Yocto recipe linux-renesas):

    $ MACHINE=<board> bitbake linux-renesas -c compile -f
  3. Rebuild the total image:

    $ MACHINE=<board> bitbake core-image-weston

Make sure to replace <board> with the appropriate board name:

  • RZ/G2L Evaluation Board Kit PMIC version: smarc-rzg2l
  • RZ/G2LC Evaluation Board Kit: smarc-rzg2lc
  • RZ/G2UL Evaluation Board Kit: smarc-rzg2ul
  • RZ/V2L Evaluation Board Kit: smarc-rzv2l

Compiling the CRU Sample Application

Follow the steps below to compile the CRU Sample Application after building and installing the Yocto SDK. Note that the SDK build process for the CRU Sample Application is similar to VLP.

  1. After building and installing the SDK, source the environment setup script provided by the SDK:

    $ source /path/to/sdk/environment-setup-aarch64-poky-linux
  2. Go to directory src directory and run make command:

    $ cd src
    $ make
  3. Copy the output application file cru_sample inside the src directory to /home/root directory on the target board. If you have an Ethernet connection to your board, you can use scp. Otherwise just manually copy it.

    $ scp cru_sample <username>@<board IP>:/home/root/

The application can be executed with the following commands using a terminal that is connected to the target board.

$ cd /home/root
$ ./cru_sample

Notes

Device and Sensor Compatibility for Sample Application

Please note that this sample application has been developed and tested on the RZ/G2{L, LC, UL} and RZ/V2L devices. If you plan to use it on other MPU, you may need to make modifications based on the specifications of your target MPU. It is highly recommended to thoroughly evaluate the application after making any modifications.

The current implementation of the sample application utilizes the CMOS sensor from the Coral camera that comes bundled with the RZ/V2L evaluation board kit. However, please be aware that the CMOS camera sensor model (OV5645) mentioned is no longer available. Therefore, it should not be used for mass production purposes.

Please ensure that you select an alternative CMOS sensor that suits your production needs. In such cases, you will need to adjust the source code accordingly to accommodate the specifications of your chosen sensor.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published