Skip to content

Add Coremark and HelloWorld README for Nuclei RV-STAR#13

Open
ZihanCheng63 wants to merge 6 commits into
ruyisdk:mainfrom
ZihanCheng63:main
Open

Add Coremark and HelloWorld README for Nuclei RV-STAR#13
ZihanCheng63 wants to merge 6 commits into
ruyisdk:mainfrom
ZihanCheng63:main

Conversation

@ZihanCheng63
Copy link
Copy Markdown
Contributor

@ZihanCheng63 ZihanCheng63 commented May 28, 2026

Summary by Sourcery

Add user-facing PWM and I2C example guides for the Milk-V Duo S board using RuyiSDK, covering environment setup, building, deployment, and execution.

Documentation:

  • Document how to set up the toolchain and build, deploy, and run a PWM example on Milk-V Duo S using RuyiSDK.
  • Document hardware wiring, environment setup, and build/run steps for an SSD1306-based I2C OLED example on Milk-V Duo S using RuyiSDK.

@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 28, 2026

Reviewer's Guide

Adds new Chinese-language user manuals for PWM and I2C peripherals on the Milk-V Duo S board, documenting end-to-end setup, build, and run flows for the corresponding RuyiSDK examples.

Flow diagram for PWM example setup, build, and run

flowchart LR
  A[Host PC<br/>安装依赖包] --> B[下载安装<br/>ruyi 包管理器]
  B --> C[ruyi update<br/>ruyi install gnu-plct llvm-plct]
  C --> D[ruyi extract milkv-duo-examples<br/>mv milkv-duo-examples-* duo-examples]
  D --> E[创建虚拟环境<br/>ruyi venv ...<br/>source ruyi-activate]
  E --> F[进入 pwm 目录<br/>修改 pwm.c 中 wiringXSetup<br/>为 milkv_duos]
  F --> G[使用<br/>riscv64-plct-linux-gnu-gcc<br/>编译生成 pwm]
  G --> H[scp 将 pwm<br/>传输到 Duo S]
  H --> I[在 Duo S 上执行<br/>duo-pinmux -w A16/PWM_4]
  I --> J[运行 ./pwm<br/>终端交互设置<br/>Pin:Duty]
Loading

Flow diagram for I2C SSD1306 example setup, build, and run

flowchart LR
  A[硬件接线
OLED ↔ Duo S
VCC/GND/SCL/SDA] --> B[Host PC
安装依赖包]
  B --> C[下载安装
ruyi 包管理器]
  C --> D[ruyi update
ruyi install gnu-plct llvm-plct]
  D --> E[ruyi extract milkv-duo-examples
mv 为 duo-examples]
  E --> F[创建虚拟环境
ruyi venv ...
source ruyi-activate]
  F --> G[进入
i2c/ssd1306_i2c 目录]
  G --> H[使用
riscv64-plct-linux-gnu-gcc
编译生成 ssd1306_i2c]
  H --> I[scp 将
ssd1306_i2c 传输到 Duo S]
  I --> J[在 Duo S 上配置引脚
B18/IIC1_SCL
B11/IIC1_SDA]
  J --> K[运行 ./ssd1306_i2c
OLED 显示
Hello MilkV Duo!]
Loading

File-Level Changes

Change Details Files
Add PWM peripheral quickstart guide for Milk-V Duo S using RuyiSDK.
  • Introduce YAML-style front‑matter metadata for the PWM README (board, OS, profile, status, last_update)
  • Document Debian-side setup: system dependencies, RuyiSDK installation, and toolchain installation via ruyi
  • Describe how to obtain and prepare the milkv-duo-examples source tree, including directory layout expectations
  • Provide instructions to modify pwm.c to use the "milkv_duos" wiringX board profile before building
  • Detail creation and activation of an ruyi toolchain virtual environment and verification of the GCC version
  • Document the riscv64-plct-linux-gnu-gcc command used to build the PWM sample binary against wiringX and musl libs
  • Describe SCP transfer, SSH usage, pinmux configuration (A16/PWM_4), and runtime usage (pin:duty format) for validating PWM output
Duo_S/PWM/README_zh.md
Add I2C SSD1306 OLED peripheral quickstart guide for Milk-V Duo S using RuyiSDK.
  • Introduce YAML-style front‑matter metadata for the I2C README (board, OS, profile, status, last_update)
  • Document Debian-side setup: system dependencies, RuyiSDK installation, and toolchain installation via ruyi (mirroring the PWM guide)
  • Provide detailed wiring instructions for connecting an SSD1306 I2C OLED to Duo S, including pin tables and reference images
  • Describe how to obtain and prepare the milkv-duo-examples source tree
  • Detail creation and activation of an ruyi toolchain virtual environment and verification of the GCC version
  • Document the riscv64-plct-linux-gnu-gcc command used to build the ssd1306_i2c example binary against wiringX and musl libs, including current absolute include/lib paths
  • Describe SCP transfer, SSH usage, pinmux configuration (B18/IIC1_SCL, B11/IIC1_SDA), and runtime expectations for the OLED text output
