My First Hands-On Experience Of RISC-V Is With The Milk-V Duo S, And I

There are quite a lot of people who think that RISC-V, or some form of it anyway, is the future. It’s an open standard that anyone can implement and modify, … Read more

Taylor Bell

Taylor Bell

Published on Apr 28, 2024

My First Hands-On Experience Of RISC-V Is With The Milk-V Duo S, And I

There are quite a lot of people who think that RISC-V, or some form of it anyway, is the future. It’s an open standard that anyone can implement and modify, and it’s the biggest contender to dethroning Arm in a distant future. Even Qualcomm and Google are starting to get invested, and the Milk-V Duo S is an SBC with a RISC-V chip on board that I recently experienced.

The Milk-V Duo S is an especially interesting SBC, as it features a slider to switch between an on-board RISC-V chip and an on-board Arm chip, giving ultimate flexibility when it comes to platform support. Currently, though, the boot images released by Milk don’t actually support the Arm chip right now, meaning you can only use the RISC-V core at present. As a result, this is not a review, but we’ll be revisiting it in the future.

milk-v-duo-s

Milk-V Duo S

The Milk-V Duo S is a single board computer with two CPUs: one RISC-V CPU, and one Arm CPU. It has 512MB of RAM and comes with a TPU, Python, and some other stuff preloaded, too.

About this article: The Milk-V Duo S was purchased by XDA for the purpose of this article. No company had any input into the contents of this article.

Pricing and availability

The Milk-V Duo S ships worldwide from China, and it starts at just $10. You can pick up additional extras like an eMMC module (that you’ll need to flash yourself) or Wi-Fi and Bluetooth support.

Brand
Milk-V

Storage
eMMC option available

CPU
1x RISC-V 1GHz, 1x Arm

Memory
512MB

Operating System
Linux

Ports
USB-A, Ethernet 100Mbps, USB-C

Display
Over GPIO

Starting Price
$10

Wireless Connectivity
Optional Wi-Fi/Bluetoth

Operating Systems
Linux

External Storage
MicroSD

Power Supply
USB-C

A unique SBC that gets a lot done

It’s just a shame you can’t use its defining feature yet

The Milk V Duo S’ defining feature is its secondary Arm core, but the problem is that right now, the firmware images distributed by the company can’t actually make use of it. In essence, the switch that allows you to change to another core doesn’t work right now, somewhat defeating the point of it. However, you can still use the RISC-V core, which is interesting in and of itself.

That RISC-V core is clocked at 1GHz and the entire thing can run off of 5W of power. That means you can even plug it into a computer’s USB port and it will work, which is how I’ve interfaced with it most of the time. Once you set it up, you can plug it into an Ethernet port in a router and run whatever you’d like on it, but you will need to connect to it first from your computer to configure it.

To connect to it in your computer, you can either use the UART pins on the GPIO to connect to it, or you can connect to it as an RDNIS device that will bind to 192.168.42.1 relative to the computer that it’s plugged into. If you go with the latter, you’ll need to manually install the Microsoft RDNIS driver in the device manager, but the former requires special hardware and a connection over a COM port.

Connecting to it in both methods requires you to first flash the boot image to a microSD card of your choice, plug it into your computer, and then use Putty or any other SSH client. Once you’ve configured it as an RDNIS device, the SSH address is 192.168.42.1, and you can modify this if it conflicts with any other devices on your network.

Logging into the Milk V Duo S, showing Python is available, and printing the kernel information

From there, you’re ready to use your new SBC. Because it uses the RISC-V architecture, you’ll need to either find software built for it or compile your own software that can run on it. There’s a RISC-V toolchain for GCC that can assist you in compiling C programs, and the Milk V Duo S comes with a Python runtime out of the box, meaning that you can run lightweight scripts or web applets from this SBC with ease.

The model we picked up also supports Wi-Fi and Bluetooth, meaning that you can connect it to an internet connection without using the Ethernet port. It supports Arduino and RTOS too, meaning that you can execute Arduino programs while Linux is running on the Milk V Duo S, complete with support for the Arduino IDE.

Dissecting Linux on the Milk V Duo S

