ThreadX @ Milk-V Duo (64M) Test Report

System Version

Status

BASIC

Last Update

2024-06-21

ThreadX Milk-V Duo Test Report

Test Environment

Operating System Information

Hardware Information

  • Milk-V Duo 64M
  • A USB Power Adapter
  • A USB-A to C or USB C to C Cable
  • A TF Card
  • A USB to UART Debugger (e.g., CH340, CH341, FT2232)
  • Three Dupont Wires
  • Header pins pre-soldered to the Milk-V Duo for debugging purposes

Test case 2

Prepare System Environment

sudo apt install -y pkg-config build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils jq python3-distutils scons parallel tree python3-dev python3-pip device-tree-compiler ssh cpio fakeroot libncurses5 flex bison libncurses5-dev genext2fs rsync unzip dosfstools mtools tcl openssh-client cmake expect -y

Download and Build

git clone https://github.com/milkv-duo/duo-buildroot-sdk.git --depth=1
cd duo-buildroot-sdk/
./build.sh milkv-duo -j${nproc}

This process will generate an image file out/milkv-duo-????????-????.img. This is the image file.

If the process is not normal, please refer to the project introduction to troubleshoot.

Extract ThreadX-to-RISC-V64

Run in duo-buildroot-sdk.

git clone https://github.com/saicogn/ThreadX-to-RISC-V64.git --depth=1

Then modify build/milkvsetup.sh. Around line 455.

  FREERTOS_PATH="$TOP_DIR"/freertos

Modify as follows:

  #FREERTOS_PATH="$TOP_DIR"/freertos # 修改此项
  FREERTOS_PATH="$TOP_DIR"/ThreadX-to-RISC-V64

Then build.

./build.sh milkv-duo -j${nproc}

This process will generate an image file out/milkv-duo-????????-????.img. This is the image file. Write it to the SD card.

Prepare TF Card

Write the generated out/milkv-duo-????????-????.img to the TF card. Rufus can be used.

Logging into the System

Logging into the system via the serial port.

Expected Results

The system should boot up normally and output threadx-related information.

Actual Results

The system boots up normally and outputs threadx-related information.

Boot Log

The serial port output after boot is as follows.

[root@milkv-duo]~# RT: [9.378810]threadx 1 running: 11
RT: [9.381959]threadx 0 running: 12
RT: [9.385273]float cal: 54
RT: [13.383809]threadx 0 running: 13
RT: [13.387046]float cal: 75
RT: [17.378809]threadx 1 running: 12
RT: [17.388810]threadx 0 running: 14
RT: [17.392046]float cal: 97
RT: [21.393809]threadx 0 running: 15
RT: [21.397046]float cal: 121
RT: [25.378809]threadx 1 running: 13
RT: [25.398810]threadx 0 running: 16
RT: [25.402046]float cal: 147
RT: [29.403809]threadx 0 running: 17
RT: [29.407046]float cal: 174
RT: [33.378809]threadx 1 running: 14
RT: [33.408809]threadx 0 running: 18
RT: [33.412046]float cal: 202
RT: [37.413809]threadx 0 running: 19
RT: [37.417046]float cal: 232

Screenshot:

uart

Test case 2

Setup System Environment

sudo apt install -y pkg-config build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils jq python3-distutils scons parallel tree python3-dev python3-pip device-tree-compiler ssh cpio fakeroot libncurses5 flex bison libncurses5-dev genext2fs rsync unzip dosfstools mtools tcl openssh-client cmake expect -y

Download and Build

sudo apt-get install wget git make
git clone https://github.com/milkv-duo/duo-examples.git --depth=1
cd duo-examples
source envsetup.sh
cd mailbox-test
make

This will generate the mailbox_test executable.

If the process is not normal, please refer to the Project Introduction to troubleshoot.

Deploy the Executable File

Copy the executable to the user’s home directory.

chmod +x mailbox_test
./mailbox_test

The output in the serial port will be as follows.

[root@milkv-duo]~# ./mailbox_test 
RT: [507.950049]prvQueueISR
RT: [507.952485]recv cmd(19) from C906B, param_ptr [0x00000002]
RT: [507.958306]recv cmd(19) from C906B...send [0x00000004] to C906B
C906B: cmd.param_ptr = 0x4
RT: [511.965433]prvQueueISR
RT: [511.967867]recv cmd(19) from C906B, param_ptr [0x00000003]
RT: [511.973689]recv cmd(19) from C906B...send [0x00000004] to C906B
C906B: cmd.param_ptr = 0x3

Expected Results

The light turns on for three seconds and then turns off.

Actual Results

The light turns on for three seconds and then turns off.

Video:

https://github.com/ruyisdk/support-matrix/assets/17025286/c0350c17-5e94-4c07-96f7-a6b3f66c531c

Test Criteria

Successful: The actual result matches the expected result.

Failed: The actual result does not match the expected result.

Test Conclusion

Test successful.