Skip to content

Add VisionFive 2 Lite test cases and docs#4

Open
zhiyao310 wants to merge 13 commits intoruyisdk:mainfrom
zhiyao310:main
Open

Add VisionFive 2 Lite test cases and docs#4
zhiyao310 wants to merge 13 commits intoruyisdk:mainfrom
zhiyao310:main

Conversation

@zhiyao310
Copy link
Copy Markdown

@zhiyao310 zhiyao310 commented Apr 27, 2026

Test Information

  • Board Model: VisionFive 2 Lite

  • Ruyi Version: 0.47.0

  • Toolchains:

    • GNU Toolchain: gnu-plct

    • LLVM Toolchain: llvm-plct

Added Content

  1. Added HelloWorld test cases (GCC/Clang versions)

  2. Added CoreMark performance test cases (GCC/Clang versions, with valid run time ≥ 10s)

  3. Added board documentation:

    • README\.md

    • README\_zh\.md

Test Results

All tests passed successfully:

  • HelloWorld builds and runs correctly with valid output

  • CoreMark runs stably and outputs valid performance scores with Correct operation validated

  • No illegal instruction, build failure or crash issues

Summary by Sourcery

Add VisionFive 2 Lite board documentation and basic RuyiSDK usage guides for Hello World and CoreMark.

Documentation:

  • Document VisionFive 2 Lite hardware overview in English and Chinese README files.
  • Add Chinese-language walkthroughs for building and running Hello World and CoreMark on VisionFive 2 Lite using GNU and LLVM RuyiSDK toolchains.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 27, 2026

Reviewer's Guide

Adds VisionFive 2 Lite board docs plus Chinese-language getting-started guides for HelloWorld and CoreMark benchmarks, including step-by-step usage with GNU and LLVM Ruyi toolchains on Ubuntu 24.04.

Flow diagram for VisionFive2Lite Coremark GCC and LLVM workflows

flowchart TD
  A_Start["Start on Ubuntu 24.04"] --> B_InstallRuyi["Install ruyi package manager"]
  B_InstallRuyi --> C_InstallToolchains["ruyi install gnu-plct and llvm-plct"]

  C_InstallToolchains --> D_CoremarkRepo["Clone coremark repository"]

  subgraph GCC_workflow
    D_CoremarkRepo --> E_GCCVenv["ruyi venv -t toolchain/gnu-plct manual venv-gnu-plct"]
    E_GCCVenv --> F_ActivateGCC["Activate venv-gnu-plct"]
    F_ActivateGCC --> G_VerifyGCC["riscv64-plct-linux-gnu-gcc -v"]
    G_VerifyGCC --> H_BuildCoremarkGCC["make CC=riscv64-plct-linux-gnu-gcc XCFLAGS='-march=rv64gc_zba_zbb' compile"]
    H_BuildCoremarkGCC --> I_RunCoremarkGCC["Run ./coremark.exe"]
    I_RunCoremarkGCC --> J_CheckOutputGCC["Check Correct operation validated and performance scores"]
    J_CheckOutputGCC --> K_DeactivateGCC["ruyi-deactivate"]
  end

  subgraph LLVM_workflow
    C_InstallToolchains --> L_LLVMVenv["ruyi venv -t toolchain/llvm-plct manual --sysroot-from gnu-plct venv-llvm-plct"]
    L_LLVMVenv --> M_ActivateLLVM["Activate venv-llvm-plct"]
    M_ActivateLLVM --> N_VerifyClang["clang -v"]
    N_VerifyClang --> O_CleanCoremark["make clean in coremark"]
    O_CleanCoremark --> P_BuildCoremarkLLVM["make CC=clang XCFLAGS='-march=rv64gc_zba_zbb' compile"]
    P_BuildCoremarkLLVM --> Q_RunCoremarkLLVM["Run ./coremark.exe"]
    Q_RunCoremarkLLVM --> R_CheckOutputLLVM["Check Correct operation validated and performance scores"]
    R_CheckOutputLLVM --> S_DeactivateLLVM["ruyi-deactivate"]
  end

  K_DeactivateGCC --> T_End["Coremark GCC workflow complete"]
  S_DeactivateLLVM --> U_EndLLVM["Coremark LLVM workflow complete"]
Loading

