RK182X Development Environment Quick Setup
The RK182X is a PCIe accelerator card with no application CPU; all programs must run on the host (RK3588 / RK3576).
Overall block diagram
Host (RK3588 aarch64) RK182X (PCIe)
─────────────────────── ─────────────
Native gcc (preinstalled) No application CPU
/lib/firmware/rknn3_rk1820.img ──► PCIe firmware loading
│ NPU inference
▼
Executable ──► run directly + rknn3.service forwarding ──► /dev/dri/renderD128For detailed installation of each component or the complete on-board workflow, see ch04 Environment Setup in Detail or ch05 Quick Start.
1. On-Board Native gcc Verification
The RK182X accelerator card has no application CPU; all programs are compiled and run natively on the host (RK3588 / RK3576).
Check gcc
which gccOutput:
/usr/bin/gccgcc --version | head -2Output:
gcc (Debian 12.2.0-14+deb12u1) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.Compile
cat > test.c <<'EOF'
#include <stdio.h>
int main(void) {
printf("Native compile test on RK3588\n");
return 0;
}
EOF
gcc test.c -o test_native
./test_nativeOutput:
Native compile test on RK35882. RK182X Firmware Loading
The RK182X has no U-Boot / MaskROM / USB flashing port; firmware is pushed over PCIe by the host (RK3588 / RK3576).
Check PCIe Device Visibility
/usr/bin/pcie_upgrade_tool ld 2>&1 | sed 's/\x1b\[[0-9;]*m//g'Output:
Program directory: /usr/bin/
List of connected rkep devices
Addr=0004:41:00.0 [1d87:182a]Check the pcie-rkep Driver
lsmod | grep pcie_rkepEmpty output is normal for the following command: the driver is built into the kernel, not an error.
Output:
(no output — driver is built into the kernel)Push Firmware Over PCIe
# Auto-detect the BDF
bdf=$(/usr/bin/pcie_upgrade_tool ld 2>&1 | sed 's/\x1b\[[0-9;]*m//g' | grep -o 'Addr=[0-9:a-f]*' | head -1 | cut -d= -f2)
sudo /usr/bin/pcie_upgrade_tool -s "$bdf" uf /lib/firmware/rknn3_rk1820.imgOutput (when the device is already running):
Program directory: /usr/bin/
Downloading firmware...
Device boot state: 0x00004b52
Device is not in maskrom mode or loader modeThe device is already in normal running state (0x00004b52); firmware update requires maskrom/loader mode. Under normal circumstances the firmware is loaded automatically by
rknn3.service, so this command does not need to be run manually.
Check the Proxy Service Status
systemctl status rknn3.service --no-pagerOutput (example):
● rknn3.service - rknn3 runtime service
Loaded: loaded (/lib/systemd/system/rknn3.service; enabled; preset: enabled)
Active: active (running) since Mon 2026-08-17 17:10:10 CST; 31min ago
Process: 508 ExecStart=/bin/rknn3_startup start (code=exited, status=0/SUCCESS)
Main PID: 1795 (rknn3_transfer_)
CPU: 8min 27.987s
CGroup: /system.slice/rknn3.service
├─1795 /bin/rknn3_transfer_proxy
└─1807 rknn3_transfer_proxy -s 0004:41:00.0Key Points
- Firmware path:
/lib/firmware/rknn3_rk1820.img - Device node:
/dev/pcie-rkep-<BDF> - Proxy process:
/bin/rknn3_transfer_proxy - PCIe device ID:
0x1d87:0x182a - System service:
rknn3.service
3. Where Is the SDK?
The SDK can be deployed to any directory, e.g. /userdata/RK1820_RK1828_AI_SDK/ or /home/<user>/RK182X_SDK/; use your actual deployment location. The text below uses $SDK_DIR for the SDK root directory:
SDK_DIR=/userdata/RK1820_RK1828_AI_SDK # replace with your actual deployment path
ls $SDK_DIR/Output:
build.sh
docs
driver
examples
package
pkgroot
rknn
scripts| Directory | Purpose |
|---|---|
driver/ | pcie-rkep PCIe driver source (with Makefile) |
rknn/rknn3-runtime/ | librknnrt.so, librknn3_api.so user-space runtime |
rknn/rknn3-toolkit/ | Python model conversion / quantization tools (x86_64 PC only) |
rknn/rknn3-model-zoo/ | Official pre-built reference models |
examples/ | Application samples |
scripts/ | Build scripts |
package/ | Pre-built debs / image artifacts |
docs/ | Release Note and other documents |
ls $SDK_DIR/examples/Output:
anomaly-detection gstreamer vi_yolo_venc
docker rockit_yolo_detect web4. Verify Success
① Toolchain Works
The host (board side) is aarch64; verify with the native gcc:
gcc --version | head -2Output:
gcc (Debian 12.2.0-14+deb12u1) 12.2.0
Copyright (C) 2022 Free Software Foundation, Inc.② PCIe Device Visible on the Host
/usr/bin/pcie_upgrade_tool ld 2>&1 | sed 's/\x1b\[[0-9;]*m//g'Output (example):
Program directory: /usr/bin/
List of connected rkep devices
Addr=0004:41:00.0 [1d87:182a]For the full health check script (one-shot 4-item verification), see ch01 Hardware Installation & Verification → One-Shot Health Check.
5. Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
pcie_upgrade_tool command not found | Host-side SDK not installed | Reinstall the rknn3-runtime deb |
Addr= list empty | PCIe not enumerated / card not seated | Reseat the card + check for the 182a device with lspci |
Daemon rknn3_transfer_proxy missing | rknn3.service not started | sudo systemctl restart rknn3.service |
Device is not in maskrom mode | Device running normally | Normal; no manual uf needed |
6. Next Steps
- SDK Overview — architecture of the RK182X SDK subsystems
- Environment Setup in Detail — detailed installation of each component
- Quick Start — complete on-board workflow + first demo
