Install and Setup Prerequisites for NVIDIA Boards
MATLAB® Coder™ Support Package for NVIDIA® Jetson™ and NVIDIA DRIVE® Platforms supports the following development boards:
NVIDIA Jetson Orin™.
NVIDIA Xavier™ NX.
NVIDIA Jetson AGX Xavier.
NVIDIA Jetson Nano.
NVIDIA Jetson TX2.
NVIDIA Jetson TX1.
NVIDIA DRIVE PX2.
The support package uses an SSH connection over TCP/IP to execute commands while building and running the generated code on the DRIVE or Jetson platforms. Connect the target platform to the same network as the host computer. Alternatively, use an Ethernet crossover cable to connect the board directly to the host computer.
On the Windows® platform, open port
18735 in the
Windows Firewall settings. This port is needed to establish a
connection to the MATLAB server running on the embedded platforms.
Use the JetPack (NVIDIA) or the DriveInstall (NVIDIA) software to install the OS image, developer tools, and the libraries required for developing applications on the Jetson or DRIVE platforms. You can use the
Component Managerin the
DriveInstallsoftware to select the components to be installed on the target hardware. For installation instructions, refer to the NVIDIA board documentation. At a minimum, you must install:
GStreamer library (v1.0 or higher) for deployment of the
The MATLAB Coder Support Package for NVIDIA Jetson and NVIDIA DRIVE Platforms has been tested with the following JetPack and DRIVE SDK versions:
Hardware Platform Software Version
Jetson Orin, Xavier NX, AGX Xavier
NVIDIA Clara AGX™
TensorRT and GPIO workflows are not supported.
Jetson TX2/TX1, Nano
DRIVE SDK 188.8.131.52-12606092
Install the Simple DirectMedia Layer (SDL v1.2) library, V4L2 library, and V4L2 utilities for running the webcam examples. You must also install the development packages for these libraries.
For deploying the Audio File Read Simulink® block, install the Sound eXchange (SoX) utility and its development and format libraries.
For example, on Ubuntu®, use the
apt-getcommand to install these libraries.
sudo apt-get install libsdl1.2-dev v4l-utils sox libsox-fmt-all libsox-dev
For using Modbus® functions and blocks, install the
libmodbuslibraries from https://github.com/stephane/libmodbus.
For example, on Ubuntu, use the following commands to install these libraries.
git clone https://github.com/stephane/libmodbus cd libmodbus ./autogen.sh ./configure && sudo make install
Environment Variable on the Target
The support package uses environment variables to locate the necessary tools, compilers, and libraries required for code generation. Ensure that the following environment variables are set.
|Variable Name||Default Value||Description|
Path to the CUDA toolkit executable on the Jetson or DRIVE platform.
Path to the CUDA library folder on the Jetson or DRIVE platform.
Ensure that the required environment variables are accessible from
non-interactive SSH logins. For example, you can use the
export command at the beginning of the
$HOME/.bashrc shell configuration file to add the
Alternatively, you can set system-wide environment variables in the
/etc/environment file. You must have
sudo privileges to edit this file.
Camera connected to the USB or CSI port of the target hardware.
USB audio device for recording and playback of audio signals.
Development Host Requirements
MATLAB Coder (required).
GPU Coder™ (required for GPU targeting).
Parallel Computing Toolbox™ (required for GPU targeting).
Simulink (required for generating code from Simulink models).
Computer Vision Toolbox™ (recommended).
Deep Learning Toolbox™ (required for deep learning).
Embedded Coder® (recommended).
Image Processing Toolbox™ (recommended).
Simulink Coder (required for generating code from Simulink models).
MATLAB Coder Interface for Deep Learning and GPU Coder Interface for Deep Learning support packages (required for deep learning).
NVIDIA GPU enabled for CUDA.
CUDA toolkit and driver.
CUDA Deep Neural Network library (cuDNN).
NVIDIA TensorRT – high performance deep learning inference optimizer and run-time library.
For information on the version numbers for the compiler tools and libraries, see Installing Prerequisite Products (GPU Coder). For information on setting up the environment variables on the host development computer, see Setting Up the Prerequisite Products (GPU Coder).