File-Level Changes

Change Details Files
Add Chinese CoreMark getting-started and benchmarking guide for VisionFive 2 Lite using Ruyi GNU/LLVM toolchains.
  • Introduce front-matter metadata describing system, board model, and CoreMark profile for VisionFive 2 Lite.
  • Document installing Ruyi package manager and GNU/LLVM (gnu-plct, llvm-plct) toolchains on Ubuntu 24.04.
  • Provide GCC-based CoreMark workflow: create and activate GNU virtual env, verify compiler, build with rv64gc_zba_zbb flags, run benchmark, and include sample validated output.
  • Provide LLVM-based CoreMark workflow: create and activate LLVM virtual env using GNU sysroot, verify Clang, rebuild CoreMark with Clang, run benchmark, and include sample validated output.
  • Describe how to deactivate the virtual environments after running tests.
VisionFive2Lite/Coremark/README_zh.md
Add Chinese HelloWorld getting-started guide for VisionFive 2 Lite using Ruyi GNU/LLVM toolchains.
  • Introduce front-matter metadata describing system, board model, and Hello World profile for VisionFive 2 Lite.
  • Document prerequisite installation of Ruyi package manager and GNU/LLVM toolchains, aligned with the CoreMark instructions.
  • Provide GCC-based Hello World workflow: create/activate GNU virtual env, verify compiler, create hello.c, build with riscv64-plct-linux-gnu-gcc, run binary, and show expected output transcript.
  • Provide LLVM-based Hello World workflow: create/activate LLVM virtual env using GNU sysroot, verify Clang, build and run hello-llvm, and show expected output transcript.
  • Explain how to deactivate the virtual environments after running each example.
VisionFive2Lite/HelloWorld/README_zh.md
Add English and Chinese board-level documentation for VisionFive 2 Lite hardware profile.
  • Define YAML front-matter fields for VisionFive 2 Lite describing product name, SoC (JH7110S), CPU core configuration, RAM options, vendor and silicon vendor.
  • Add concise English overview of VisionFive 2 Lite positioning, capabilities, interfaces, and ecosystem compatibility.
  • Add equivalent Chinese overview matching the English description to support bilingual documentation.
VisionFive2Lite/README.md
VisionFive2Lite/README_zh.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 5 issues, and left some high level feedback:

  • In both HelloWorld and Coremark Chinese READMEs, the section titles after the LLVM examples still say “退出ruyi GCC虚拟环境”; consider updating these to refer to the LLVM virtual environment for clarity.
  • There is a mix of “VisionFive2 Lite” and “VisionFive 2 Lite” in the new docs; aligning on a single naming style (with or without the space) will avoid confusion and make search/indexing more consistent.
  • The repeated setup steps for installing Ruyi and toolchains in the HelloWorld and Coremark READMEs could be factored out or referenced from a shared section to reduce duplication and keep future updates simpler.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In both HelloWorld and Coremark Chinese READMEs, the section titles after the LLVM examples still say “退出ruyi GCC虚拟环境”; consider updating these to refer to the LLVM virtual environment for clarity.
- There is a mix of “VisionFive2 Lite” and “VisionFive 2 Lite” in the new docs; aligning on a single naming style (with or without the space) will avoid confusion and make search/indexing more consistent.
- The repeated setup steps for installing Ruyi and toolchains in the HelloWorld and Coremark READMEs could be factored out or referenced from a shared section to reduce duplication and keep future updates simpler.

## Individual Comments

### Comment 1
<location path="VisionFive2Lite/Coremark/README_zh.md" line_range="85" />
<code_context>
+```
+
+
+退出ruyi GCC虚拟环境
+
+```
</code_context>
<issue_to_address>
**issue (typo):** LLVM section exit description refers to "GCC" instead of "LLVM".

Since this is in the LLVM section, please update the heading text to “退出ruyi LLVM虚拟环境” to avoid confusion.

```suggestion
退出ruyi LLVM虚拟环境
```
</issue_to_address>

### Comment 2
<location path="VisionFive2Lite/Coremark/README_zh.md" line_range="88" />
<code_context>
+退出ruyi GCC虚拟环境
+
+```
+cd ..; ruyi-deactivate
+```
+
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Non-breaking space before ".." may cause copy-paste issues.

