Skip to content

Commit 2f918e4

Browse files
doc: Replace with English version of documentation (#66)
* 替换为英文版文档 * 404链接修改 --------- Co-authored-by: chendong@nucleisys.com <chendong@nucleisys.com>
1 parent c16056d commit 2f918e4

31 files changed

Lines changed: 1060 additions & 1074 deletions

File tree

0-template.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# 20字以内标题描述问题或者描述方案
1+
# Title (within 20 characters) describing the problem or the solution
22

3-
## 问题说明/方案说明
3+
## Problem Description / Solution Description
44

5-
在这里详细的描述问题是什么样,如果有issue描述本问题,请将issue的链接加进去一起进行描述,如果issue本身很详细,这里就简要描述即可。
5+
Describe the problem in detail here. If there is an issue describing this problem, please include the issue link and describe it together; if the issue itself is already detailed, a brief description here is sufficient.
66

7-
## 解决方案
7+
## Solution
88

9-
在这里列出来问题详细的解决方案,如果后续有版本解决这个问题,也需要列出来具体哪个版本可以解决这个问题。
9+
List the detailed solution to the problem here. If a future version resolves this problem, also specify which version resolves it.
1010

11-
## 参考资料
11+
## References
1212

1313
- [Nuclei Studio FAQs](https://www.rvmcu.com/nucleistudio-faq.html)
14-
- [Nuclei Studio/Tools 不断更新的补充文档](https://github.com/Nuclei-Software/nuclei-studio)
14+
- [Nuclei Studio/Tools Continuously Updated Supplementary Documentation](https://github.com/Nuclei-Software/nuclei-studio)
1515
- [Nuclei Studio Issues](https://github.com/Nuclei-Software/nuclei-studio/issues)

1-cannot-setup-guestmemory.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# 因内存不足,导致在Nuclei Studio中启动qemu失败
1+
# Failure to Start QEMU in Nuclei Studio Due to Insufficient Memory
22

3-
## 问题说明
3+
## Problem Description
44

5-
在实际开发中发现,因电脑同时运行了很多的进程或者电脑本身的系统内存不足,致使在Nuclei Studio中,使用qemu进行程序调试时,可能出现如下报错:
5+
During actual development, it has been observed that when many processes are running on the computer at the same time, or when the computer's system memory is insufficient, the following error may occur when debugging a program with QEMU in Nuclei Studio:
66

77
```
88
qemu-system-riscv64.exe: cannot set up quest memory 'riscv.evalsoc.flashxip' Invalid argument
99
```
1010

1111
![](asserts/images/1/cannotsetupguestmemiry.png)
1212

13-
## 解决方案
13+
## Solution
1414

15-
一般可以通过关闭某些应用,释放一部分内存以供qemu使用,即可解决些问题。
15+
In general, this problem can be resolved by closing some applications to free up memory for QEMU to use.

10-compiling_projects_with_headless_in_nuclei_studio.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
# 在Nuclei Studio下用命令行编译工程
1+
# Compiling Projects from the Command Line in Nuclei Studio
22

3-
## 问题说明
3+
## Problem Description
44

5-
很多客户咨询怎么在Nuclei Studio上使用IDE的无头Headless模式来构建和编译工程。
5+
Many customers ask how to use the IDE's headless mode in Nuclei Studio to build and compile projects.
66

7-
## 解决方案
8-
9-
> 所有以 ``NucleiStudio.exe`` 开头的命令行执行时,会有一个弹框显示执行日志,如果需屏蔽弹框,可以将命令改为 ``eclipsec.exe``
7+
## Solution
108

11-
> 以下文档是在**2024.06**版本的IDE中实测,作为补充说明。
9+
> When running any command line that starts with ``NucleiStudio.exe``, a pop-up window appears showing the execution log. To suppress this pop-up, change the command to ``eclipsec.exe``
1210
13-
因NucleiStudio 2024.06版运行在java 21的环境上,实际应用中很多用户的本地没有java 21环境,故在运行命令时发现在执行该命令时,因找不到对应的jre而报错。为解决上述问题,可以在本地机器上安装java 21的环境(如何安装用户可以自行搜索相关教程),也可以在命令行中通过 `-vm` 参数指定NucleiStudio 2024.06中自带的jre的路径。
11+
> The following documentation was tested with the **2024.06** version of the IDE and is provided as supplementary information.
12+
13+
Because NucleiStudio 2024.06 runs on a Java 21 environment, and many users do not have a Java 21 environment installed locally, running the command may fail with an error because the corresponding JRE cannot be found. To resolve this issue, you can either install a Java 21 environment on your local machine (users can search for relevant installation tutorials themselves), or use the `-vm` parameter on the command line to specify the path of the JRE bundled with NucleiStudio 2024.06.
1414

1515
~~~shell
1616
NucleiStudio.exe -vm "<user_nucleistudio_path>/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin" --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\NucleiStudio_workspace -cleanBuild test/Debug -Debug
1717
~~~
1818

19-
提供一组批量导入工程并批量编译工程的命令
19+
The following is a set of commands for batch importing and batch building projects
2020

21-
创建workspace并批量导入工程
21+
Create a workspace and batch import projects
2222

2323
~~~shell
2424
NucleiStudio.exe -vm "<user_nucleistudio_path>/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin" --launcher.suppressErrors -noSplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data $CI_PROJECT_DIR -importAll $CI_PROJECT_DIR
2525
~~~
2626

27-
编译这组导入的工程
27+
Build the imported projects
2828

2929
~~~shell
3030
NucleiStudio.exe -vm "<user_nucleistudio_path>/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin" --launcher.suppressErrors -noSplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data $CI_PROJECT_DIR -build ${TARGET_PHASE}_Project/Debug
3131
~~~
3232

33-
> 以下文档是在**2023.10**版本的IDE中实测,其他版本可能需要做一些调整适配才可以正常工作。
33+
> The following documentation was tested with the **2023.10** version of the IDE; other versions may require some adjustments to work properly.
3434
35-
Nuclei Studio是图形化(GUI)的代码编写工具,但是在某些特定的场景下,用户需要通过命令行来快速编译工程,
36-
在Nuclei Studio中,只需要一行命令就可以实现。下载好Nuclei Studio后,在Nuclei Studio的workspace已经创建好了需要编译的工程`test`,
37-
**同时Nuclei Studio已退出运行**, 执行以下命令就可以完成工程的编译。
35+
Nuclei Studio is a graphical (GUI) code editing tool, but in certain scenarios users need to build projects quickly from the command line.
36+
In Nuclei Studio, this can be done with a single command. After downloading Nuclei Studio, make sure the project `test` to be built has already been created in the Nuclei Studio workspace,
37+
**and that Nuclei Studio is not running**, then execute the following command to build the project.
3838

39-
> **提醒**: 请确保 NucleiStudio的PATH已经设置到系统中,这样 `NucleiStudio.exe`/`NucleiStudio` 才可以被执行。
39+
> **Note**: Make sure the NucleiStudio PATH has been added to the system, so that `NucleiStudio.exe`/`NucleiStudio` can be executed.
4040
41-
> **下面以Windows系统举例**
41+
> **The following example uses Windows**
4242
4343
~~~shell
4444
NucleiStudio.exe --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\NucleiStudio_workspace -cleanBuild test/Debug -Debug
4545
~~~
4646

47-
> `--launcher.suppressErrors` 用来屏蔽构建出错时,Eclipse会出错弹窗.
47+
> `--launcher.suppressErrors` is used to suppress the Eclipse error pop-up window when a build error occurs.
4848
49-
如果需要在**2022.12版本**的IDE上进行使用,则需要先设置好toolchain目录下`gcc/bin``build-tools/bin`的路径到系统PATH中,然后将`NucleiStudio.exe`换成`eclipsec.exe`
49+
If you need to use the **2022.12 version** of the IDE, you must first add the paths of `gcc/bin` and `build-tools/bin` under the toolchain directory to the system PATH, and then replace `NucleiStudio.exe` with `eclipsec.exe`
5050

51-
针对**2022.12版本**,命令举例如下:
51+
For the **2022.12 version**, the example commands are as follows:
5252

5353
~~~shell
54-
# 这里请修改成自己的IDE路径
54+
# Change this to your own IDE path
5555
set NSIDE=D:\NucleiStudio_IDE_202212-win64\NucleiStudio
56-
# 必须设置好系统PATH
56+
# The system PATH must be set correctly
5757
set PATH=%NSIDE%\toolchain\gcc\bin;%NSIDE%\toolchain\build-tools\bin;%PATH%
58-
# 注意NucleiStudio.exe换成了eclipsec.exe
58+
# Note that NucleiStudio.exe is replaced with eclipsec.exe
5959
%NSIDE%\eclipsec.exe --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\NucleiStudio_workspace -cleanBuild test/Debug
6060
~~~
6161

62-
> 这个**2023.10**版本的举例的命令 会 弹出一个额外的命令行窗口进行输出。
62+
> The example command for the **2023.10** version opens an additional command-line window for output.
6363
6464
![Nuclei Studio Command Line Build](asserts/images/10/wx_20231208153525.png)
6565

66-
- `NucleiStudio.exe`:该参数是Nuclei Studio的启动应用,在Nuclei Studio的安装目录下。
67-
- `--launcher.suppressErrors`:该参数是用于抑制Nuclei Studio启动时的错误信息。
68-
- `-nosplash`:该参数用于关闭启动时的 Splash 屏幕。这意味着在启动 Eclipse 时不会显示一个短暂的加载屏幕。
69-
- `-application`:该参数用于指定要运行的应用程序。在这里,`org.eclipse.cdt.managedbuilder.core.headlessbuild`
70-
是指 Headless 构建应用程序。该应用程序用于执行构建操作,而不需要图形用户界面(GUI)。
71-
- `-data`:该参数用于指定工作区路径。它告诉 Nuclei Studio 将数据存储在哪里,例如工作空间、项目和文件。
72-
- `-build`:该参数用于指定需要编译的工程,`test/Debug`,表示的是编译test工程中的Debug配置;
73-
一般Nuclei Studio创建的工程有Debug、Release两套配置,如果不指定配置,这个默认会编译出Debug、Release
74-
可以看到编译后工程目录下有Debug、Release两个目录。
66+
- `NucleiStudio.exe`: This is the Nuclei Studio launcher application, located in the Nuclei Studio installation directory.
67+
- `--launcher.suppressErrors`: This parameter is used to suppress error messages when Nuclei Studio starts.
68+
- `-nosplash`: This parameter disables the splash screen at startup. This means no brief loading screen is displayed when Eclipse starts.
69+
- `-application`: This parameter specifies the application to run. Here, `org.eclipse.cdt.managedbuilder.core.headlessbuild`
70+
refers to the headless build application. This application performs build operations without a graphical user interface (GUI).
71+
- `-data`: This parameter specifies the workspace path. It tells Nuclei Studio where to store data, such as workspaces, projects, and files.
72+
- `-build`: This parameter specifies the project to build; `test/Debug` means building the Debug configuration of the test project;
73+
projects created by Nuclei Studio generally have two configurations, Debug and Release. If no configuration is specified, both Debug and Release are built by default,
74+
and you can see the Debug and Release directories under the project directory after the build.
7575

7676
~~~
7777
├─.settings
@@ -85,10 +85,10 @@ set PATH=%NSIDE%\toolchain\gcc\bin;%NSIDE%\toolchain\build-tools\bin;%PATH%
8585
└─nuclei_sdk
8686
~~~
8787

88-
- `-cleanBuild`:该参数与`-build`类似,只是在编译之前,会清空清理工作空间。建议使用`-cleanBuild`
89-
- `-Debug`:该参数用于指定编译过程是Debug模式,在编译时会输出详细的编译过程日志。如果不带此参数,命令将静默执行,没有任何输出。
88+
- `-cleanBuild`: This parameter is similar to `-build`, except that it cleans the workspace before building. Using `-cleanBuild` is recommended.
89+
- `-Debug`: This parameter specifies that the build process runs in Debug mode, outputting detailed build logs during compilation. Without this parameter, the command runs silently with no output.
9090

91-
**以下为上面举例命令的输出内容,以供参考**
91+
**The following is the output of the example command above, for reference**
9292

9393
~~~
9494
17:00:17 **** Clean-only build of configuration Debug for project test ****
@@ -287,7 +287,7 @@ Finished building: test.lst
287287
17:00:23 Build Finished. 0 errors, 0 warnings. (took 5s.75ms)
288288
~~~
289289

290-
以下为`org.eclipse.cdt.managedbuilder.core.headlessbuild`所提供的参数,以供参考。
290+
The following are the parameters provided by `org.eclipse.cdt.managedbuilder.core.headlessbuild`, for reference.
291291

292292
~~~
293293
-data {/path/to/workspace}

11-openocd_reported_error_not_known_as_fespi_capable.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# OpenOCD烧写程序时报错Error:Device ID 8xle2g8a6d is not known as FESPI capable
1+
# Error Reported by OpenOCD When Flashing a Program: Error:Device ID 8xle2g8a6d is not known as FESPI capable
22

3-
## 问题说明
3+
## Problem Description
44

5-
Nuclei Studio 2023.10版中烧写程序时有报以下错误:
5+
In Nuclei Studio 2023.10, the following error may be reported when flashing a program:
66

7-
参见这个 https://github.com/riscv-mcu/hbird-sdk/issues/8
7+
See https://github.com/riscv-mcu/hbird-sdk/issues/8
88

99
```
1010
Info : Using libusb driver
@@ -20,10 +20,10 @@ Error: Device ID 0x1e200a6d is not known as FESPI capable
2020
Error: auto_probe failed
2121
```
2222

23-
## 解决方案
23+
## Solution
2424

25-
因为在openocd 2023.10中,将`flash bank $_FLASHNAME``fespi`修改为了`nuspi`,需要工程中的openocd配置文件中的`fespi`修改为了`nuspi`
26-
以蜂鸟工程为例,将`hbird_sdk/SoC/hbirdv2/Board/mcu200t/openocd_hbirdv2.cfg`修改为如下配置,工程即可正常使用。
25+
In OpenOCD 2023.10, `flash bank $_FLASHNAME` was changed from `fespi` to `nuspi`, so the `fespi` setting in the OpenOCD configuration file of the project needs to be changed to `nuspi`.
26+
Taking the Hummingbird (hbird) project as an example, modify `hbird_sdk/SoC/hbirdv2/Board/mcu200t/openocd_hbirdv2.cfg` to the following configuration, and the project will then work properly.
2727

2828
```
2929
adapter_khz 1000

12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# 关于dhrystone在IDE上跑分和NSDK 0.5.0命令行跑分不一致的问题
1+
# About the Inconsistency Between Dhrystone Benchmark Scores in the IDE and NSDK 0.5.0 Command-Line Scores
22

3-
## 问题说明
3+
## Problem Description
44

5-
在0.5.0版本的sdk-nuclei_sdk中,为了IDE上使用libncrt库的时候编译有些程序不报错,设置了会默认带上`-msave-restore`
6-
但在创建dhrystone用例工程时,选择使用newlib库后,该选项会导致跑分降低,不符合CPU的真实跑分。
5+
In version 0.5.0 of sdk-nuclei_sdk, the `-msave-restore` option is enabled by default so that some programs can compile without errors when using the libncrt library in the IDE.
6+
However, when creating a Dhrystone example project with the newlib library selected, this option causes the benchmark score to drop, and the result does not reflect the CPU's true performance.
77

8-
## 解决方案
8+
## Solution
99

10-
在跑分的时候,需要在对应项目的`Properties -> C/C++ Build -> Settings`中,取消对`Small prologue/epilogue(-msave-restore)`的选中。
11-
具体流程和示例图如下:
10+
When running the benchmark, you need to go to the corresponding project's `Properties -> C/C++ Build -> Settings` and deselect `Small prologue/epilogue(-msave-restore)`.
11+
The detailed steps and screenshots are as follows:
1212

13-
1. 下载**sdk-nuclei_sdk 0.5.0** NPK组件包。
13+
1. Download the **sdk-nuclei_sdk 0.5.0** NPK component package.
1414

15-
2. 新建一个**Nuclei RISCV-V C/C++ project**
15+
2. Create a new **Nuclei RISCV-V C/C++ project**.
1616

17-
3. 在新建项目的过程中,选中**Dhrystone Benchmark****N307FD Core**,其他选项默认设置即可。此时直接编译运行,跑分为**1.405**
17+
3. During project creation, select **Dhrystone Benchmark** and **N307FD Core**, and keep the default settings for the other options. If you build and run it directly at this point, the benchmark score is **1.405**.
1818

19-
4. 但实际需要跑分时,要先取消选中`-msave-restore`选项,该跑分结果为**1.664**
19+
4. However, for actual benchmarking, you must first deselect the `-msave-restore` option; the resulting benchmark score is **1.664**.
2020

2121
![](asserts/images/12/12-1.png)
2222
![](asserts/images/12/12-2.png)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Error: Couldn't find an available hardware trigger / Error: can't add breakpoint: resource not available
22

3-
## 问题说明
3+
## Problem Description
44

5-
在NucleiStudio中使用OpenOCD调试hbird/hbirdv2处理器(不支持硬件断点)或者 Nuclei 100 系列的处理器时,当程序运行在Flash/FlashXip下时,会报Error。
5+
When using OpenOCD in NucleiStudio to debug hbird/hbirdv2 processors (which do not support hardware breakpoints) or the Nuclei 100 series processors, an Error is reported when the program runs from Flash/FlashXip.
66
```
77
Error: Couldn't find an available hardware trigger.
88
Error: can't add breakpoint: resource not available
@@ -12,8 +12,8 @@ Error: can't add breakpoint: resource not available
1212

1313
![](asserts/images/13/13-2.png)
1414

15-
是因为所运行的CPU不支持硬件断点,导致程序运行在Flash上的时候,IDE调试功能无法正常工作,这个是IDE会需要打一个临时断点的缘故导致的。如果需要下载并运行程序,切换到Run运行模式可以正常运行程序。
15+
This happens because the CPU being run does not support hardware breakpoints, which prevents the IDE's debug functionality from working properly when the program runs from Flash — the IDE needs to set a temporary breakpoint. If you only need to download and run the program, switch to Run mode and the program will run normally.
1616

17-
## 解决方案
17+
## Solution
1818

19-
当在调试此类型处理器时,如果需要调试的话,就需要将程序编译运行在RAM上。
19+
When debugging this type of processor, if debugging is required, the program must be compiled to run from RAM.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# cannot find -lncrt_balanced: No such file or directory
22

3-
## 问题说明
3+
## Problem Description
44

5-
在NucleiStudio中使用编译工程时有报错信息如下:
5+
When building a project in Nuclei Studio, the following error messages are reported:
66

77
```
88
G:/NucleiStudio/toolchain/gcc/bin/../lib/gcc/riscv64-unknown-elf/13.1.1/../../../../riscv64-unknown-elf/bin/ld.exe: cannot find -lncrt_balanced: No such file or directory
@@ -13,10 +13,10 @@ G:/NucleiStudio/toolchain/gcc/bin/../lib/gcc/riscv64-unknown-elf/13.1.1/../../..
1313

1414
![](asserts/images/14/14-1.png)
1515

16-
是因为在创建工程时,我们创建了一个64位的工程,同时在Standard C Library时,选择了带`-lncrt_balanced``-lfileops_uart`的扩展,而此类扩展又不支持64位,导致编译不通过。
16+
This happens because when creating the project, we created a 64-bit project, and in the Standard C Library settings, extensions with `-lncrt_balanced` and `-lfileops_uart` were selected. However, these extensions do not support 64-bit, which causes the build to fail.
1717

1818
![](asserts/images/14/14-2.png)
1919

20-
## 解决方案
20+
## Solution
2121

22-
`-lncrt_balanced``-lfileops_uart`不支持64位处理器,在创建此类处理器工程时,避免使用libncrt库。
22+
`-lncrt_balanced` and `-lfileops_uart` do not support 64-bit processors. When creating a project for such processors, avoid using the libncrt library.

0 commit comments

Comments
 (0)