It’s super lightweight

Printing cpuinfo in Milk-V Duo S terminal

Because of the measly 512MB of RAM and the 1GHz CPU on this SBC, the Linux version is also incredibly small. As is the nature of SBCs, you’ll be managing a lot of this device manually. To connect it to Wi-Fi, for example, you need to modify the built-in wpa_supplicant file to add the Wi-Fi details manually, and then you’ll need to add a command to set the Wi-Fi details on boot every time.

The documentation for the Milk V Duo S and getting started is actually quite good, and better than I expected. It’s still lacking in some details, most notably the fact that you actually can’t use the Arm core just yet, but it’s a good starting point for anyone who purchases one of these and wants to start using it right away. There’s still ultimately a learning curve, but it’s surprisingly usable despite that.

Of course, not actually having a usable Arm core at the moment kind of defeats the point of it, but how it will work is that it appears there will be a separate device image that you can flash to use the other core. That’s not confirmed, but the documentation mentions that you should make sure your installed operating system matches the architecture of the core you’re trying to boot. In other words, you may need multiple SD cards to quickly boot between the two cores.

Hosting a Python Flask server on the Milk-V Duo S

The documentation isn’t perfect, either. I modified the /mnt/system/auto.sh file as the documentation stated that I could enable automatic Wi-Fi connectivity in this file with the wpa_supplicant command. That didn’t work though, and nor did creating an init.d script to execute the wpa_supplicant command. I’ll need to revisit this so that it can connect to Wi-Fi by itself, but for now, connecting via Ethernet works when plugged in.

The Milk V Duo S also has a TPU capable of 0.5 TOPS in INT8 operations. Mainstream deep learning frameworks such as Caffe, Pytorch, ONNX, MXNet, and TensorFlow Lite are apparently easily ported to this, making it possible to use this for rudimentary machine learning purposes. The camera that can be used with the Milk V Duo S doesn’t appear to work yet either, and I’m expecting that this is also down to the incomplete software here. I have tried two flex cables for connecting the camera and ran into the same error in both instances, so I suspect that the problem is something to do with the camera interface and the hardware being different on this particular board.

Aside from those problems, the Milk V Duo S is in a good place. Hosting a web server on it with Python’s Flask is incredibly easy, and binding it to 0.0.0.0 will make it accessible to all devices on the network. From there, you can run some small, low-power applications that serve all applications on the network. It’s very powerful, and something that the Milk V Duo S supports natively.

zimablade-connected

Related

How building a NAS with an SBC can save you money

Build your NAS for less with a small-board computer.

Should you buy the Milk-V Duo S?

Milk-V Duo S on a stool, showing CPU and SPI buses

You should buy the Milk-V Duo S if:

  • You want to experience RISC-V
  • You want a low-power SBC to play with
  • You want to develop Arduino projects

You shouldn’t buy the Milk-V Duo S if:

  • You need an Arm CPU, as it doesn’t work yet
  • You want to do processing that needs more power

The Milk V Duo S is simply not ready yet as a consumer product, largely thanks to the fact that half of its existence is more or less inaccessible. You could run a Pi-hole server on one of these, host a basic Python web server, and so much more. The problem is that you can’t actually use that Arm core just yet, but even the RISC-V capabilities are awesome for someone who may not be familiar but wants to get comfortable with a new architecture.

On top of that, the Arduino uses and excellent documentation make this an enticing prospect, particularly as well thanks to the SPI buses on the board. You can build your own peripherals to add on to the Milk-V Duo S, and there are already people doing so with the GPIO ports on board. Plus, Python’s pinpong library is natively supported, which you can use to control devices plugged into those ports.

If you’re interested in picking up one of these, there are a ton of resellers online. We picked up ours from Arace. I’m excited about the future of RISC-V, particularly given how capable this particular CPU is. It’s poised as an Arm competitor, and with competition always being a good thing, anything that’s mildly competitive is a win in my books.

zimablade-connected

Related

How building a NAS with an SBC can save you money

Build your NAS for less with a small-board computer.

Partager cet article

Inscrivez-vous à notre newsletter