Duo_S/I2C/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
Contributor

@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 3 issues, and left some high level feedback:

  • The shell commands in both READMEs contain non-breaking spaces (e.g., between sudo and apt), which can cause copy-paste failures in terminals; replace these with normal spaces throughout the command blocks.
  • In the I2C README, the build command hardcodes /home/pingguo/duo-examples paths, which may not match users’ environments; consider using paths relative to the previously mentioned duo-examples directory instead.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The shell commands in both READMEs contain non-breaking spaces (e.g., between `sudo` and `apt`), which can cause copy-paste failures in terminals; replace these with normal spaces throughout the command blocks.
- In the I2C README, the build command hardcodes `/home/pingguo/duo-examples` paths, which may not match users’ environments; consider using paths relative to the previously mentioned `duo-examples` directory instead.

## Individual Comments

### Comment 1
<location path="Duo_S/PWM/README_zh.md" line_range="20" />
<code_context>
+
+```
+
+sudo apt update; sudo apt install -y wget tar zstd xz-utils git build-essential
+
+```
</code_context>
<issue_to_address>
**issue (bug_risk):** Replace non-breaking spaces in the command with regular spaces to ensure it runs correctly when copy-pasted.

There are non‑breaking spaces in this command (e.g., between `sudo` and `apt`, and before `-y` and `zstd`), likely introduced by rich‑text copy/paste. Shells won’t treat these as normal spaces, so the command may fail when copied; they should be plain spaces in the source.
</issue_to_address>

### Comment 2
<location path="Duo_S/I2C/README_zh.md" line_range="20" />
<code_context>
+
+```
+
+sudo apt update; sudo apt install -y wget tar zstd xz-utils git build-essential
+
+```
</code_context>
<issue_to_address>
**issue (bug_risk):** Normalize spaces in the `apt` command to avoid copy-paste issues.

This command uses non‑breaking spaces between tokens (e.g., after `sudo`, `install`, and before `zstd`), which can break copy‑paste into a terminal. Please replace them with regular spaces.
</issue_to_address>

### Comment 3
<location path="Duo_S/I2C/README_zh.md" line_range="132" />
<code_context>
+
+cd i2c/ssd1306_i2c
+
+riscv64-plct-linux-gnu-gcc -o ssd1306_i2c ssd1306_i2c.c -I/home/pingguo/duo-examples/include/system -L/home/pingguo/duo-examples/libs/system/musl_riscv64 -lwiringx
+
+```
</code_context>
<issue_to_address>
**suggestion:** Avoid hard-coding a specific home directory in the compile command; use a relative path instead.

Since users have already `cd`’d into `duo-examples`, these absolute `/home/pingguo/...` paths will only work on your machine. Please switch to paths relative to the current `duo-examples` directory (for example, `-I../include/system` and `-L../libs/system/musl_riscv64`).

```suggestion
cd i2c/ssd1306_i2c

riscv64-plct-linux-gnu-gcc -o ssd1306_i2c ssd1306_i2c.c -I../../include/system -L../../libs/system/musl_riscv64 -lwiringx
```
</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 Duo_S/PWM/README_zh.md

```

sudo apt update; sudo apt install -y wget tar zstd xz-utils git build-essential
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): Replace non-breaking spaces in the command with regular spaces to ensure it runs correctly when copy-pasted.

There are non‑breaking spaces in this command (e.g., between sudo and apt, and before -y and zstd), likely introduced by rich‑text copy/paste. Shells won’t treat these as normal spaces, so the command may fail when copied; they should be plain spaces in the source.

Comment thread Duo_S/I2C/README_zh.md

```

sudo apt update; sudo apt install -y wget tar zstd xz-utils git build-essential
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue (bug_risk): Normalize spaces in the apt command to avoid copy-paste issues.

This command uses non‑breaking spaces between tokens (e.g., after sudo, install, and before zstd), which can break copy‑paste into a terminal. Please replace them with regular spaces.

Comment thread Duo_S/I2C/README_zh.md

```bash

cd i2c/ssd1306_i2c
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

suggestion: Avoid hard-coding a specific home directory in the compile command; use a relative path instead.

Since users have already cd’d into duo-examples, these absolute /home/pingguo/... paths will only work on your machine. Please switch to paths relative to the current duo-examples directory (for example, -I../include/system and -L../libs/system/musl_riscv64).

Suggested change
cd i2c/ssd1306_i2c
cd i2c/ssd1306_i2c
riscv64-plct-linux-gnu-gcc -o ssd1306_i2c ssd1306_i2c.c -I../../include/system -L../../libs/system/musl_riscv64 -lwiringx

@ZihanCheng63 ZihanCheng63 changed the title Add user manuals for I2C and PWM Add Coremark and HelloWorld README for Nuclei RV-STAR May 31, 2026
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.

1 participant