Introduction to Jetson, programming development and environment construction

Introduction to Jetson, programming development and environment construction

Introduction

Jetson is a series of embedded systems launched by NVIDIA, designed for the development of machine learning and artificial intelligence applications. Jetson platforms typically use NVIDIA's GPU acceleration technology to provide high-performance computing capabilities. NVIDIA has launched multiple Jetson series products, such as Jetson Nano, Jetson TX2, Jetson Xavier NX, etc. Each product has different hardware specifications and performance characteristics, so choosing the right Jetson product depends on the needs of the project.

Jetson development usually requires the use of JetPack SDK, which is a software suite that includes important tools and libraries such as CUDA, cuDNN, and TensorRT. JetPack simplifies the setup and software installation of your Jetson device. Among them, CUDA is NVIDIA's parallel computing platform and programming model, which is used to utilize the parallel computing capabilities of GPU. In Jetson development, CUDA can be used to accelerate computationally intensive tasks such as deep learning inference and image processing; cuDNN and TensorRT: cuDNN (CUDA Deep Neural Network) is a deep learning library provided by NVIDIA, while TensorRT is used for deep learning inference. High performance inference engine. Jetson supports a variety of deep learning frameworks, including TensorFlow, PyTorch, and Caffe. When developing Jetson, you need to understand the device's Board Support Package (BSP). The BSP contains key components such as device drivers and operating systems to ensure compatibility between software and hardware. Additionally, Jetson devices often have GPIO pins that can be used to control external devices and sensors.

Jetson development can use integrated development environments such as NVIDIA Nsight Eclipse Edition, which can easily perform code editing, debugging and performance analysis.

Taking the Orin series as an example, a series of parameters of the product are displayed:
Insert image description here

Common commands

Jetson’s common commands are the same as those on Linux. Some common commands are listed below:

View system information:
uname -a: Display kernel information.
cat /etc/os-release: View operating system version information.
lshw: Display hardware information.
jetson_release: Check jetpack version
dmesg | grep DTB: Check DTB version

File and directory management:
ls: List files and subdirectories of the current directory
cd: Switch directories
cp: Copy files or directories
mv: Move files or directories
rm: Delete files or directories
mkdir: Create new directories

User and Privilege Management:
sudo: Execute commands with superuser privileges.
useradd: Add new user.
passwd: Change user password.
chown: Change file owner.
chmod: Change file permissions.

Network Management:
ifconfigOr ip addr: View network interface information
ping: Test network connection
traceroute: Trace the path of packets
ssh: Telnet to other computers

Package management (APT based systems such as Ubuntu):
sudo apt update: Update package list
sudo apt upgrade: Upgrade installed packages
sudo apt install <package>: Install packages
sudo apt remove <package>: Uninstall packages

System monitoring and performance analysis:
top: Display system process information in real time
htop: Display system process information interactively
nvidia-smi: Display NVIDIA GPU information
dmesg: Display kernel log

View logs:
cat /var/log/syslog: View system logs
cat /var/log/dmesg: View kernel logs
journalctl: View system logs

Other commonly used commands:
wget: Download files
tar: Unzip tar files
ps: Display current process
kill: Terminate process
history: View the history of recently executed commands

Jetpack environment setup

Prerequisites: Prepare a Linux computer, USB-a to USB-b data cable (used to connect NX and your own computer), 1 female-to-female DuPont cable (used to connect the FC REC and GND pins on the Jetson device , putting the Jetson device into recovery mode), keyboard, mouse and monitor.

Proceed as follows:

  1. Install NVIDIA SDK Manager:
    Go to the NVIDIA SDK Manager official website, download the deb file and install it.
  2. Connect the Jetson device:
    Connect the Jetson device to the host computer via a USB cable, and connect the Dupont cable to the FC REC and GND pins on the Jetson device to put the Jetson device into recovery mode and use the power supply to power the Jetson device.
  3. Open sdkmanager:
    Enter the command in Terminal sdkmanagerto open the application window.
  4. Select target device and version:
    In SDKManager, select your Jetson device model and select the firmware and software versions to install.
  5. Set up the connection:
    sdkmanager will guide you to further settings, which may involve network settings, path configuration, system settings, etc.
  6. Installation:
    After completing the setup, start the installation process. sdkmanager will download and install new firmware and software versions to the Jetson device. The installation process may take some time, depending on your network speed and Jetson device model.
  7. Verification:
    After the installation is complete, verify that the new version on the Jetson device was successfully installed. Use a mouse, keyboard, and monitor to connect to the Jetson device and check system information, or view the Jetson device's system logs.
  8. Back up and restore data:
    Before and after the update, make sure to back up important data on your Jetson device. After the update is complete, restore your data to ensure that apps and settings are not lost.

For more detailed graphic process, please refer to: Basic environment construction .

Guess you like

Origin blog.csdn.net/weixin_43603658/article/details/129068484