Add Coremark and HelloWorld README for Nuclei RV-STAR#13
Conversation
Reviewer's GuideAdds 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 runflowchart 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]
Flow diagram for I2C SSD1306 example setup, build, and runflowchart 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!]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
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
sudoandapt), 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-examplespaths, which may not match users’ environments; consider using paths relative to the previously mentionedduo-examplesdirectory 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>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
|
||
| ``` | ||
|
|
||
| sudo apt update; sudo apt install -y wget tar zstd xz-utils git build-essential |
There was a problem hiding this comment.
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.
|
|
||
| ``` | ||
|
|
||
| sudo apt update; sudo apt install -y wget tar zstd xz-utils git build-essential |
There was a problem hiding this comment.
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.
|
|
||
| ```bash | ||
|
|
||
| cd i2c/ssd1306_i2c |
There was a problem hiding this comment.
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).
| 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 |
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: