Getting started with TI Jacinto 7 Edge AI - Introduction - Getting Started

From RidgeRun Developer Connection
Jump to: navigation, search




Previous: Introduction/EVM Overview Index Next: Introduction/The Edge AI SDK





Overview

The Jacinto 7 is the Texas Instruments multi-part evaluation platform that lets you evaluate applications on Vision Analytics and Networking in the Automotive and Industrial markets. It is done with the EVM supported SDK-Vision Processor, that includes foundational Drivers, Compute and Vision Kernels, and example application Frameworks that demonstrate you how to take advantage of the powerful, heterogeneous Jacinto 7 architecture. The Jacinto 7 it's designed to lower overall evaluation costs with speed up development and reduce time-to-market.


For more details visit: https://www.ti.com/tool/J721EXCPXEVM.


Features:

  • UFS flash memory, 32GByte, 2Lane, Gear3
  • USB3.1 type C interface, support DFP, DRP, UFP modes
  • Display port, up to 4K resolution with MST support
  • 2x PCIe card slot, 1x PCIe M.2 slot (M‐Key), all Gen3

Build & install the Linux SDK

Ti logo 6.png The Linux SDK

Download alt font awesome.svg Download the Linux SDK

The product download for the Linux SDK can be found at the following link: https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-J721E/. You will find the SDK installer download link and further documentation.

Please, serve from this guide to get started with the SDK installation.

# Get the SDK installer from the product download link
wget https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/07_03_00_05/exports/ti-processor-sdk-linux-j7-evm-07_03_00_05-Linux-x86-Install.bin

# Give the SDK execution permissions
chmod +x ti-processor-sdk-linux-j7-evm-07_03_00_05-Linux-x86-Install.bin

# Execute the SDK installer
./ti-processor-sdk-linux-j7-evm-07_03_00_05-Linux-x86-Install.bin

Follow the SDK installer instructions, and at the "Choose Destination Location", add the directory with the SDK name at the current directory:

# ti-processor-sdk-linux-j7-evm-07_03_00_05-linux
Error creating thumbnail: Unable to save thumbnail to destination
# Enter the SDK workspace and run the setup script
cd ti-processor-sdk-linux-j7-evm-07_03_00_05-linux/
./setup.sh

Flash the SD card

Make sure to connect the SD card, and run the following flash script.