The space between `cd` and `..` is a non‑breaking space, which can break copy/paste usage. Please replace it with a normal space (e.g. `cd ..; ruyi-deactivate`) here and in the HelloWorld README.

Suggested implementation:

```
退出ruyi GCC虚拟环境

```
cd ..; ruyi-deactivate
```

sys: ubuntu

```

同样的修改需要在 HelloWorld 的 README 中进行:检查对应的“退出 ruyi GCC 虚拟环境”步骤,将其中的 `cd``..` 之间的非断行空格替换为普通空格,确保示例命令为 `cd ..; ruyi-deactivate`,以避免用户复制粘贴时出现问题。
</issue_to_address>

### Comment 3
<location path="VisionFive2Lite/HelloWorld/README_zh.md" line_range="77" />
<code_context>
+```
+
+
+退出ruyi GCC虚拟环境
+
+```
</code_context>
<issue_to_address>
**issue (typo):** LLVM section exit description refers to "GCC" instead of "LLVM".

Since this heading is in the LLVM section, please change "退出ruyi GCC虚拟环境" to "退出ruyi LLVM虚拟环境" for consistency.

```suggestion
退出ruyi LLVM虚拟环境
```
</issue_to_address>

### Comment 4
<location path="VisionFive2Lite/README.md" line_range="10" />
<code_context>
+silicon_vendor: StarFive
+---
+
+# VisionFive2 Lite
+
+VisionFive 2 Lite is an entry-level RISC-V single-board computer with a low barrier to entry and rich functionality, suitable for education, AIoT, smart home, and industrial IoT scenarios. Powered by the StarFive JH-7110S quad-core processor, the board delivers strong image and video processing capabilities, and features extensive expansion interfaces including PCIe, HDMI, USB 3.0, and Gigabit Ethernet. It is fully compatible with mainstream Linux distributions and open-source toolchains, helping developers achieve rapid development and seamless integration. Whether for learning and research, prototype development, or embedded deployment, VisionFive 2 Lite strikes an excellent balance between performance and cost.
</code_context>
<issue_to_address>
**nitpick (typo):** Product name heading lacks a space compared to the metadata.

The front-matter uses "VisionFive 2 Lite" (with a space), while the heading uses "VisionFive2 Lite". Please align the heading with the metadata for consistency.

```suggestion
# VisionFive 2 Lite
```
</issue_to_address>

### Comment 5
<location path="VisionFive2Lite/README_zh.md" line_range="10" />
<code_context>
+silicon_vendor: StarFive
+---
+
+# VisionFive2 Lite
+
+VisionFive 2 Lite is an entry-level RISC-V single-board computer with a low barrier to entry and rich functionality, suitable for education, AIoT, smart home, and industrial IoT scenarios. Powered by the StarFive JH-7110S quad-core processor, the board delivers strong image and video processing capabilities, and features extensive expansion interfaces including PCIe, HDMI, USB 3.0, and Gigabit Ethernet. It is fully compatible with mainstream Linux distributions and open-source toolchains, helping developers achieve rapid development and seamless integration. Whether for learning and research, prototype development, or embedded deployment, VisionFive 2 Lite strikes an excellent balance between performance and cost.
</code_context>
<issue_to_address>
**nitpick (typo):** Chinese README heading uses "VisionFive2 Lite" instead of "VisionFive 2 Lite".

The front matter uses "VisionFive 2 Lite" (with a space), while the heading is "VisionFive2 Lite". Please update the heading to match the "VisionFive 2 Lite" naming for consistency.

```suggestion
# VisionFive 2 Lite
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread VisionFive2Lite/Coremark/README_zh.md
Comment thread VisionFive2Lite/Coremark/README_zh.md
Comment thread VisionFive2Lite/HelloWorld/README_zh.md
Comment thread VisionFive2Lite/README.md Outdated
Comment thread VisionFive2Lite/README_zh.md Outdated
Comment thread LicheePi4A/OpenCV/README_zh.md Outdated
Comment thread LicheePi4A/OpenCV/README_zh.md Outdated
Comment thread LicheePi4A/OpenCV/README_zh.md Outdated
zhiyao310 and others added 5 commits April 28, 2026 17:45
Co-authored-by: DuoQilai <101803232+DuoQilai@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants