### Run Lenet example with Radxa AI SDK Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_cubie_lenet.mdx Execute the Lenet example application after compilation and environment setup. This involves navigating to the example installation directory and running the 'lenet' executable with the NBG model and input data paths. The output shows the execution details and inference results. ```bash cd $INSTALL_PREFIX/etc/npu/lenet # ./lenet nbg_model input_picture ./lenet ./model/lenet.nb ./input_data/lenet.dat ``` ```bash (.venv) rock@radxa-cubie-a7a:~/ai-sdk/examples/lenet/etc/npu/lenet$ ./lenet ./model/network_binary.nb ./input_data/lenet.dat ./lenet nbg input VIPLite driver software version 2.0.3.2-AW-2024-08-30 viplite init OK. VIPLite driver version=0x00020003... VIP cid=0x1000003b, device_count=1 * device[0] core_count=1 awnn_init total: 4.07 ms. vip_create_network ./model/network_binary.nb: 1.10 ms. input 0 dim 28 28 1 1, data_format=2, name=input/output[0], elements=134284329, scale=0.003922, zero_point=0 create input buffer 0: 784 output 0 dim 10 1, data_format=1, name=uid_8_sub_uid_1_out_0, elements=10, none-quant create output buffer 0: 20 memory pool size=0 bytes load_param ./model/network_binary.nb: 0.24 ms. prepare network ./model/network_binary.nb: 0.13 ms. set network io ./model/network_binary.nb: 0.01 ms. awnn_create total: 1.54 ms. memcpy(0xffffacd12000, 0xaaaada2fed20, 784) load_input_data: 0.01 ms. vip_flush_buffer input: 0.01 ms. awnn_set_input_buffers total: 0.04 ms. vip_run_network: 0.22 ms. vip_flush_buffer output: 0.00 ms. fp16 memcpy: 0.00 ms. tensor to fp: 0.01 ms. awnn_run total: 0.27 ms. 0.999512 0.000000 0.000120 0.000000 0.000000 0.000163 0.000152 0.000000 0.000000 0.000082 awnn_destroy total: 0.47 ms. awnn_uninit total: 0.67 ms. ``` -------------------------------- ### Download Qwen2.5-VL-3B-Instruct Example with huggingface-cli Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/VLM/qwen2.5-vl-3b.md Installs the huggingface_hub CLI and downloads the Qwen2.5-VL-3B-Instruct example application repository to the local directory. This is a prerequisite for running the example. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/Qwen2.5-VL-3B-Instruct --local-dir ./Qwen2.5-VL-3B-Instruct cd Qwen2.5-VL-3B-Instruct ``` -------------------------------- ### Download Depth-Anything-V2 Repository using huggingface-cli Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/vision-models/depth-anything-v2.md Installs the huggingface-cli tool and downloads the Depth-Anything-V2 example application repository to the local directory. This is the initial step to get the application's code. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/Depth-Anything-V2 --local-dir ./Depth-Anything-V2 cd Depth-Anything-V2 ``` -------------------------------- ### Install and Download YOLOv11 Example App Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/vision-models/yolov11.md Installs the huggingface-cli tool and downloads the YOLOv11 example application repository to the host device. This is a prerequisite for running the inference example. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/YOLO11 --local-dir ./YOLO11 cd YOLO11 ``` -------------------------------- ### Start Docker Script for ROS2 Humble Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/radxa-os/application-dev/ros-dev/ros2-dev/_example.mdx This bash script is used to start the ROS2 Humble Docker environment. Ensure you have the 'ros_humble.sh' script available in your ROS2 setup. This is typically run in a terminal to initialize the ROS2 container. ```bash ros_humble.sh ``` -------------------------------- ### Klipper Configuration Example Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/apps/_klipper.mdx Shows an example of a Klipper configuration file ('printer.cfg'), including includes for Fluidd and Mainsail, MCU serial port definition, virtual SD card settings, and basic printer kinematics. Replace '' with the actual serial ID found. ```cfg cat printer_data/config/printer.cfg [include fluidd.cfg] [include mainsail.cfg] [mcu] serial: /dev/serial/by-id/ [virtual_sdcard] path: /home/radxa/printer_data/gcodes on_error_gcode: CANCEL_PRINT [printer] kinematics: none max_velocity: 1000 max_accel: 1000 [mcu] serial:/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0 ``` -------------------------------- ### Install RKNN Toolkit Lite2 Example on Board Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_rknn-toolkit2.mdx Installs the example package for RKNN Toolkit Lite2 on a Rockchip board. This provides sample code to test the NPU capabilities. ```bash sudo apt update sudo apt install python3-rknnlite2-example ``` -------------------------------- ### Download YOLOv8-Seg Example Application (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/vision-models/yolov8-seg.md This snippet demonstrates how to download the YOLOv8-Seg example application repository using the `huggingface-cli` tool. It installs the necessary package and clones the repository to a local directory. Ensure you have Python and pip installed. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/YOLOv8-Seg --local-dir ./YOLOv8-Seg cd YOLOv8-Seg ``` -------------------------------- ### Start ROS1 Docker Environment Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/radxa-os/application-dev/ros-dev/ros1-dev/_example.mdx Executes the ROS1 Noetic Docker environment setup script. This is the initial step to prepare your ROS1 environment, typically run in a bash shell. Ensure the `ros_noetic.sh` script is available and executable. ```bash bash ros_noetic.sh ``` -------------------------------- ### Install CasaOS Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_casaos_intro_general.mdx Installs CasaOS on a device using a curl command to download and execute the installation script. This is the primary method for setting up CasaOS. ```bash curl -fsSL https://get.casaos.io | sudo bash ``` -------------------------------- ### Install and Download YOLOv8 Example Application Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/vision-models/yolov8s.md Installs the huggingface_hub CLI and downloads the YOLOv8 example application repository to the host device. This step is necessary to obtain the application files and models. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/YOLOv8 --local-dir ./YOLOv8 cd YOLOv8 ``` -------------------------------- ### Download YOLOv11-Pose Example Application Repository Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/vision-models/yolov11-pose.md Installs the huggingface-cli tool and downloads the YOLO11-Pose example application repository to the host device. It assumes Python 3 is available and uses pip for installation. The output is the cloned repository in the current directory. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/YOLO11-Pose --local-dir ./YOLO11-Pose cd YOLO11-Pose ``` -------------------------------- ### Install Docker Engine (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_cubie_acuity_env.mdx Installs the Docker CE (Community Edition), CLI, containerd.io, and necessary plugins on an x86 Linux PC (Ubuntu example). This command uses apt-get to install the specified Docker packages. ```bash sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin ``` -------------------------------- ### Install and Run Pulseaudio for Bluetooth Audio Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/accessories/_wifi-bt.mdx Steps to install the necessary pulseaudio modules for Bluetooth audio playback and start the pulseaudio service. Requires root privileges. ```bash apt-get install -y pulseaudio-module-bluetooth pulseaudio pulseaudio --start ``` -------------------------------- ### Prepare pico-sdk and pico-examples for RP2350 RISC-V (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_pico2-riscv32-toolchain.mdx Clones the pico-sdk and pico-examples repositories and initializes submodules for the SDK. This sets up the necessary codebases for RP2350 RISC-V development. ```bash git clone https://github.com/raspberrypi/pico-sdk.git cd pico-sdk git submodule update --init git clone https://github.com/raspberrypi/pico-examples.git --branch master ``` -------------------------------- ### Build - Step-by-step Build Commands Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/zero/zero3/other-os/android/lowlevel-development.md These commands provide a step-by-step guide to building Android, including setting up the board environment, building u-boot, building the kernel, building AOSP, creating images, and packing the images. ```Bash android11 $ export PRODUCT_NAME="rk356x_radxa_zero3" android11 $ export PRODUCT_UBOOT_CONFIG="rk3566" android11 $ export PRODUCT_KERNEL_CONFIG="rockchip_defconfig android-11.config rock3_zero_w.config" android11 $ export PRODUCT_KERNEL_DTS="rk3566-radxa-zero3" ``` ```Bash android11 $ cd u-boot android11/u-boot $ make clean android11/u-boot $ make mrproper android11/u-boot $ make distclean android11/u-boot $ make ./make.sh ${PRODUCT_UBOOT_CONFIG} android11 $ cd - ``` ```Bash android11 $ cd kernel android11/kernel $ ADDON_ARGS="CC=../prebuilts/clang/host/linux-x86/clang-r383902b/bin/clang LD=../prebuilts/clang/host/linux-x86/clang-r383902b/bin/ld.lld" android11/kernel $ make clean android11/kernel $ make $ADDON_ARGS ARCH=arm64 ${PRODUCT_KERNEL_CONFIG} android11/kernel $ make $ADDON_ARGS ARCH=arm64 ${PRODUCT_KERNEL_DTS}.img -j$(nproc) android11 $ cd - ``` ```Bash android11 $ source build/envsetup.sh android11 $ lunch ${PRODUCT_NAME}-userdebug android11 $ make -j$(nproc) ``` ```Bash android11 $ rm -rf rockdev android11 $ ln -s RKTools/linux/Linux_Pack_Firmware/rockdev . android11 $ ./mkimage.sh ``` ```Bash android11 $ cd rockdev android11/rockdev $ rm -rf Image android11/rockdev $ ln -s Image-${PRODUCT_NAME} Image # RkUpdate Image android11/rockdev $ ./mkupdate_rk356x.sh # gpt Image radxa:rock-android11/rockdev $ ./android-gpt.sh ``` -------------------------------- ### Install iperf3 for Network Testing Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/accessories/dual-2.5-router-hat/dual-2.5-router-for-rpi5/start-use.md Install the 'iperf3' tool on your Raspberry Pi 5, which is used for measuring network throughput and performance. This command updates the package list and then installs iperf3. ```bash sudo apt-get update sudo apt-get install iperf3 ``` -------------------------------- ### Download Real-ESRGAN Repository (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/vision-models/real-esrgan.md Installs the necessary tool and downloads the Real-ESRGAN example application repository from GitHub. It prepares the environment for subsequent steps. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/Real-ESRGAN --local-dir ./Real-ESRGAN cd Real-ESRGAN ``` -------------------------------- ### Start Jupyter Notebook Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_aimet.mdx This command launches the Jupyter Notebook interface, typically opening it in the default web browser. It allows users to navigate to and execute the downloaded example notebooks. ```bash cd aimet jupyter-notebook ``` -------------------------------- ### Initialize Build Environment and Start Compilation (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/yocto/_build-system.mdx Initializes the Yocto build environment and starts the compilation process for the 'core-image-minimal' image. This command should be run from the SDK root directory. ```bash cd ~/yocto-rockchip-sdk source ./oe-init-build-env bitbake core-image-minimal ``` -------------------------------- ### Download DX-ALL-SUITE Repository (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/dx-m1/dx-sdk/dx-sdk-introduction.md This command sequence downloads the DX-ALL-SUITE repository, which integrates the DEEPX-SDK for simplified installation and usage. It first sets the version environment variable and then clones the repository with submodules. Ensure you have git installed. ```bash export VERSION=v1.0.0 ``` ```bash git clone -b ${VERSION} --recurse-submodules https://github.com/DEEPX-AI/dx-all-suite.git ``` -------------------------------- ### Download SmolLM2-360M-Instruct Application Repository Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/LLM/smolLM2-360m.md Installs the huggingface_hub CLI and downloads the SmolLM2-360M-Instruct example application repository to the local directory. This step is crucial for obtaining the necessary application files. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/SmolLM2-360M-Instruct --local-dir ./SmolLM2-360M-Instructcd DeepSeek-R1-Distill-Qwen-1.5B cd SmolLM2-360M-Instruct ``` -------------------------------- ### Install QAIRT Python Library Dependencies Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_qairt-install.mdx This command executes a Python script to check and potentially install the required Python libraries for the QAIRT SDK. It ensures that all necessary Python packages are available in the active Python environment. Requires Python 3 and pip to be installed. ```bash python3 "${QAIRT_SDK_ROOT}/bin/check-python-dependency" ``` -------------------------------- ### Setup and Run ImageNet Object Classification Example Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/dx-m1/dx-sdk/dx-app.md Downloads required test models, images, and video resources for running AI examples, then executes the ImageNet object classification script. The output shows the inference process and classification results for sample images. ```bash ./setup.sh ``` ```bash ./scripts/run_classifier.sh ``` -------------------------------- ### Install Yocto Build Dependencies (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/yocto/_build-system.mdx Installs essential packages required for building Yocto Project components on an Ubuntu or WSL2 system. This includes tools for compilation, package management, and source control. ```bash sudo apt-get update sudo apt-get install \ build-essential chrpath cpio debianutils diffstat file gawk gcc git \ iputils-ping libacl1 liblz4-tool locales python3 python3-git \ python3-jinja2 python3-pexpect python3-pip python3-subunit socat \ texinfo unzip wget xz-utils zstd repo -y ``` -------------------------------- ### Install Dial-up Software (Debian/Ubuntu) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/accessories/_mobile-lte-em05-ce.mdx Installs necessary packages for dial-up networking, including `ppp` for Point-to-Point Protocol, `picocom` for serial communication, and `net-tools` for network utilities. This command requires root privileges. ```bash sudo apt update sudo apt install ppp picocom net-tools ``` -------------------------------- ### Navigate to Example Directory Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_beit_qai-app-builder.mdx Changes the current directory to the location of the Python example scripts for the AI Engine Direct Helper. ```bash cd ai-engine-direct-helper/samples/python ``` -------------------------------- ### Download Example Notebook for Quantization Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_aimet.mdx This command downloads a specific example Jupyter notebook (`quantsim-resnet50.ipynb`) used for demonstrating ONNX quantization with AIMET. It ensures the notebook is placed in the correct directory for execution. ```bash cd Examples/onnx/quantization wget https://github.com/ZIFENG278/resnet50_qairt_example/raw/refs/heads/main/notebook/quantsim-resnet50.ipynb ``` -------------------------------- ### Configure Virtual Monitors Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/radxa-os/xfce/_remote-access.mdx Installs necessary packages and configures the system to use a virtual monitor, an optional step for headless setups. It involves installing a dummy video driver and creating a configuration file. ```bash sudo apt update sudo apt install xserver-xorg-video-dummy sudo mv /usr/share/X11/xorg.conf.d/20-modesetting.conf /usr/share/X11/xorg.conf.d/20-modesetting.bak sudo nano /etc/X11/xorg.conf.d/10-headless.conf ``` -------------------------------- ### Set Up ROS 2 Humble Environment (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_ros2-humble-compilation.mdx Appends the ROS 2 Humble setup script to the user's bashrc file and sources it, making ROS 2 commands available in the current terminal session and future sessions. Replace `path_to_ros2_source` with the actual path to your `ros2_humble` directory. ```bash echo -e "source ${path_to_ros2_source}/ros2_humble/install/setup.bash" >> $HOME/.bashrc source $HOME/.bashrc ``` -------------------------------- ### ROS 2 Talker Output Example (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_ros2-humble-compilation.mdx Example output from the ROS 2 C++ talker node, showing messages being published with timestamps and sequential numbering. This output confirms the talker node is operational. ```bash ros2 run demo_nodes_cpp talker [INFO] [1728966840.691346935] [talker]: Publishing: 'Hello World: 1' [INFO] [1728966841.691537928] [talker]: Publishing: 'Hello World: 2' [INFO] [1728966842.691572879] [talker]: Publishing: 'Hello World: 3' [INFO] [1728966843.691563207] [talker]: Publishing: 'Hello World: 4' [INFO] [1728966844.691568120] [talker]: Publishing: 'Hello World: 5' ``` -------------------------------- ### Navigate and Run NPU Example (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/ai/_cubie_vpm_run.mdx This command navigates to the NPU example directory and executes the vpm_run command with a specified configuration file and loop count. The output shows the execution details and performance metrics. ```bash cd $INSTALL_PREFIX/etc/npu/vpm_run ./vpm_run -s sample.txt -l 1 ``` -------------------------------- ### Initialize Allwinner SDK Build Environment Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/cubie/a5e/other-system/tina-os/build-system.md This command initializes the build environment for the Allwinner SDK. It sources the necessary setup script and makes build functions available in the current shell session. This is a prerequisite for all subsequent build operations. ```bash source build/envsetup.sh ``` -------------------------------- ### Download StableDiffusion 1.5 LCM Example Application Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/text-to-image/sd15.md Installs the huggingface-cli tool and downloads the StableDiffusion 1.5 LCM example application repository to the local directory. This is the first step to get the necessary files for running the application. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/lcm-lora-sdv1-5 --local-dir ./lcm-lora-sdv1-5 cd lcm-lora-sdv1-5 ``` -------------------------------- ### Allwinner SDK Build and Pack Commands Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/cubie/a5e/other-system/tina-os/build-system.md This section details various commands for building specific components (bootloader, kernel, rootfs), configuring build options (menuconfig, saveconfig), cleaning the build, and packing the final firmware image. It includes options for debug information and secure boot. ```bash build.sh build.sh bootloader build.sh kernel build.sh buildroot_rootfs build.sh uboot_menuconfig build.sh uboot_saveconfig build.sh menuconfig build.sh saveconfig build.sh recovery_menuconfig build.sh recovery_saveconfig build.sh buildroot_menuconfig build.sh buildroot_saveconfig build.sh clean build.sh distclean build.sh pack build.sh pack_debug build.sh pack_secure build.sh pack_secure pack pack -d pack -s pack -sd ``` -------------------------------- ### Run iperf3 Server Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/accessories/dual-2.5-router-hat/dual-2.5-router-for-rpi5/start-use.md Start the 'iperf3' tool in server mode on a secondary device on your network. This device should have at least 2.5G Ethernet capabilities and iperf3 installed. It will listen for incoming connections from the client. ```bash iperf3 -s ``` -------------------------------- ### ROS 2 Listener Output Example (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_ros2-humble-compilation.mdx Example output from the ROS 2 Python listener node, showing received messages with timestamps. This output confirms the listener node is operational and receiving data from the talker node. ```bash ros2 run demo_nodes_py listener [INFO] [1728966840.716456921] [listener]: I heard: [Hello World: 1] [INFO] [1728966841.698002748] [listener]: I heard: [Hello World: 2] [INFO] [1728966842.697675740] [listener]: I heard: [Hello World: 3] [INFO] [1728966843.697643318] [listener]: I heard: [Hello World: 4] [INFO] [1728966844.697551980] [listener]: I heard: [Hello World: 5] ``` -------------------------------- ### Set Environment Variables for QDL on Ubuntu Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/fogwise/airbox-q900/getting-started/install-system/onboard-ufs.md This section outlines the process for setting up the QDL tool on Ubuntu. It includes checking the tool's path, granting executable permissions, creating a symbolic link to make it accessible system-wide, and verifying the installation by running the 'qdl' command. ```shell realpath qdl ``` ```shell sudo chmod 777 qdl ``` ```shell sudo ln -s /home/user_name/download/QDL_2.3.9.2_Linux_x64/qdl /usr/local/bin/qdl ``` ```shell qdl ``` -------------------------------- ### Pico SDK Example for Radxa X2L on Linux Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/x/x2l/software-development/c_sdk_examples.md This snippet provides an example of using the pico-sdk for the Radxa X2L product on a Linux platform. It is part of the broader pico-examples framework. The `flash_url` parameter indicates the location for firmware flashing. ```markdown import SDK_EXAMPLE from "../../../common/dev/_pico-sdk-example.mdx"; ``` -------------------------------- ### Clone RISC-V GNU Toolchain Repository (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_pico2-riscv32-toolchain.mdx Clones the official RISC-V GNU toolchain source code from GitHub. This is the starting point for building the cross-compiler. ```bash git clone https://github.com/riscv-collab/riscv-gnu-toolchain.git ``` -------------------------------- ### Start Live Camera Preview with Cheese Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/compute-module/nx5/accessories/camera.md Launches the 'cheese' application to display a live preview from the connected camera. This command assumes 'cheese' has been successfully installed and the camera is properly configured and connected. ```bash sudo cheese ``` -------------------------------- ### Download Example Application Repository with huggingface-cli Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/LLM/ds-r1-qwen-7b.md Downloads the example application repository using huggingface-cli. This involves installing the CLI tool and then downloading the specified model files to a local directory. It prepares the environment for subsequent steps. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/DeepSeek-R1-Distill-Qwen-7B-GPTQ-Int4 --local-dir ./DeepSeek-R1-Distill-Qwen-7B-GPTQ-Int4 cd DeepSeek-R1-Distill-Qwen-7B ``` -------------------------------- ### Initialize and Sync Yocto SDK Source (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/yocto/_build-system.mdx Initializes the Yocto Project SDK repository and synchronizes the source code for the specified branch. This command requires the 'repo' tool to be installed. ```bash mkdir ~/yocto-rockchip-sdk && cd ~/yocto-rockchip-sdk repo init -u https://github.com/radxa/yocto-manifests.git -b scarthgap repo sync ``` -------------------------------- ### Download Example Application Repository (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/LLM/ds-r1-qwen-1.5b.md Downloads the DeepSeek-R1-Qwen-1.5B example application repository using huggingface-cli. This step is crucial for obtaining the necessary model files and scripts for execution. It also navigates into the downloaded directory. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/DeepSeek-R1-Distill-Qwen-1.5B --local-dir ./DeepSeek-R1-Distill-Qwen-1.5B cd DeepSeek-R1-Distill-Qwen-1.5B ``` -------------------------------- ### Create ROS 2 Humble Workspace (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_ros2-humble-compilation.mdx Creates a new directory structure for the ROS 2 Humble workspace and navigates into it. This is the starting point for compiling ROS 2 from source. ```bash mkdir -p ros2_humble/src cd ros2_humble ``` -------------------------------- ### Download InternVL3-2B Example App Repository Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/aicore/ax-m1/VLM/internvl3-2b.md Downloads the InternVL3-2B example application repository using huggingface-cli. This step requires `huggingface_hub[cli]` to be installed. It clones the repository to the specified local directory and changes the current directory into it. ```bash pip3 install -U "huggingface_hub[cli]" huggingface-cli download AXERA-TECH/InternVL3-2B --local-dir ./InternVL3-2B cd InternVL3-2B ``` -------------------------------- ### Set Up Locale and Environment Variables (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_ros2-humble-compilation.mdx Configures the system's locale to UTF-8 and sources the bashrc file to apply changes. This is crucial for proper character encoding and environment setup in the terminal. ```bash echo -e "export LC_ALL=en_US.UTF-8\nexport LANG=en_US.UTF-8\n" >> $HOME/.bashrc source $HOME/.bashrc ``` -------------------------------- ### UART Hello World CMakeLists.txt Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_pico-uart.mdx This CMakeLists.txt file configures the build for the 'hello_uart' example. It defines the executable target, links the necessary 'pico_stdlib' library, and enables standard input/output over both USB and UART. This setup is crucial for compiling the C code and making it compatible with the Pico SDK. ```cmake add_executable(hello_uart hello_uart.c ) # pull in common dependencies target_link_libraries(hello_uart pico_stdlib) # create map/bin/hex file etc. pico_add_extra_outputs(hello_uart) # add url via pico_set_program_url example_auto_set_url(hello_uart) pico_enable_stdio_usb(hello_uart 1) pico_enable_stdio_uart(hello_uart 1) ``` -------------------------------- ### Configure Locale for UTF-8 Support (Bash) Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/yocto/_build-system.mdx Sets up the 'en_US.UTF-8' locale on the system, which is often required for Yocto Project builds. This involves installing locale packages, generating the locale, and updating system settings. ```bash sudo apt install locales sudo locale-gen en_US en_US.UTF-8 sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 sudo echo "export LANG=en_US.UTF-8" >> ~/.bashrc source ~/.bashrc ``` -------------------------------- ### Activate RKLLM Conda Environment Source: https://github.com/radxa-docs/docs/blob/main/i18n/en/docusaurus-plugin-content-docs/current/common/dev/_rkllm-deepseek-r1.mdx Activates the necessary RKLLM conda environment on your x86 Linux PC. This is a prerequisite for running RKLLM tools and scripts. Refer to the RKLLM installation guide for setup details. ```bash conda activate rkllm ```