DEV Community

Cover image for Programming on the Kiwi 3 Ultra: A Powerful Single-Board Computer with RK3568
Leonard Liao
Leonard Liao

Posted on

Programming on the Kiwi 3 Ultra: A Powerful Single-Board Computer with RK3568

The Kiwi 3 Ultra is an impressive arm single-board computer (SBC) that packs serious performance into a compact form factor. Built around the Rockchip RK3568 system-on-chip (SoC) and featuring generous 32GB of LPDDR4 RAM along with 512GB of eMMC storage, this board offers developers a capable platform for a wide range of computing tasks. In this article, we'll explore programming on the Kiwi 3 Ultra and what makes it special.

Hardware Overview: The RK3568 Powerhouse

At the heart of the Kiwi 3 Ultra lies the Rockchip RK3568, a quad-core ARM Cortex-A55 processor that clocks up to 2.0GHz. This 64-bit SoC is built on a 22nm process and offers several notable features:

CPU: 4x Cortex-A55 cores (ARMv8-A architecture)

GPU: ARM Mali-G52 2EE, supporting OpenGL ES 1.1/2.0/3.2, Vulkan 1.1, and OpenCL 2.0

NPU: 0.8 TOPS AI accelerator for machine learning workloads

Memory: Supports LPDDR4/LPDDR4X up to 8GB (though Kiwi 3 Ultra pushes this further with 32GB)

Media Processing: 4Kp60 H.265/H.264/VP9 video decoding, 1080p100 H.265/H.264 encoding

The combination of these specs makes the RK3568 especially suitable for multimedia applications, edge computing, and light machine learning tasks.

Operating System Options
One of the Kiwi 3 Ultra's strengths is its versatile software support:

_Linux 5.10 (with optional upgrade to Linux 6.10)

Android 12

Debian 11

Ubuntu 22.04_

This variety enables developers to select the optimal environment for their specific needs, whether they're building embedded systems, media centers, or general-purpose computing applications.

Setting Up Your Development Environment

For Linux Development (Debian/Ubuntu)
Initial Setup:

bash

sudo apt update && sudo apt upgrade -y
sudo apt install build-essential git cmake
Cross-compilation (if developing from another machine):
Enter fullscreen mode Exit fullscreen mode

bash

sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
Enter fullscreen mode Exit fullscreen mode

GPU Acceleration:
The Mali-G52 GPU supports several APIs. Install the appropriate libraries:

bash

sudo apt install libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev
Enter fullscreen mode Exit fullscreen mode

For Android Development
1) Install Android Studio on your host machine.
2) Set up the Android SDK with ARMv8 suppor.t
3) Enable developer options on the Kiwi 3 Ultra's Android installation
4) Connect via ADB for debugging and deployment

Performance Considerations
With 32GB of RAM, the Kiwi 3 Ultra can handle memory-intensive applications that would choke other SBCs. Some performance tips:

Memory Management: While you have abundant RAM, still practice good memory management, especially if your code might run on other devices.

NPU Utilization: For AI workloads, leverage the NPU through Rockchip's RKNN toolkit for optimal performance.

Storage: The 512GB eMMC is fast but has limited write cycles. For heavy logging, consider mounting a tmpfs or using an external SSD.

Example: Simple Python Program Using GPIO
If you're using the Linux OS, you can access GPIO pins (if available on your board variant):

python

import RPi.GPIO as GPIO
import time
Enter fullscreen mode Exit fullscreen mode

Note: You may need to use a Rockchip-specific GPIO library
depending on your Linux distribution

GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
Enter fullscreen mode Exit fullscreen mode

try:

while True:
        GPIO.output(18, GPIO.HIGH)
        time.sleep(1)
        GPIO.output(18, GPIO.LOW)
        time.sleep(1)
Enter fullscreen mode Exit fullscreen mode

finally:

GPIO.cleanup()
Enter fullscreen mode Exit fullscreen mode

Machine Learning on the Edge
The RK3568's NPU makes it excellent for edge AI. Here's a simple example using RKNN:

python

from rknn.api import RKNN
Enter fullscreen mode Exit fullscreen mode

Load the model

rknn = RKNN()
rknn.load_rknn('model.rknn')
Enter fullscreen mode Exit fullscreen mode

Initialize the NPU

ret = rknn.init_runtime(target='rk3568')
if ret != 0:
    print('Initialize runtime failed')
    exit(ret)
Enter fullscreen mode Exit fullscreen mode

Run inference

outputs = rknn.inference(inputs=[input_data])
Enter fullscreen mode Exit fullscreen mode

Conclusion

The Kiwi 3 Ultra with its RK3568 SoC represents a significant step up in single-board computing power. With its generous memory, substantial storage, and versatile OS options, it's suitable for:

1)Advanced embedded projects
2) Media centers and set-top boxes
3)Edge AI and machine learning applications
4)Development and prototyping

As a compact desktop replacement

single board computer
Have you programmed on the Kiwi 3 Ultra or similar RK3568-based boards? Share your experiences in the comments!

Top comments (0)