Hello World
The RK1828 has no application CPU of its own — programs run on the RK3588 (aarch64). This article covers the first program: write the code, compile it, run it. NPU invocation comes in the last section; first get the pipeline working.
1. Write the code
Create a file hello_rk1828.c:
// hello_rk1828.c
#include <stdio.h>
int main() {
printf("Hello, RK1828!\n");
printf("Running on Rockchip SoC.\n");
return 0;
}2. Compile
Compile directly on the RK3588.
# 1. Check whether the compiler is installed
which aarch64-linux-gnu-gcc && aarch64-linux-gnu-gcc --version | head -2Expected:
/usr/bin/aarch64-linux-gnu-gcc
aarch64-linux-gnu-gcc (Debian 12.2.0-14+deb12u1) 12.2.0# 2. Compile
aarch64-linux-gnu-gcc hello_rk1828.c -o hello_rk1828
# 3. Verify the build result
file hello_rk1828Output:
hello_rk1828: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=537c84f9fc03eabc1612bee7d06d8c9fc209e87d, for GNU/Linux 3.7.0, not stripped3. Run it
./hello_rk1828Output:

4. Deploy to another device (optional)
Only needed when pushing the program to a different board.
scp / ssh
scp hello_rk1828 root@<device-ip>:/tmp/
ssh root@<device-ip> "/tmp/hello_rk1828"USB drive / SD card
cp hello_rk1828 /media/<user>/USBDRIVE/
# On the target board, run it after mounting; use the actual mount point path5. A quick look at the board environment
# Kernel
uname -aOutput:
Linux linaro-alip 6.1.141 #27 SMP Wed May 27 13:44:15 CST 2026 aarch64 GNU/Linux# CPU
cat /proc/cpuinfo | head -5Output:
processor : 0
BogoMIPS : 48.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8# Memory
free -hOutput (measured):
total used free shared buff/cache available
内存: 3.8Gi 3.2Gi 211Mi 3.8Mi 444Mi 603Mi
交换: 0B 0B 0B6. Call the RK1828 NPU
The RK1828 has no application CPU of its own; to run NPU inference you must call the rkllm3-server service over PCIe.
# Find where the service is installed
which rkllm3-serverOutput:
/usr/bin/rkllm3-server# Show help
/usr/bin/rkllm3-server --help 2>&1 | head -10Output (excerpt):
version: 1.0.0 (b4bd144@2026-01-22T21:27:27)
----- common params -----
-c, --ctx-size N size of the prompt context (default: 4096, 0 = loaded from model)
-n, --predict, --n-predict N number of tokens to predict (default: -1, -1 = context size)
-a, --alias STRING set alias for model name (to be used by REST API)
-m, --model FNAME rknn llm model pathStart it:
# Start the NPU inference service
rkllm3-server -m <model.rknn> -c 0xff -n 4096Parameter quick reference:
| Parameter | Meaning |
|---|---|
-m / --model | Model file path (required) |
-c / --ctx-size | NPU core mask; use 0xff for 8 cores |
-n / --predict | Max tokens to generate, default -1 |
7. FAQ
| Symptom | Cause | Fix |
|---|---|---|
cannot execute binary file | Architecture mismatch | Make sure it was built with aarch64-linux-gnu-gcc |
| Runs but the NPU does nothing | Wrong device node addressed | The RK1828 device node is /dev/dri/renderD128 |
rkllm3-server crashes after a while | Residual KV cache | Restart the service |
8. Known issues
- Crash after consecutive inference: after several runs,
rkllm3-servermay crash due to residual KV cache; restart the service - Network access: when the board cannot reach GitHub / HuggingFace directly, use mirror sites such as
ghfast.top,hf-mirror.com - Development environment: Node.js ≥ v22 required (v25 via nvm recommended)
Related docs
- Hello RK1828 — getting started with NPU device detection added
- NPU Subsystem — NPU inference
- Hardware Architecture Overview — hardware specs
