What happens when a pure beginner obtains a milkv duo

Firstly, I would like to declare that I am a pure beginner with zero or negative foundation. This English content was obtained using Baidu Translate
Get our board

Check the appearance. If there are obvious defects, do not power on. I believe this gentleman also does not want your chip to be lit up. Contact for exchange processing.
Additionally, here is a point to add

If you have purchased official camera accessories, please note that the way they open the ribbon cable interface is different. On our development board, remove the metal clip and pull up the black plastic part to insert the ribbon cable. The camera interface needs to be opened to the side.
I used a card reader and used BalenaEtcher to write the image before inserting it into the development board to start. The official documentation will provide a download link for BalenaEtcher, but it seems that it can be burned directly? I’m not sure, maybe you can give it a try.
!!! Of course, it is emphasized here that the cable of the type-C interface is not equal to the data cable. Some merchants, for cost reasons, only have the power function of their cable.!!!
I recommend ****** here. Okay, there’s no advertisement, but be aware of this
In addition, you can choose to use the USB to TTL serial port module for burning, but this requires us to weld pins on the development board. If it is a complete novice, I hope you first learn the usage specifications of the soldering iron, and be sure to pay attention to safety. There are many operational errors on my goggles that cause small spots of flying tin to burn out. Without goggles, those tin should come into close contact with my eyes. It is important to choose a qualified goggles.
I recommend ****** here. Okay, there are still no advertisements.
After burning, the power on effect is as shown in the picture, with the red light constantly on and the blue light flashing. If the chip emits light and heat, please immediately turn off the power.

Follow the document and I haven’t found any issues yet. If there are any issues, please leave them in the comments section and we can discuss and solve them together.
Following the official documentation, the next step is to compile the SDK. This requires a local Ubuntu environment, but I was stopped. I need to install a virtual machine under Windows, but I don’t have much hard disk space. I will wait for the new hard disk to arrive before proceeding. Also, don’t ask me what SDK is and why I need this thing. I don’t know why, let me talk to a big shot.

Just take a quick look at the application development part, it seems like I can barely get started without SDK. Alright, that’s all for now. To be honest, when following the application development part, I made a lot of mistakes


I will give some hits from my experience, related to the development.

Some soldering skills are required nowadays.

I have solder the pin heads and connected the USB to UART adapter(which I already had) to the board, as the RNDIS is not working, although I have the right USB-C cable

Also I have followed the instruction provided here to connect my board to the network.

I have burned Ubuntu on the SD card and booted.

I have installed the last provided Ubuntu image:

Once the above have been setup. I started the board and connected over serial.
Once connected with user root and default pass milkv I was able to configure the new route on the device:

> ip route del via

then added my router ip which is the gateway also:

> ip route add via

Finally it looks like this:

> ip route show
default via dev eth0 dev usb0 proto kernel scope link src linkdown dev eth0 proto kernel scope link src 

pinging should give you a hint is everything is working:

> ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=116 time=22.1 ms
64 bytes from icmp_seq=2 ttl=116 time=22.3 ms
64 bytes from icmp_seq=3 ttl=116 time=21.4 ms

I’m not sure what kind of DUO board do you have, I have seen all kind of colors, my board is green and it’s a DUO 64MB.

have tried to compile the code on my PC and run it on the board, but run into an error, the code was not running, due to some missing libs… I have tried to install them on board Ubuntu but without luck.

Then I said I can make the board a development environment, by editing code under vim and running make with a few changes on Makefile.

Now comes the nasty part…

As my board has only 64MB(hopefully I will get soon the ordered board with 256 and 512), apt will be very very slow… but after a couple of days with try and error I have managed to make myself a development environment directly on the board.

Here are some packages I have installed with apt, I don’t have anymore the list of packages installed.(In order to get the list I will have to write the Ubuntu image on a new SD card and to compare the installed packages on both…

apt install git curl wget make gcc g++ file i2c-tools python3 python3-pip spi-tools

The you will have to git clone the milkv duo pinmux and compile it:

git clone https://github.com/milkv-duo/milkv-duo-pinmux

I have cloned the github repo https://github.com/milkv-duo/duo-examples

git clone https://github.com/milkv-duo/duo-examples

then you will have run the following commands in order to get the duo-sdk, but only to copy a few files then it can be deleted:

cd duo-examples
source envsetup.sh


SDK_DIR: ~/projects/duo-examples
SDK does not exist, download it now...
~/projects/duo-examples ~/projects/duo-examples
SDK_URL: https://github.com/milkv-duo/duo-app-sdk/releases/download/duo-app-sdk-v1.2.0/duo-sdk-v1.2.0.tar.gz
sdk_file: duo-sdk-v1.2.0.tar.gz
--2024-01-26 09:40:53--  https://github.com/milkv-duo/duo-app-sdk/releases/download/duo-app-sdk-v1.2.0/duo-sdk-v1.2.0.tar.gz
Resolving github.com (github.com)...
Connecting to github.com (github.com)||:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/656538410/0205284c-8421-4fc2-922e-5eb35fb92379?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240126%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240126T084054Z&X-Amz-Expires=300&X-Amz-Signature=b395270394d55aa37264906ae4aafb5c10f147d720e18161cec74387c1eab2f1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=656538410&response-content-disposition=attachment%3B%20filename%3Dduo-sdk-v1.2.0.tar.gz&response-content-type=application%2Foctet-stream [following]
--2024-01-26 09:40:54--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/656538410/0205284c-8421-4fc2-922e-5eb35fb92379?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240126%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240126T084054Z&X-Amz-Expires=300&X-Amz-Signature=b395270394d55aa37264906ae4aafb5c10f147d720e18161cec74387c1eab2f1&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=656538410&response-content-disposition=attachment%3B%20filename%3Dduo-sdk-v1.2.0.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)...,,, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 193125559 (184M) [application/octet-stream]
Saving to: ‘duo-sdk-v1.2.0.tar.gz’

duo-sdk-v1.2.0.tar.gz             100%[===========================================================>] 184,18M  46,1MB/s    in 4,4s    

2024-01-26 09:40:59 (41,9 MB/s) - ‘duo-sdk-v1.2.0.tar.gz’ saved [193125559/193125559]

Extracting duo-sdk-v1.2.0.tar.gz...
SDK environment is ready

As next step you will have to copy the following files($SYSROOT is already set by the last ran command):

cp $SYSROOT/usr/include/wiringx.h /usr/include
cp $SYSROOT/usr/lib/libwiringx.so /usr/lib

Here comes the part where you will have to make the Makefile:


CC = gcc

LDFLAGS = -mcpu=c906fdv -march=rv64imafdcv0p7xthead -mcmodel=medany -mabi=lp64d

CFLAGS += -I/usr/include
CFLAGS += -I../include

LDFLAGS += -L/lib
LDFLAGS += -L/usr/lib

SOURCE = $(wildcard *.c)
OBJS = $(patsubst %.c,%.o,$(SOURCE))

	$(CC) -o $@ $(OBJS) $(LDFLAGS)

%.o: %.c
	$(CC) $(CFLAGS) -o $@ -c $<

.PHONY: clean
	@rm *.o -rf
	@rm $(OBJS) -rf
	@rm $(TARGET)

Running make on that directory will compile you the duo_pinmux which can be used to setup the pins on your board.