Line 4: |
Line 4: |
| | | |
| ===Overview=== | | ===Overview=== |
− | This guide shows how to connect VEYE-MIPI-290/327 to Jetson Nano. Jetson Nano SDK Version is r32.2.1. We provide two ways to do so: '''Prebuilt Binaries''' or '''Source Code. Yes, It's Open Source!''' | + | This guide shows how to use VEYE-MIPI-290/327 onJetson Nano. Jetson Nano SDK Version is (Jetpack4.2.2,L4T r32.2.1)and (Jetpack4.3,L4T r32.3.1). We provide two ways to do so: '''Prebuilt Binaries''' or '''Source Code. Yes, It's Open Source!''' |
| | | |
| VEYE-MIPI-290/327 is STARVIS camera module with ISP functions build in. It output UYVY data using MIPI-CSI2. We provide '''V4L2 interface''' for video streaming apps , and '''Video Control Toolkits (which is Shell Script)''' to control the camera module directly. | | VEYE-MIPI-290/327 is STARVIS camera module with ISP functions build in. It output UYVY data using MIPI-CSI2. We provide '''V4L2 interface''' for video streaming apps , and '''Video Control Toolkits (which is Shell Script)''' to control the camera module directly. |
| + | |
| + | The new version of Jetson Nano (B01) is supported. |
| | | |
| ===Hardware Setup=== | | ===Hardware Setup=== |
− | Jetson Nano's CSI2 interface is compatible with Raspberry Pi,so both [[Mini Adapter Board]] and [[Adapter Board for Raspberry Pi|Adapter Board]] is supported. In addition,It need a 5V power.[[File:Jetson nano to Veye327.jpg|center|thumb|600x600px|Connect VEYE to Jetson Nano |link=http://wiki.veye.cc/index.php/File:Jetson_nano_to_Veye327.jpg]][[File:Jetson nano pwr connect.jpg|center|thumb|600x600px|Jetson Nano power wire|link=http://wiki.veye.cc/index.php/File:Jetson_nano_pwr_connect.jpg|alt=]][[File:VEYE327 pwr.jpg|center|thumb|600x600px|VEYE-MIPI-290/327 wire|link=http://wiki.veye.cc/index.php/File:VEYE327_pwr.jpg|alt=]]<br /> | + | Jetson Nano's CSI2 interface is compatible with Raspberry Pi,so both [[Mini Adapter Board]] and [[Adapter Board for Raspberry Pi|Adapter Board]] is supported. In addition,It need a 5V power. |
− | ===Buruing the prebuilt Image to upgrade Jetson nano system=== | + | [[File:Jetson nano to Veye327.jpg|center|thumb|600x600px|Connect VEYE to Jetson Nano(A02)]] |
| + | [[File:Jetson nano pwr connect.jpg|center|thumb|600x600px|Jetson Nano power wire|alt=]] |
| + | [[File:VEYE327 pwr.jpg|center|thumb|600x600px|VEYE-MIPI-290/327 wire|alt=]]<br /> |
| + | |
| + | ===Using prebuilt Image to upgrade Jetson nano system=== |
| You can use the image prebuild by us to upgrade jetson nano system, which will support our camera. | | You can use the image prebuild by us to upgrade jetson nano system, which will support our camera. |
| | | |
Line 21: |
Line 27: |
| If Baidu cloud disk download is too slow, you can contact our company customer service ''xumm@csoneplus.com'' to obtain. | | If Baidu cloud disk download is too slow, you can contact our company customer service ''xumm@csoneplus.com'' to obtain. |
| | | |
− | *How to burn | + | *How to flashing jetson nano |
| | | |
| [https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit Official document] | | [https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit Official document] |
− |
| |
− | <br />
| |
| | | |
| ===Using source code to upgrade Jetson nano system=== | | ===Using source code to upgrade Jetson nano system=== |
Line 47: |
Line 51: |
| *Power cable (5V-4A) to power the Jetson Nano™ board. | | *Power cable (5V-4A) to power the Jetson Nano™ board. |
| *Micro SD card must be connected to the J501 slot. | | *Micro SD card must be connected to the J501 slot. |
− | *A jumper pin must be connected to the pin 3 and pin 4 of J40 button header.
| |
| | | |
| ====Host PC environment prepare==== | | ====Host PC environment prepare==== |
Line 62: |
Line 65: |
| | | |
| Assume SDK install directory is <TOPDIR>,source code is in $L4T_DIR/sources directory. | | Assume SDK install directory is <TOPDIR>,source code is in $L4T_DIR/sources directory. |
| + | |
| + | ''-Jetpack4.2.2'' |
| | | |
| <code>export TOP_DIR=<absolute path to top dir;in my case is /home/xumm/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448/></code> | | <code>export TOP_DIR=<absolute path to top dir;in my case is /home/xumm/nvidia/nvidia_sdk/JetPack_4.2.2_Linux_GA_P3448/></code> |
| + | |
| + | ''-Jetpack4.3'' |
| + | |
| + | <code>export TOP_DIR=<absolute path to top dir;in my case is /home/xumm/nvidia/nvidia_sdk/JetPack_4.3_Linux_JETSON_NANO_DEVKIT/></code> |
| + | |
| + | ''- Common Part'' |
| | | |
| <code>export L4T_DIR=$TOP_DIR/Linux_for_Tegra</code> | | <code>export L4T_DIR=$TOP_DIR/Linux_for_Tegra</code> |
| + | |
| + | <code>export LOCALVERSION=-tegra</code> |
| | | |
| <code>export LDK_ROOTFS_DIR=$TOP_DIR/Linux_for_Tegra/rootfs</code> | | <code>export LDK_ROOTFS_DIR=$TOP_DIR/Linux_for_Tegra/rootfs</code> |
Line 81: |
Line 94: |
| <code>export NVIDIA_PATH=$L4T_DIR/sources/kernel/nvidia</code> | | <code>export NVIDIA_PATH=$L4T_DIR/sources/kernel/nvidia</code> |
| | | |
− | <code>export NANO_DTS_PATH=$L4T_DIR/sources/hardware/nvidia/platform/t210/porg/kernel-dts</code> | + | <code>export NANO_DTS_PATH=$L4T_DIR/sources/hardware/nvidia/platform/t210/</code> |
| | | |
| *Build default image, prepare L4T environment | | *Build default image, prepare L4T environment |
Line 89: |
Line 102: |
| <code>sudo ./apply_binaries.sh</code> | | <code>sudo ./apply_binaries.sh</code> |
| | | |
− | *Download VEYE code for Jetson Nano | + | *Download VEYE code for Jetson Nano<code><nowiki/></code><code>cd $L4T_DIR</code> |
− | | |
− | <code>cd $L4T_DIR</code> | |
| | | |
− | <code>git clone https://github.com/veyeimaging/jetson_nano<nowiki/>.git</code> | + | <code>git clone <nowiki>https://github.com/veyeimaging/nvidia_jetson_veye_bsp.git</nowiki></code> |
| | | |
− | <code>export RELEASE_PACK_DIR=$L4T_DIR/jetson_nano</code> | + | <code>export RELEASE_PACK_DIR=$L4T_DIR/nvidia_jetson_veye_bsp</code> |
| | | |
| ====Using prebuild Image and DTB==== | | ====Using prebuild Image and DTB==== |
| | | |
| =====Installing the Kernel and DTS===== | | =====Installing the Kernel and DTS===== |
− | <code>cd $RELEASE_PACK_DIR/binaries</code> | + | <code>cd $RELEASE_PACK_DIR/kernel_image</code> |
| | | |
− | <code>tar -xzvf Image.tar.gz</code> | + | - ''Jetpack4.2.2'' |
| + | |
| + | <code>tar -xzvf Image_l4t_r32.2.1_veyecam.tar.gz</code> |
| | | |
| <code>sudo cp Image $L4T_DIR/kernel/ -f</code> | | <code>sudo cp Image $L4T_DIR/kernel/ -f</code> |
| | | |
− | <code>sudo cp $RELEASE_PACK_DIR/binaries/tegra210-p3448-0000-p3449-0000-a02.dtb $L4T_DIR/kernel/dtb/tegra210-p3448-0000-p3449-0000-a02.dtb -f</code> | + | <code>sudo cp $RELEASE_PACK_DIR/Nano/JetPack_4.2.2_Linux_GA_P3448/dts\ dtb/VEYE-MIPI-327/tegra210-p3448-0000-p3449-0000-a02.dtb $L4T_DIR/kernel/dtb/ -f</code> |
| + | |
| + | <code>sudo cp $RELEASE_PACK_DIR/Nano/JetPack_4.2.2_Linux_GA_P3448/dts\ dtb/VEYE-MIPI-327/tegra210-p3448-0000-p3449-0000-b00.dtb $L4T_DIR/kernel/dtb/ -f</code> |
| + | |
| + | - ''Jetpack4.3'' |
| + | |
| + | <code>tar -xzvf Image_l4t_r32.3.1_veyecam.tar.gz</code> |
| + | |
| + | <code>sudo cp Image $L4T_DIR/kernel/ -f</code> |
| + | |
| + | <code>sudo cp $RELEASE_PACK_DIR/Nano/JetPack_4.3_Linux_P3448/dts\ dtb/VEYE-MIPI-327/tegra210-p3448-0000-p3449-0000-a02.dtb $L4T_DIR/kernel/dtb/ -f</code> |
| + | |
| + | <code>sudo cp $RELEASE_PACK_DIR/Nano/JetPack_4.3_Linux_P3448/dts\ dtb/VEYE-MIPI-327/tegra210-p3448-0000-p3449-0000-b00.dtb $L4T_DIR/kernel/dtb/ -f</code> |
| | | |
| <code>cd $L4T_DIR</code> | | <code>cd $L4T_DIR</code> |
| + | |
| ====Flashing the Jetson Nano Development Kit==== | | ====Flashing the Jetson Nano Development Kit==== |
| The steps to flash the Jetson Nano™ development kit are as follows: | | The steps to flash the Jetson Nano™ development kit are as follows: |
Line 118: |
Line 144: |
| a. Power OFF the board. | | a. Power OFF the board. |
| | | |
− | b. Connect the jumper pin to the pin 3 and pin 4 of the J40 button header. | + | b. For Jetson Nano A02: Connect the jumper pin to the pin 3 and pin 4 of the J40 button header. For Jetson Nano B01: Connect the jumper pin to the pin 9 and pin 10 of the J50 button header. |
| | | |
| c. Power ON the Jetson Nano™ development kit. | | c. Power ON the Jetson Nano™ development kit. |
Line 148: |
Line 174: |
| *patch code | | *patch code |
| | | |
− | <code>cp $RELEASE_PACK_DIR/sources/kernel/veye327/* $NVIDIA_PATH/drivers/media/i2c/</code> | + | <code>cp $RELEASE_PACK_DIR/drivers_source/cs_imx307\ veye327/* $NVIDIA_PATH/drivers/media/i2c/</code> |
| | | |
− | <code>cp $RELEASE_PACK_DIR/sources/kernel/kernel_veye327_config $L4T_DIR/sources/kernel/kernel-4.9/arch/arm64/configs/tegra_veye327_defconfig</code> | + | ''- r32.2.1'' |
| + | |
| + | <code>cp $RELEASE_PACK_DIR/drivers_source/kernel_csimx307veye327_config_32.2.1 $L4T_DIR/sources/kernel/kernel-4.9/arch/arm64/configs/tegra_csimx307veye327_defconfig</code> |
| + | |
| + | ''- r32.3.1'' |
| + | |
| + | <code>cp $RELEASE_PACK_DIR/drivers_source/kernel_csimx307veye327_config_32.3.1 $L4T_DIR/sources/kernel/kernel-4.9/arch/arm64/configs/tegra_csimx307veye327_defconfig</code> |
| | | |
| *build | | *build |
Line 156: |
Line 188: |
| <code>cd $L4T_DIR/sources/kernel/kernel-4.9/</code> | | <code>cd $L4T_DIR/sources/kernel/kernel-4.9/</code> |
| | | |
− | <code>make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_veye327_defconfig</code> | + | <code>make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_csimx307veye327_defconfig</code> |
| | | |
| <code>make ARCH=arm64 O=$TEGRA_KERNEL_OUT Image -j4</code> | | <code>make ARCH=arm64 O=$TEGRA_KERNEL_OUT Image -j4</code> |
Line 169: |
Line 201: |
| *patch code | | *patch code |
| | | |
− | <code>cp $RELEASE_PACK_DIR/sources/dts/kernel-dts/* $NANO_DTS_PATH/</code> | + | ''- Jetpack4.2.2'' |
| + | |
| + | <code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.2.2_Linux_GA_P3448/dts\ dtb/common/t210/* -r $NANO_DTS_PATH/</code> |
| + | |
| + | <code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.2.2_Linux_GA_P3448/dts\ dtb/VEYE-MIPI-327/tegra210-porg-plugin-manager.dtsi -r $NANO_DTS_PATH/porg/kernel-dts/porg-plugin-manager</code> |
| + | |
| + | ''- Jetpack4.3'' |
| | | |
− | <code>cp $RELEASE_PACK_DIR/sources/dts/kernel-dts/porg-platforms/* $NANO_DTS_PATH/porg-platforms/</code> | + | <code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.3_Linux_P3448/dts\ dtb/common/t210/* -r $NANO_DTS_PATH/</code> |
| | | |
− | <code>cp $RELEASE_PACK_DIR/sources/dts/kernel-dts/porg-plugin-manager/* $NANO_DTS_PATH/porg-plugin-manager/</code> | + | <code>cp $RELEASE_PACK_DIR/Nano/JetPack_4.3_Linux_P3448/dts\ dtb/VEYE-MIPI-327/tegra210-porg-plugin-manager.dtsi -r $NANO_DTS_PATH/porg/kernel-dts/porg-plugin-manager</code> |
| | | |
| *build | | *build |
Line 180: |
Line 218: |
| | | |
| <code>cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-a02.dtb $L4T_DIR/kernel/dtb/</code> | | <code>cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-a02.dtb $L4T_DIR/kernel/dtb/</code> |
| + | |
| + | <code>cp $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/tegra210-p3448-0000-p3449-0000-b00.dtb $L4T_DIR/kernel/dtb/</code> |
| | | |
| Could be used for Flashing or Upgrading. | | Could be used for Flashing or Upgrading. |
Line 217: |
Line 257: |
| The output message appears as shown below. | | The output message appears as shown below. |
| | | |
− | <code>subdev veye327 6-003b bound</code> | + | <code>subdev veye327 6/7/8-003b bound</code> |
| | | |
| The output message indicates that the camera is initialized properly. | | The output message indicates that the camera is initialized properly. |
Line 223: |
Line 263: |
| 3. Run the following command to check the presence of video node. | | 3. Run the following command to check the presence of video node. |
| | | |
− | <u><code>ls /dev/video0</code></u> | + | <u><code>ls /dev/video*</code></u> |
| | | |
| The output message appears as shown below. | | The output message appears as shown below. |
| | | |
− | <code>video0</code> | + | <code>video0(1)</code> |
| | | |
| ====Video Stream Toolkits Manual==== | | ====Video Stream Toolkits Manual==== |
Line 238: |
Line 278: |
| *Record FHD in H.264 format to a video file(HW accelerated) | | *Record FHD in H.264 format to a video file(HW accelerated) |
| | | |
− | <code>gst-launch-1.0 v4l2src ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! omxh264enc qp-range=20,20:20,20:-1,-1 ! matroskamux ! queue ! filesink location=videoname.mkv</code> | + | <code>gst-launch-1.0 v4l2src num-buffers=300 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! omxh264enc qp-range=20,20:20,20:-1,-1 ! matroskamux ! queue ! filesink location=videoname.mkv</code> |
| | | |
| *Playback of saved video file (HW accelerated) | | *Playback of saved video file (HW accelerated) |
Line 248: |
Line 288: |
| <code>gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! jpegenc ! filesink location=jpgname.jpg</code> | | <code>gst-launch-1.0 v4l2src num-buffers=1 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080" ! jpegenc ! filesink location=jpgname.jpg</code> |
| ====Video Control Toolkits Manual==== | | ====Video Control Toolkits Manual==== |
− | Jetson Nano use i2c-6 as camera control bus. | + | Jetson Nano A02 use i2c-6 as camera control bus,Jetson Nano B01 use i2c-7 and i2c-8 as camera control bus. |
| + | |
| + | Using -b option to identify which bus to use. |
| | | |
− | <code>cd $L4T_DIR/jetson_nano/i2c_cmd/bin</code> | + | <code>cd $RELEASE_PACK_DIR/i2c_cmd/bin</code> |
| | | |
| Video Control Toolkits Manual : [[VEYE-MIPI-290/327 i2c/|VEYE-MIPI-290/327 i2c]] | | Video Control Toolkits Manual : [[VEYE-MIPI-290/327 i2c/|VEYE-MIPI-290/327 i2c]] |
| ===Others=== | | ===Others=== |
| This article and the source code are still in the process of improving. If you have any suggestions for improvement, you are welcome to email xumm#csoneplus.com. | | This article and the source code are still in the process of improving. If you have any suggestions for improvement, you are welcome to email xumm#csoneplus.com. |