# Detect the SD card device on your computer: Plug out and plug in the SD card with this command running
watch ls /dev/*

# Select the SD device, and flash
SD_DEVICE=/dev/mmcblk0
sudo bin/mksdboot.sh --device $SD_DEVICE --sdk .

SD card bootup

Once the SD card is flashed, just make sure to accomplish these requirements and now the board it's ready to be boot up the image.

Requirements

  • Connected SD card to the EVM with a Jacinto 7 image
  • The EVM switches in boot mode: Boot modes switches


NFS bootup (optional)

The Network File Sytem (NFS) bootup method consists in a way to boot the board via the Network. That way the board filesystem, Kernel and DTBs could be locateded and load from a remote address. This setup needs an NFS & TFTP servers on the host, that handles the files transfers.
In order to select the NFS mode on the board, it's needed to be done on the Bootloader stage, where these Bootloader artifacts can be loaded and sourced from the remote server. This settings will be handled by a script the SDK will deploy.


Requirements:

  • TI Jacinto 7 board connected through USB the PC.
  • TI Jacinto 7 board connected through Ethernet to the same Network the PC does.
  • Connected SD card with a Jacinto 7 image (or at least the boot partition with the Bootloader).
  • The EVM switches in boot mode: Boot mode switches.
  • The bootup script, setupBoard.minicom, configured for NFS (This script will be deployed by the SDK in the following step)

Configuring host machine to enable NFS

Please follow these commands on the Host machine in order to have all the NFS server configurations that lets you communicate the board to a terminal on the host computer with the NFS'd filesystem.


Dependencies:

sudo apt install nfs-kernel-server
sudo apt install xinetd
sudo apt install tftpd-hpa
Find the USB port device

The USB device can be found this way:

# Plug out and plug in the USB cable
watch ls /dev/tty* 
/dev/ttyUSB0
Find the server IP (the IP of your computer)

The computer IP could be find out with this command, at the first IP:

hostname -I
Set the TFTP server directory
vi /etc/default/tftpd-hpa
# [Update this variable]
# TFTP_DIRECTORY="/tftpboot"

The script execution

At the SDK root path, execute the setup script:

sudo ./setup.sh

Proceed with the SDK setup script and reach out to the point the script stands for the Minicom (serial communication application) setup for SDK development.

The script execution would look like the following:

# Which serial port do you want to use with minicom?
$ [ /dev/ttyS0 ] /dev/ttyUSB0
--------------------------------------------------------------------------------
This step will set up the u-boot variables for booting the EVM.
--------------------------------------------------------------------------------
Autodetected the following ip address of your host, correct it if necessary
[ 192.168.1.55
172.17.0.1 ] 192.168.1.55 

Select Linux kernel location:
 1: TFTP
 2: SD card

[ 1 ] 1

Select root file system location:
 1: NFS
 2: SD card

[ 1 ] 1

Available kernel images in /tftproot:
    Image-j7-evm.bin
    k3-j721e-common-proc-board-infotainment.dtbo
    k3-j721e-common-proc-board-jailhouse.dtbo
    k3-j721e-common-proc-board.dtb
    k3-j721e-edgeai-apps.dtbo
    k3-j721e-pcie-backplane.dtbo
    k3-j721e-proc-board-tps65917.dtb
    k3-j721e-vision-apps.dtbo
    ti-fs-firmware-j721e-gp.bin
    ti-fs-firmware-j721e-hs-cert.bin
    ti-fs-firmware-j721e-hs-enc.bin

Which kernel image do you want to boot from TFTP?
[ Image-j7-evm.bin ] 
--------------------------------------------------------------------------------
Would you like to create a minicom script with the above parameters (y/n)?
[ y ] y

--------------------------------------------------------------------------------
Would you like to run the setup script now (y/n)?

Please connect the ethernet cable as described in the Quick Start Guide.
Once answering 'y' on the prompt below, you will have 300 seconds to connect
the board and power cycle it before the setup times out

After successfully executing this script, your EVM will be set up. You will be 
able to connect to it by executing 'minicom -w' or if you prefer a windows host
you can set up Tera Term as explained in the Software Developer's Guide.
If you connect minicom or Tera Term and power cycle the board Linux will boot.

[ y ] y

Welcome to minicom 2.7.1

OPTIONS: I18n 
Compiled on Aug 13 2017, 15:25:34.
Port /dev/ttyUSB0, 16:47:36



The result it's a Minicom script with the Bootloader sequence and configuration to boot the TI J7 via the NFS/TFTP.

Test the NFS boot

You can reconnect to the board using the created Minicom script, and it would be this way:

# Connect to the board
sudo minicom -S bin/setupBoard.minicom

# [Restart the board with the power switch]

At the SDK root path, touch a file on the NFS'd filesystem:

touch targetNFS/home/1234567

At the J7 NFS session, the file will be found:

ls /home/
1234567 root


Install the RTOS Linux SDK

Ti logo 6.png The RTOS Linux SDK

Download alt font awesome.svg Download the RTOS image

The product download for the RTOS SDK can be found at the following link: https://www.ti.com/tool/download/PROCESSOR-SDK-RTOS-J721E/. You will find the SDK installer download link and further documentation.

Please, serve from this guide to get started with the SDK installation.

# Get the RTOS image from the product download link
wget https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/07_03_00_07/exports/ti-processor-sdk-rtos-j721e-evm-07_03_00_07-prebuilt.tar.gz
tar -xvf ti-processor-sdk-rtos-j721e-evm-07_03_00_07-prebuilt.tar.gz
cd ti-processor-sdk-rtos-j721e-evm-07_03_00_07-prebuilt

Flash the SD card

Insert a formatted SD card, and follow these instructions:

# Watch the device being recognized
watch ls /dev/*

# Select the SD device, and flash
SD_DEVICE=/dev/mmcblk0
sudo ./mk-linux-card.sh $SD_DEVICE
./install_to_sd_card.sh

# Install optional extra dataset in the file system partition
./install_data_set_to_sd_card.sh psdk_rtos_ti_data_set_07_03_00.tar.gz
./install_data_set_to_sd_card.sh  psdk_rtos_ti_data_set_ptk_07_01_00.tar.gz

SD card bootup

In order to bootup from the SD card, please make sure to meet the SD_card_bootup requirements.

Login to the Jacinto 7 board

Ti logo 6.png Login to the J7 board

Once the board setup is complete, there are two ways to login to the Jacinto board:

  1. Connecting the board to a computer using a UART cable and minicom as the serial port communications program.
  2. Connecting remotely through ssh.

Below are the steps to login with any of the two options.

Login to the board with an UART cable

Follow these steps to login to the board using an UART cable:

1. Make sure the board is powered on.

2. Connect the board to a computer with an USB to Micro USB UART cable.

3. Run the following command:

sudo minicom -D /dev/ttyUSB0

4. When the command line asks to login, type root (no password is needed).

After this step you should be logged in to the Jacinto board. The command line session should look something like the following:

root@j7-evm:~#

Login to the board through ssh

To connect remotely to the board, follow these steps:

1. Make sure the board is powered on.

IMPORTANT: The Jacinto 7 board's IP needs to be already known to be able to login remotely. If the board's IP is not known, follow the steps of the Login to the board with an UART cable section. Once you are logged in to the board, run the following command to find out the board's IP address:

ifconfig

Since the board is connected to Ethernet, the IP will most likely be the one under the eth0 network interface.

2. Once the IP is known, run the following command to connect through SSH (no password is needed):

ssh root@<board's IP address>

Note: Make sure the board and the host computer are both in the same network.

After this step you should be logged in to the Jacinto board. The command line session should look something like the following:

root@j7-evm:~#


Previous: Introduction/EVM Overview Index Next: Introduction/The Edge AI SDK