diff --git a/10-compiling_projects_with_headless_in_nuclei_studio/index.html b/10-compiling_projects_with_headless_in_nuclei_studio/index.html index fd5a6e0..874a98e 100644 --- a/10-compiling_projects_with_headless_in_nuclei_studio/index.html +++ b/10-compiling_projects_with_headless_in_nuclei_studio/index.html @@ -144,6 +144,19 @@

在Nuclei Studio下用命令行编译工程

+

以下文档是在2024.06版本的IDE中实测,作为补充说明。

+
+

因NucleiStudio 2024.06版运行在java 21的环境上,实际应用中很多用户的本地没有java 21环境,故在运行命令时发现在执行该命令时,因找不到对应的jre而报错。为解决上述问题,可以在本地机器上安装java 21的环境(如何安装用户可以自行搜索相关教程),也可以在命令行中通过 -vm 参数指定NucleiStudio 2024.06中自带的jre的路径。

+
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
+
+

提供一组批量导入工程并批量编译工程的命令

+

创建workspace并批量导入工程

+
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
+
+

编译这组导入的工程

+
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
+
+

以下文档是在2023.10版本的IDE中实测,其他版本可能需要做一些调整适配才可以正常工作。

Nuclei Studio是图形化(GUI)的代码编写工具,但是在某些特定的场景下,用户需要通过命令行来快速编译工程, diff --git a/index.html b/index.html index 56dc1a6..f7042e2 100644 --- a/index.html +++ b/index.html @@ -166,7 +166,7 @@

Nuclei Studio Supply DocumentsDocuments

-

Generated by python3 update.py @ 2024-09-02 02:57:54

+

Generated by python3 update.py @ 2024-09-20 04:52:13

@@ -302,5 +302,5 @@

Documents \"test.lst\" Invoking: GNU RISC-V Cross Print Size riscv64-unknown-elf-size --format=berkeley \"test.elf\" text data bss dec hex filename 8824 1272 4592 14688 3960 test.elf Finished building: test.siz Finished building: test.hex Finished building: test.lst 17:00:23 Build Finished. 0 errors, 0 warnings. (took 5s.75ms) \u4ee5\u4e0b\u4e3a org.eclipse.cdt.managedbuilder.core.headlessbuild \u6240\u63d0\u4f9b\u7684\u53c2\u6570\uff0c\u4ee5\u4f9b\u53c2\u8003\u3002 -data {/path/to/workspace} -remove {[uri:/]/path/to/project} -removeAll {[uri:/]/path/to/projectTreeURI} Remove all projects under URI -import {[uri:/]/path/to/project} -importAll {[uri:/]/path/to/projectTreeURI} Import all projects under URI -build {project_name_reg_ex{/config_reg_ex} | all} -cleanBuild {project_name_reg_ex{/config_reg_ex} | all} -markerType Marker types to fail build on {all | cdt | marker_id} -no-indexer Disable indexer -verbose Verbose progress monitor updates -printErrorMarkers Print all error markers -I {include_path} additional include_path to add to tools -include {include_file} additional include_file to pass to tools -D {prepoc_define} addition preprocessor defines to pass to the tools -E {var=value} replace/add value to environment variable when running all tools -Ea {var=value} append value to environment variable when running all tools -Ep {var=value} prepend value to environment variable when running all tools -Er {var} remove/unset the given environment variable -T {toolid} {optionid=value} replace a tool option value in each configuration built -Ta {toolid} {optionid=value} append to a tool option value in each configuration built -Tp {toolid} {optionid=value} prepend to a tool option value in each configuration built -Tr {toolid} {optionid=value} remove a tool option value in each configuration built Tool option values are parsed as a string, comma separated list of strings or a boolean based on the options type","title":"\u5728Nuclei Studio\u4e0b\u7528\u547d\u4ee4\u884c\u7f16\u8bd1\u5de5\u7a0b"},{"location":"10-compiling_projects_with_headless_in_nuclei_studio/#nuclei-studio","text":"\u4ee5\u4e0b\u6587\u6863\u662f\u5728 2023.10 \u7248\u672c\u7684IDE\u4e2d\u5b9e\u6d4b\uff0c\u5176\u4ed6\u7248\u672c\u53ef\u80fd\u9700\u8981\u505a\u4e00\u4e9b\u8c03\u6574\u9002\u914d\u624d\u53ef\u4ee5\u6b63\u5e38\u5de5\u4f5c\u3002 Nuclei Studio\u662f\u56fe\u5f62\u5316\uff08GUI\uff09\u7684\u4ee3\u7801\u7f16\u5199\u5de5\u5177\uff0c\u4f46\u662f\u5728\u67d0\u4e9b\u7279\u5b9a\u7684\u573a\u666f\u4e0b\uff0c\u7528\u6237\u9700\u8981\u901a\u8fc7\u547d\u4ee4\u884c\u6765\u5feb\u901f\u7f16\u8bd1\u5de5\u7a0b\uff0c \u5728Nuclei Studio\u4e2d\uff0c\u53ea\u9700\u8981\u4e00\u884c\u547d\u4ee4\u5c31\u53ef\u4ee5\u5b9e\u73b0\u3002\u4e0b\u8f7d\u597dNuclei Studio\u540e\uff0c\u5728Nuclei Studio\u7684workspace\u5df2\u7ecf\u521b\u5efa\u597d\u4e86\u9700\u8981\u7f16\u8bd1\u7684\u5de5\u7a0b test , \u540c\u65f6Nuclei Studio\u5df2\u9000\u51fa\u8fd0\u884c , \u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u5c31\u53ef\u4ee5\u5b8c\u6210\u5de5\u7a0b\u7684\u7f16\u8bd1\u3002 \u63d0\u9192 : \u8bf7\u786e\u4fdd NucleiStudio\u7684PATH\u5df2\u7ecf\u8bbe\u7f6e\u5230\u7cfb\u7edf\u4e2d\uff0c\u8fd9\u6837 NucleiStudio.exe / NucleiStudio \u624d\u53ef\u4ee5\u88ab\u6267\u884c\u3002 \u4e0b\u9762\u4ee5Windows\u7cfb\u7edf\u4e3e\u4f8b NucleiStudio.exe --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\\NucleiStudio_workspace -cleanBuild test/Debug -Debug --launcher.suppressErrors \u7528\u6765\u5c4f\u853d\u6784\u5efa\u51fa\u9519\u65f6\uff0cEclipse\u4f1a\u51fa\u9519\u5f39\u7a97. \u5982\u679c\u9700\u8981\u5728 2022.12\u7248\u672c \u7684IDE\u4e0a\u8fdb\u884c\u4f7f\u7528\uff0c\u5219\u9700\u8981\u5148\u8bbe\u7f6e\u597dtoolchain\u76ee\u5f55\u4e0b gcc/bin \u548c build-tools/bin \u7684\u8def\u5f84\u5230\u7cfb\u7edfPATH\u4e2d\uff0c\u7136\u540e\u5c06 NucleiStudio.exe \u6362\u6210 eclipsec.exe \u9488\u5bf9 2022.12\u7248\u672c \uff0c\u547d\u4ee4\u4e3e\u4f8b\u5982\u4e0b: # \u8fd9\u91cc\u8bf7\u4fee\u6539\u6210\u81ea\u5df1\u7684IDE\u8def\u5f84 set NSIDE=D:\\NucleiStudio_IDE_202212-win64\\NucleiStudio # \u5fc5\u987b\u8bbe\u7f6e\u597d\u7cfb\u7edfPATH set PATH=%NSIDE%\\toolchain\\gcc\\bin;%NSIDE%\\toolchain\\build-tools\\bin;%PATH% # \u6ce8\u610fNucleiStudio.exe\u6362\u6210\u4e86eclipsec.exe %NSIDE%\\eclipsec.exe --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\\NucleiStudio_workspace -cleanBuild test/Debug \u8fd9\u4e2a 2023.10 \u7248\u672c\u7684\u4e3e\u4f8b\u7684\u547d\u4ee4 \u4f1a \u5f39\u51fa\u4e00\u4e2a\u989d\u5916\u7684\u547d\u4ee4\u884c\u7a97\u53e3\u8fdb\u884c\u8f93\u51fa\u3002 NucleiStudio.exe \uff1a\u8be5\u53c2\u6570\u662fNuclei Studio\u7684\u542f\u52a8\u5e94\u7528\uff0c\u5728Nuclei Studio\u7684\u5b89\u88c5\u76ee\u5f55\u4e0b\u3002 --launcher.suppressErrors \uff1a\u8be5\u53c2\u6570\u662f\u7528\u4e8e\u6291\u5236Nuclei Studio\u542f\u52a8\u65f6\u7684\u9519\u8bef\u4fe1\u606f\u3002 -nosplash \uff1a\u8be5\u53c2\u6570\u7528\u4e8e\u5173\u95ed\u542f\u52a8\u65f6\u7684 Splash \u5c4f\u5e55\u3002\u8fd9\u610f\u5473\u7740\u5728\u542f\u52a8 Eclipse \u65f6\u4e0d\u4f1a\u663e\u793a\u4e00\u4e2a\u77ed\u6682\u7684\u52a0\u8f7d\u5c4f\u5e55\u3002 -application \uff1a\u8be5\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u8981\u8fd0\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u8fd9\u91cc\uff0c org.eclipse.cdt.managedbuilder.core.headlessbuild \u662f\u6307 Headless \u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\u3002\u8be5\u5e94\u7528\u7a0b\u5e8f\u7528\u4e8e\u6267\u884c\u6784\u5efa\u64cd\u4f5c\uff0c\u800c\u4e0d\u9700\u8981\u56fe\u5f62\u7528\u6237\u754c\u9762\uff08GUI\uff09\u3002 -data \uff1a\u8be5\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u5de5\u4f5c\u533a\u8def\u5f84\u3002\u5b83\u544a\u8bc9 Nuclei Studio \u5c06\u6570\u636e\u5b58\u50a8\u5728\u54ea\u91cc\uff0c\u4f8b\u5982\u5de5\u4f5c\u7a7a\u95f4\u3001\u9879\u76ee\u548c\u6587\u4ef6\u3002 -build \uff1a\u8be5\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u9700\u8981\u7f16\u8bd1\u7684\u5de5\u7a0b\uff0c test/Debug \uff0c\u8868\u793a\u7684\u662f\u7f16\u8bd1test\u5de5\u7a0b\u4e2d\u7684Debug\u914d\u7f6e\uff1b \u4e00\u822cNuclei Studio\u521b\u5efa\u7684\u5de5\u7a0b\u6709Debug\u3001Release\u4e24\u5957\u914d\u7f6e\uff0c\u5982\u679c\u4e0d\u6307\u5b9a\u914d\u7f6e\uff0c\u8fd9\u4e2a\u9ed8\u8ba4\u4f1a\u7f16\u8bd1\u51faDebug\u3001Release\uff0c \u53ef\u4ee5\u770b\u5230\u7f16\u8bd1\u540e\u5de5\u7a0b\u76ee\u5f55\u4e0b\u6709Debug\u3001Release\u4e24\u4e2a\u76ee\u5f55\u3002 \u251c\u2500.settings \u251c\u2500application \u251c\u2500Debug \u2502 \u251c\u2500application \u2502 \u2514\u2500nuclei_sdk \u251c\u2500nuclei_sdk \u2514\u2500Release \u251c\u2500application \u2514\u2500nuclei_sdk -cleanBuild \uff1a\u8be5\u53c2\u6570\u4e0e -build \u7c7b\u4f3c\uff0c\u53ea\u662f\u5728\u7f16\u8bd1\u4e4b\u524d\uff0c\u4f1a\u6e05\u7a7a\u6e05\u7406\u5de5\u4f5c\u7a7a\u95f4\u3002\u5efa\u8bae\u4f7f\u7528 -cleanBuild \u3002 -Debug \uff1a\u8be5\u53c2\u6570\u7528\u4e8e\u6307\u5b9a\u7f16\u8bd1\u8fc7\u7a0b\u662fDebug\u6a21\u5f0f\uff0c\u5728\u7f16\u8bd1\u65f6\u4f1a\u8f93\u51fa\u8be6\u7ec6\u7684\u7f16\u8bd1\u8fc7\u7a0b\u65e5\u5fd7\u3002\u5982\u679c\u4e0d\u5e26\u6b64\u53c2\u6570\uff0c\u547d\u4ee4\u5c06\u9759\u9ed8\u6267\u884c\uff0c\u6ca1\u6709\u4efb\u4f55\u8f93\u51fa\u3002 \u4ee5\u4e0b\u4e3a\u4e0a\u9762\u4e3e\u4f8b\u547d\u4ee4\u7684\u8f93\u51fa\u5185\u5bb9\uff0c\u4ee5\u4f9b\u53c2\u8003 17:00:17 **** Clean-only build of configuration Debug for project test **** make -j8 clean rm -rf ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/chown.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_getres.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_gettime.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_settime.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/close.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/environ.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/errno.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/execve.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/exit.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fork.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fstat.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/getpid.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/gettimeofday.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/isatty.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/kill.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/link.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/lseek.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/open.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/read.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/readlink.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/sbrk.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/stat.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/symlink.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/times.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/unlink.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/wait.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/write.o ./nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc.o ./nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc_s.o ./nuclei_sdk/SoC/evalsoc/Common/Source/GCC/startup_evalsoc.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Drivers/evalsoc_uart.o ./nuclei_sdk/SoC/evalsoc/Common/Source/evalsoc_common.o ./nuclei_sdk/SoC/evalsoc/Common/Source/system_evalsoc.o ./application/main.o test.hex test.lst test.siz ./nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc.d ./nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc_s.d ./nuclei_sdk/SoC/evalsoc/Common/Source/GCC/startup_evalsoc.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/chown.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_getres.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_gettime.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_settime.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/close.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/environ.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/errno.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/execve.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/exit.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fork.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fstat.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/getpid.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/gettimeofday.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/isatty.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/kill.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/link.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/lseek.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/open.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/read.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/readlink.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/sbrk.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/stat.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/symlink.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/times.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/unlink.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/wait.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/write.d ./nuclei_sdk/SoC/evalsoc/Common/Source/Drivers/evalsoc_uart.d ./nuclei_sdk/SoC/evalsoc/Common/Source/evalsoc_common.d ./nuclei_sdk/SoC/evalsoc/Common/Source/system_evalsoc.d ./application/main.d test.elf 17:00:17 Build Finished. 0 errors, 0 warnings. (took 371ms) 17:00:18 **** Build of configuration Debug for project test **** make -j8 all Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/chown.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_getres.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_gettime.c Invoking: GNU RISC-V Cross C Compiler Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/chown.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/chown.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/chown.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/chown.c\" Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_settime.c riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_getres.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_getres.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_getres.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_getres.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_gettime.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_gettime.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_gettime.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_gettime.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_settime.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_settime.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_settime.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_settime.c\" Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/close.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/environ.c Invoking: GNU RISC-V Cross C Compiler Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/errno.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/execve.c riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/close.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/close.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/close.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/close.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/environ.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/environ.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/environ.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/environ.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/errno.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/errno.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/errno.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/errno.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/execve.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/execve.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/execve.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/execve.c\" Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/environ.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/chown.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_getres.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_settime.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/close.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_gettime.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/exit.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fork.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fstat.c Invoking: GNU RISC-V Cross C Compiler Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/exit.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/exit.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/exit.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/exit.c\" Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/getpid.c Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fork.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fork.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fork.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fork.c\" Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/execve.c riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fstat.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fstat.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fstat.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fstat.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/getpid.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/getpid.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/getpid.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/getpid.c\" Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/gettimeofday.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/isatty.c Invoking: GNU RISC-V Cross C Compiler Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/kill.c riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/gettimeofday.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/gettimeofday.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/gettimeofday.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/gettimeofday.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/isatty.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/isatty.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/isatty.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/isatty.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/kill.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/kill.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/kill.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/kill.c\" Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/exit.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/errno.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fork.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/link.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/lseek.c Invoking: GNU RISC-V Cross C Compiler Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/gettimeofday.c riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/link.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/link.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/link.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/link.c\" Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/open.c Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/lseek.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/lseek.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/lseek.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/lseek.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/open.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/open.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/open.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/open.c\" Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/read.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/kill.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/getpid.c Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/read.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/read.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/read.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/read.c\" Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/readlink.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/sbrk.c Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/readlink.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/readlink.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/readlink.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/readlink.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/sbrk.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/sbrk.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/sbrk.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/sbrk.c\" Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/isatty.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fstat.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/link.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/lseek.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/read.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/stat.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/symlink.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/times.c Invoking: GNU RISC-V Cross C Compiler Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/unlink.c riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/stat.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/stat.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/stat.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/stat.c\" Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/readlink.c Invoking: GNU RISC-V Cross C Compiler Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/symlink.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/symlink.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/symlink.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/symlink.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/times.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/times.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/times.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/times.c\" riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/unlink.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/unlink.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/unlink.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/unlink.c\" Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/wait.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/write.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/sbrk.c Invoking: GNU RISC-V Cross C Compiler Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/wait.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/wait.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/wait.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/wait.c\" riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/write.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/write.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/write.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/write.c\" Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc.S Invoking: GNU RISC-V Cross Assembler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -x assembler-with-cpp -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc.S\" Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/unlink.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/symlink.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc_s.S Invoking: GNU RISC-V Cross Assembler Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/GCC/startup_evalsoc.S Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc.S riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -x assembler-with-cpp -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc_s.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc_s.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc_s.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc_s.S\" Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/open.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/wait.c Invoking: GNU RISC-V Cross Assembler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -x assembler-with-cpp -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/GCC/startup_evalsoc.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/GCC/startup_evalsoc.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/GCC/startup_evalsoc.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/GCC/startup_evalsoc.S\" Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/Drivers/evalsoc_uart.c Invoking: GNU RISC-V Cross C Compiler Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/evalsoc_common.c Building file: ../nuclei_sdk/SoC/evalsoc/Common/Source/system_evalsoc.c riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/Drivers/evalsoc_uart.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/Drivers/evalsoc_uart.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/Drivers/evalsoc_uart.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/Drivers/evalsoc_uart.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/evalsoc_common.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/evalsoc_common.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/evalsoc_common.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/evalsoc_common.c\" Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"nuclei_sdk/SoC/evalsoc/Common/Source/system_evalsoc.d\" -MT\"nuclei_sdk/SoC/evalsoc/Common/Source/system_evalsoc.o\" -c -o \"nuclei_sdk/SoC/evalsoc/Common/Source/system_evalsoc.o\" \"../nuclei_sdk/SoC/evalsoc/Common/Source/system_evalsoc.c\" Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/stat.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/write.c Building file: ../application/main.c Invoking: GNU RISC-V Cross C Compiler riscv64-unknown-elf-gcc -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -D__IDE_RV_CORE=n307fd -DBOOT_HARTID=0 -DRUNMODE_IC_EN=0 -DRUNMODE_DC_EN=0 -DRUNMODE_CCM_EN=0 -DDOWNLOAD_MODE=DOWNLOAD_MODE_ILM -DDOWNLOAD_MODE_STRING=\\\"ILM\\\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\NMSIS\\Core\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Common\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Include\" -I\"C:\\NucleiStudio_workspace\\test\\application\" -std=gnu11 -MMD -MP -MF\"application/main.d\" -MT\"application/main.o\" -c -o \"application/main.o\" \"../application/main.c\" Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/GCC/startup_evalsoc.S Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/times.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc_s.S Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/Drivers/evalsoc_uart.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/evalsoc_common.c Finished building: ../nuclei_sdk/SoC/evalsoc/Common/Source/system_evalsoc.c Finished building: ../application/main.c Building target: test.elf Invoking: GNU RISC-V Cross C++ Linker riscv64-unknown-elf-g++ -march=rv32imafdc -mabi=ilp32d -mtune=nuclei-300-series -mcmodel=medlow -msave-restore -isystem=/include/newlib-nano -O2 -ffunction-sections -fdata-sections -fno-common -g -T \"C:\\NucleiStudio_workspace\\test\\nuclei_sdk\\SoC\\evalsoc\\Board\\nuclei_fpga_eval\\Source\\GCC\\gcc_evalsoc_ilm.ld\" -nostartfiles -nodefaultlibs -Xlinker --gc-sections -Wl,-Map,\"test.map\" -Wl,--check-sections -Wl,--no-warn-rwx-segments -u _isatty -u _write -u _sbrk -u _read -u _close -u _fstat -u _lseek -u errno -o \"test.elf\" ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/chown.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_getres.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_gettime.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/clock_settime.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/close.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/environ.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/errno.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/execve.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/exit.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fork.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/fstat.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/getpid.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/gettimeofday.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/isatty.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/kill.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/link.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/lseek.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/open.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/read.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/readlink.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/sbrk.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/stat.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/symlink.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/times.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/unlink.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/wait.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Stubs/newlib/write.o ./nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc.o ./nuclei_sdk/SoC/evalsoc/Common/Source/GCC/intexc_evalsoc_s.o ./nuclei_sdk/SoC/evalsoc/Common/Source/GCC/startup_evalsoc.o ./nuclei_sdk/SoC/evalsoc/Common/Source/Drivers/evalsoc_uart.o ./nuclei_sdk/SoC/evalsoc/Common/Source/evalsoc_common.o ./nuclei_sdk/SoC/evalsoc/Common/Source/system_evalsoc.o ./application/main.o -lstdc++ -lc_nano -lgcc Finished building target: test.elf Invoking: GNU RISC-V Cross Create Flash Image riscv64-unknown-elf-objcopy -O ihex \"test.elf\" \"test.hex\" Invoking: GNU RISC-V Cross Create Listing riscv64-unknown-elf-objdump --source --all-headers --demangle --line-numbers --wide \"test.elf\" > \"test.lst\" Invoking: GNU RISC-V Cross Print Size riscv64-unknown-elf-size --format=berkeley \"test.elf\" text data bss dec hex filename 8824 1272 4592 14688 3960 test.elf Finished building: test.siz Finished building: test.hex Finished building: test.lst 17:00:23 Build Finished. 0 errors, 0 warnings. (took 5s.75ms) \u4ee5\u4e0b\u4e3a org.eclipse.cdt.managedbuilder.core.headlessbuild \u6240\u63d0\u4f9b\u7684\u53c2\u6570\uff0c\u4ee5\u4f9b\u53c2\u8003\u3002 -data {/path/to/workspace} -remove {[uri:/]/path/to/project} -removeAll {[uri:/]/path/to/projectTreeURI} Remove all projects under URI -import {[uri:/]/path/to/project} -importAll {[uri:/]/path/to/projectTreeURI} Import all projects under URI -build {project_name_reg_ex{/config_reg_ex} | all} -cleanBuild {project_name_reg_ex{/config_reg_ex} | all} -markerType Marker types to fail build on {all | cdt | marker_id} -no-indexer Disable indexer -verbose Verbose progress monitor updates -printErrorMarkers Print all error markers -I {include_path} additional include_path to add to tools -include {include_file} additional include_file to pass to tools -D {prepoc_define} addition preprocessor defines to pass to the tools -E {var=value} replace/add value to environment variable when running all tools -Ea {var=value} append value to environment variable when running all tools -Ep {var=value} prepend value to environment variable when running all tools -Er {var} remove/unset the given environment variable -T {toolid} {optionid=value} replace a tool option value in each configuration built -Ta {toolid} {optionid=value} append to a tool option value in each configuration built -Tp {toolid} {optionid=value} prepend to a tool option value in each configuration built -Tr {toolid} {optionid=value} remove a tool option value in each configuration built Tool option values are parsed as a string, comma separated list of strings or a boolean based on the options type","title":"\u5728Nuclei Studio\u4e0b\u7528\u547d\u4ee4\u884c\u7f16\u8bd1\u5de5\u7a0b"},{"location":"11-openocd_reported_error_not_known_as_fespi_capable/","text":"OpenOCD\u70e7\u5199\u7a0b\u5e8f\u65f6\u62a5\u9519Error:Device ID 8xle2g8a6d is not known as FESPI capable \u00b6 Nuclei Studio 2023.10\u7248\u4e2d\u70e7\u5199\u7a0b\u5e8f\u65f6\u6709\u62a5\u4ee5\u4e0b\u9519\u8bef\uff1a \u53c2\u89c1\u8fd9\u4e2a https://github.com/riscv-mcu/hbird-sdk/issues/8 Info : Using libusb driver Info : clock speed 1000 kHz Info : JTAG tap: riscv.cpu tap/device found: 0x1e200a6d (mfg: 0x536 (Nuclei System Technology Co Ltd), part: 0xe200, ver: 0x1) Info : [riscv.cpu] Found 0 triggers halted at 0x200000b2 due to debug interrupt Info : Examined RISCV core; XLEN=32, misa=0x40001105 [riscv.cpu] Target successfully examined. Info : starting gdb server for riscv.cpu on 3333 Info : Listening on port 3333 for gdb connections Error: Device ID 0x1e200a6d is not known as FESPI capable Error: auto_probe failed \u56e0\u4e3a\u5728openocd 2023.10\u4e2d\uff0c\u5c06 flash bank $_FLASHNAME \u4ece fespi \u4fee\u6539\u4e3a\u4e86 nuspi \uff0c\u9700\u8981\u5de5\u7a0b\u4e2d\u7684openocd\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684 fespi \u4fee\u6539\u4e3a\u4e86 nuspi \uff0c \u4ee5\u8702\u9e1f\u5de5\u7a0b\u4e3a\u4f8b\uff0c\u5c06 hbird_sdk/SoC/hbirdv2/Board/mcu200t/openocd_hbirdv2.cfg \u4fee\u6539\u4e3a\u5982\u4e0b\u914d\u7f6e\uff0c\u5de5\u7a0b\u5373\u53ef\u6b63\u5e38\u4f7f\u7528\u3002 adapter_khz 1000 interface ftdi ftdi_vid_pid 0x0403 0x6010 ftdi_oscan1_mode off transport select jtag ftdi_layout_init 0x0008 0x001b ftdi_layout_signal nSRST -oe 0x0020 -data 0x0020 ftdi_layout_signal TCK -data 0x0001 ftdi_layout_signal TDI -data 0x0002 ftdi_layout_signal TDO -input 0x0004 ftdi_layout_signal TMS -data 0x0008 ftdi_layout_signal JTAG_SEL -data 0x0100 -oe 0x0100 set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen 5 set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME riscv -chain-position $_TARGETNAME $_TARGETNAME configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1 set _FLASHNAME $_CHIPNAME.flash flash bank $_FLASHNAME nuspi 0x20000000 0 0 0 $_TARGETNAME # Set the ILM space also as flash, to make sure it can be add breakpoint with hardware trigger #flash bank onboard_ilm nuspi 0x80000000 0 0 0 $_TARGETNAME # Expose Nuclei self-defined CSRS range 770-800,835-850,1984-2032,2064-2070 # See https://github.com/riscv/riscv-gnu-toolchain/issues/319#issuecomment-358397306 # Then user can view the csr register value in gdb using: info reg csr775 for CSR MTVT(0x307) riscv expose_csrs 770-800,835-850,1984-2032,2064-2070 init #reset if {[ info exists pulse_srst]} { ftdi_set_signal nSRST 0 ftdi_set_signal nSRST z } halt # We must turn on this because otherwise the IDE version debug cannot download the program into flash flash protect 0 0 last off","title":"OpenOCD\u70e7\u5199\u7a0b\u5e8f\u65f6\u62a5\u9519Error:Device ID 8xle2g8a6d is not known as FESPI capable"},{"location":"11-openocd_reported_error_not_known_as_fespi_capable/#openocderrordevice-id-8xle2g8a6d-is-not-known-as-fespi-capable","text":"Nuclei Studio 2023.10\u7248\u4e2d\u70e7\u5199\u7a0b\u5e8f\u65f6\u6709\u62a5\u4ee5\u4e0b\u9519\u8bef\uff1a \u53c2\u89c1\u8fd9\u4e2a https://github.com/riscv-mcu/hbird-sdk/issues/8 Info : Using libusb driver Info : clock speed 1000 kHz Info : JTAG tap: riscv.cpu tap/device found: 0x1e200a6d (mfg: 0x536 (Nuclei System Technology Co Ltd), part: 0xe200, ver: 0x1) Info : [riscv.cpu] Found 0 triggers halted at 0x200000b2 due to debug interrupt Info : Examined RISCV core; XLEN=32, misa=0x40001105 [riscv.cpu] Target successfully examined. Info : starting gdb server for riscv.cpu on 3333 Info : Listening on port 3333 for gdb connections Error: Device ID 0x1e200a6d is not known as FESPI capable Error: auto_probe failed \u56e0\u4e3a\u5728openocd 2023.10\u4e2d\uff0c\u5c06 flash bank $_FLASHNAME \u4ece fespi \u4fee\u6539\u4e3a\u4e86 nuspi \uff0c\u9700\u8981\u5de5\u7a0b\u4e2d\u7684openocd\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684 fespi \u4fee\u6539\u4e3a\u4e86 nuspi \uff0c \u4ee5\u8702\u9e1f\u5de5\u7a0b\u4e3a\u4f8b\uff0c\u5c06 hbird_sdk/SoC/hbirdv2/Board/mcu200t/openocd_hbirdv2.cfg \u4fee\u6539\u4e3a\u5982\u4e0b\u914d\u7f6e\uff0c\u5de5\u7a0b\u5373\u53ef\u6b63\u5e38\u4f7f\u7528\u3002 adapter_khz 1000 interface ftdi ftdi_vid_pid 0x0403 0x6010 ftdi_oscan1_mode off transport select jtag ftdi_layout_init 0x0008 0x001b ftdi_layout_signal nSRST -oe 0x0020 -data 0x0020 ftdi_layout_signal TCK -data 0x0001 ftdi_layout_signal TDI -data 0x0002 ftdi_layout_signal TDO -input 0x0004 ftdi_layout_signal TMS -data 0x0008 ftdi_layout_signal JTAG_SEL -data 0x0100 -oe 0x0100 set _CHIPNAME riscv jtag newtap $_CHIPNAME cpu -irlen 5 set _TARGETNAME $_CHIPNAME.cpu target create $_TARGETNAME riscv -chain-position $_TARGETNAME $_TARGETNAME configure -work-area-phys 0x80000000 -work-area-size 10000 -work-area-backup 1 set _FLASHNAME $_CHIPNAME.flash flash bank $_FLASHNAME nuspi 0x20000000 0 0 0 $_TARGETNAME # Set the ILM space also as flash, to make sure it can be add breakpoint with hardware trigger #flash bank onboard_ilm nuspi 0x80000000 0 0 0 $_TARGETNAME # Expose Nuclei self-defined CSRS range 770-800,835-850,1984-2032,2064-2070 # See https://github.com/riscv/riscv-gnu-toolchain/issues/319#issuecomment-358397306 # Then user can view the csr register value in gdb using: info reg csr775 for CSR MTVT(0x307) riscv expose_csrs 770-800,835-850,1984-2032,2064-2070 init #reset if {[ info exists pulse_srst]} { ftdi_set_signal nSRST 0 ftdi_set_signal nSRST z } halt # We must turn on this because otherwise the IDE version debug cannot download the program into flash flash protect 0 0 last off","title":"OpenOCD\u70e7\u5199\u7a0b\u5e8f\u65f6\u62a5\u9519Error:Device ID 8xle2g8a6d is not known as FESPI capable"},{"location":"12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE/","text":"\u5173\u4e8edhrystone\u5728IDE\u4e0a\u8dd1\u5206\u548cNSDK 0.5.0\u547d\u4ee4\u884c\u8dd1\u5206\u4e0d\u4e00\u81f4\u7684\u95ee\u9898 \u00b6 \u95ee\u9898\u8bf4\u660e \u00b6 \u57280.5.0\u7248\u672c\u7684sdk-nuclei_sdk\u4e2d\uff0c\u4e3a\u4e86IDE\u4e0a\u4f7f\u7528libncrt\u5e93\u7684\u65f6\u5019\u7f16\u8bd1\u6709\u4e9b\u7a0b\u5e8f\u4e0d\u62a5\u9519\uff0c\u8bbe\u7f6e\u4e86\u4f1a\u9ed8\u8ba4\u5e26\u4e0a -msave-restore \u3002 \u4f46\u5728\u521b\u5efadhrystone\u7528\u4f8b\u5de5\u7a0b\u65f6\uff0c\u9009\u62e9\u4f7f\u7528newlib\u5e93\u540e\uff0c\u8be5\u9009\u9879\u4f1a\u5bfc\u81f4\u8dd1\u5206\u964d\u4f4e\uff0c\u4e0d\u7b26\u5408CPU\u7684\u771f\u5b9e\u8dd1\u5206\u3002 \u89e3\u51b3\u65b9\u6848 \u00b6 \u5728\u8dd1\u5206\u7684\u65f6\u5019\uff0c\u9700\u8981\u5728\u5bf9\u5e94\u9879\u76ee\u7684 Properties -> C/C++ Build -> Settings \u4e2d\uff0c\u53d6\u6d88\u5bf9 Small prologue/epilogue(-msave-restore) \u7684\u9009\u4e2d\u3002 \u5177\u4f53\u6d41\u7a0b\u548c\u793a\u4f8b\u56fe\u5982\u4e0b\uff1a \u4e0b\u8f7d sdk-nuclei_sdk 0.5.0 NPK\u7ec4\u4ef6\u5305\u3002 \u65b0\u5efa\u4e00\u4e2a Nuclei RISCV-V C/C++ project \u3002 \u5728\u65b0\u5efa\u9879\u76ee\u7684\u8fc7\u7a0b\u4e2d\uff0c\u9009\u4e2d Dhrystone Benchmark \u548c N307FD Core ,\u5176\u4ed6\u9009\u9879\u9ed8\u8ba4\u8bbe\u7f6e\u5373\u53ef\u3002\u6b64\u65f6\u76f4\u63a5\u7f16\u8bd1\u8fd0\u884c\uff0c\u8dd1\u5206\u4e3a 1.405 \u3002 \u4f46\u5b9e\u9645\u9700\u8981\u8dd1\u5206\u65f6\uff0c\u8981\u5148\u53d6\u6d88\u9009\u4e2d -msave-restore \u9009\u9879\uff0c\u8be5\u8dd1\u5206\u7ed3\u679c\u4e3a 1.664 \u3002","title":"\u5173\u4e8edhrystone\u5728IDE\u4e0a\u8dd1\u5206\u548cNSDK 0.5.0\u547d\u4ee4\u884c\u8dd1\u5206\u4e0d\u4e00\u81f4\u7684\u95ee\u9898"},{"location":"12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE/#dhrystoneidensdk-050","text":"","title":"\u5173\u4e8edhrystone\u5728IDE\u4e0a\u8dd1\u5206\u548cNSDK 0.5.0\u547d\u4ee4\u884c\u8dd1\u5206\u4e0d\u4e00\u81f4\u7684\u95ee\u9898"},{"location":"12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE/#_1","text":"\u57280.5.0\u7248\u672c\u7684sdk-nuclei_sdk\u4e2d\uff0c\u4e3a\u4e86IDE\u4e0a\u4f7f\u7528libncrt\u5e93\u7684\u65f6\u5019\u7f16\u8bd1\u6709\u4e9b\u7a0b\u5e8f\u4e0d\u62a5\u9519\uff0c\u8bbe\u7f6e\u4e86\u4f1a\u9ed8\u8ba4\u5e26\u4e0a -msave-restore \u3002 \u4f46\u5728\u521b\u5efadhrystone\u7528\u4f8b\u5de5\u7a0b\u65f6\uff0c\u9009\u62e9\u4f7f\u7528newlib\u5e93\u540e\uff0c\u8be5\u9009\u9879\u4f1a\u5bfc\u81f4\u8dd1\u5206\u964d\u4f4e\uff0c\u4e0d\u7b26\u5408CPU\u7684\u771f\u5b9e\u8dd1\u5206\u3002","title":"\u95ee\u9898\u8bf4\u660e"},{"location":"12-nucleisdk-0.5.0-dhrystone-score-lower-than-expected-in-IDE/#_2","text":"\u5728\u8dd1\u5206\u7684\u65f6\u5019\uff0c\u9700\u8981\u5728\u5bf9\u5e94\u9879\u76ee\u7684 Properties -> C/C++ Build -> Settings \u4e2d\uff0c\u53d6\u6d88\u5bf9 Small prologue/epilogue(-msave-restore) \u7684\u9009\u4e2d\u3002 \u5177\u4f53\u6d41\u7a0b\u548c\u793a\u4f8b\u56fe\u5982\u4e0b\uff1a \u4e0b\u8f7d sdk-nuclei_sdk 0.5.0 NPK\u7ec4\u4ef6\u5305\u3002 \u65b0\u5efa\u4e00\u4e2a Nuclei RISCV-V C/C++ project \u3002 \u5728\u65b0\u5efa\u9879\u76ee\u7684\u8fc7\u7a0b\u4e2d\uff0c\u9009\u4e2d Dhrystone Benchmark \u548c N307FD Core ,\u5176\u4ed6\u9009\u9879\u9ed8\u8ba4\u8bbe\u7f6e\u5373\u53ef\u3002\u6b64\u65f6\u76f4\u63a5\u7f16\u8bd1\u8fd0\u884c\uff0c\u8dd1\u5206\u4e3a 1.405 \u3002 \u4f46\u5b9e\u9645\u9700\u8981\u8dd1\u5206\u65f6\uff0c\u8981\u5148\u53d6\u6d88\u9009\u4e2d -msave-restore \u9009\u9879\uff0c\u8be5\u8dd1\u5206\u7ed3\u679c\u4e3a 1.664 \u3002","title":"\u89e3\u51b3\u65b9\u6848"},{"location":"13-error_could_not_find_an_available_hardware_trigger/","text":"Error: Couldn't find an available hardware trigger / Error: can't add breakpoint: resource not available \u00b6 \u95ee\u9898\u8bf4\u660e \u00b6 \u5728NucleiStudio\u4e2d\u4f7f\u7528OpenOCD\u8c03\u8bd5hbird/hbirdv2\u5904\u7406\u5668\uff08\u4e0d\u652f\u6301\u786c\u4ef6\u65ad\u70b9\uff09\u6216\u8005 Nuclei 100 \u7cfb\u5217\u7684\u5904\u7406\u5668\u65f6\uff0c\u5f53\u7a0b\u5e8f\u8fd0\u884c\u5728Flash/FlashXip\u4e0b\u65f6\uff0c\u4f1a\u62a5Error\u3002 Error: Couldn't find an available hardware trigger. Error: can't add breakpoint: resource not available \u662f\u56e0\u4e3a\u6240\u8fd0\u884c\u7684CPU\u4e0d\u652f\u6301\u786c\u4ef6\u65ad\u70b9\uff0c\u5bfc\u81f4\u7a0b\u5e8f\u8fd0\u884c\u5728Flash\u4e0a\u7684\u65f6\u5019\uff0cIDE\u8c03\u8bd5\u529f\u80fd\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\uff0c\u8fd9\u4e2a\u662fIDE\u4f1a\u9700\u8981\u6253\u4e00\u4e2a\u4e34\u65f6\u65ad\u70b9\u7684\u7f18\u6545\u5bfc\u81f4\u7684\u3002\u5982\u679c\u9700\u8981\u4e0b\u8f7d\u5e76\u8fd0\u884c\u7a0b\u5e8f\uff0c\u5207\u6362\u5230Run\u8fd0\u884c\u6a21\u5f0f\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c\u7a0b\u5e8f\u3002 \u89e3\u51b3\u65b9\u6848 \u00b6 \u5f53\u5728\u8c03\u8bd5\u6b64\u7c7b\u578b\u5904\u7406\u5668\u65f6\uff0c\u5982\u679c\u9700\u8981\u8c03\u8bd5\u7684\u8bdd\uff0c\u5c31\u9700\u8981\u5c06\u7a0b\u5e8f\u7f16\u8bd1\u8fd0\u884c\u5728RAM\u4e0a\u3002","title":"Error: Couldn't find an available hardware trigger / Error: can't add breakpoint: resource not available"},{"location":"13-error_could_not_find_an_available_hardware_trigger/#error-couldnt-find-an-available-hardware-trigger-error-cant-add-breakpoint-resource-not-available","text":"","title":"Error: Couldn't find an available hardware trigger / Error: can't add breakpoint: resource not available"},{"location":"13-error_could_not_find_an_available_hardware_trigger/#_1","text":"\u5728NucleiStudio\u4e2d\u4f7f\u7528OpenOCD\u8c03\u8bd5hbird/hbirdv2\u5904\u7406\u5668\uff08\u4e0d\u652f\u6301\u786c\u4ef6\u65ad\u70b9\uff09\u6216\u8005 Nuclei 100 \u7cfb\u5217\u7684\u5904\u7406\u5668\u65f6\uff0c\u5f53\u7a0b\u5e8f\u8fd0\u884c\u5728Flash/FlashXip\u4e0b\u65f6\uff0c\u4f1a\u62a5Error\u3002 Error: Couldn't find an available hardware trigger. Error: can't add breakpoint: resource not available \u662f\u56e0\u4e3a\u6240\u8fd0\u884c\u7684CPU\u4e0d\u652f\u6301\u786c\u4ef6\u65ad\u70b9\uff0c\u5bfc\u81f4\u7a0b\u5e8f\u8fd0\u884c\u5728Flash\u4e0a\u7684\u65f6\u5019\uff0cIDE\u8c03\u8bd5\u529f\u80fd\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\uff0c\u8fd9\u4e2a\u662fIDE\u4f1a\u9700\u8981\u6253\u4e00\u4e2a\u4e34\u65f6\u65ad\u70b9\u7684\u7f18\u6545\u5bfc\u81f4\u7684\u3002\u5982\u679c\u9700\u8981\u4e0b\u8f7d\u5e76\u8fd0\u884c\u7a0b\u5e8f\uff0c\u5207\u6362\u5230Run\u8fd0\u884c\u6a21\u5f0f\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c\u7a0b\u5e8f\u3002","title":"\u95ee\u9898\u8bf4\u660e"},{"location":"13-error_could_not_find_an_available_hardware_trigger/#_2","text":"\u5f53\u5728\u8c03\u8bd5\u6b64\u7c7b\u578b\u5904\u7406\u5668\u65f6\uff0c\u5982\u679c\u9700\u8981\u8c03\u8bd5\u7684\u8bdd\uff0c\u5c31\u9700\u8981\u5c06\u7a0b\u5e8f\u7f16\u8bd1\u8fd0\u884c\u5728RAM\u4e0a\u3002","title":"\u89e3\u51b3\u65b9\u6848"},{"location":"14-cannot_find_-lncrt_balanced_no_such_file_or_directory/","text":"cannot find -lncrt_balanced: No such file or directory \u00b6 \u95ee\u9898\u8bf4\u660e \u00b6 \u5728NucleiStudio\u4e2d\u4f7f\u7528\u7f16\u8bd1\u5de5\u7a0b\u65f6\u6709\u62a5\u9519\u4fe1\u606f\u5982\u4e0b\uff1a 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 G:/NucleiStudio/toolchain/gcc/bin/../lib/gcc/riscv64-unknown-elf/13.1.1/../../../../riscv64-unknown-elf/bin/ld.exe: cannot find -lheapops_basic: No such file or directory G:/NucleiStudio/toolchain/gcc/bin/../lib/gcc/riscv64-unknown-elf/13.1.1/../../../../riscv64-unknown-elf/bin/ld.exe: cannot find -lfileops_uart: No such file or directory 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 \u662f\u56e0\u4e3a\u5728\u521b\u5efa\u5de5\u7a0b\u65f6\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a64\u4f4d\u7684\u5de5\u7a0b\uff0c\u540c\u65f6\u5728Standard C Library\u65f6\uff0c\u9009\u62e9\u4e86\u5e26 -lncrt_balanced \u3001 -lfileops_uart \u7684\u6269\u5c55\uff0c\u800c\u6b64\u7c7b\u6269\u5c55\u53c8\u4e0d\u652f\u630164\u4f4d\uff0c\u5bfc\u81f4\u7f16\u8bd1\u4e0d\u901a\u8fc7\u3002 \u89e3\u51b3\u65b9\u6848 \u00b6 -lncrt_balanced \u3001 -lfileops_uart \u4e0d\u652f\u630164\u4f4d\u5904\u7406\u5668\uff0c\u5728\u521b\u5efa\u6b64\u7c7b\u5904\u7406\u5668\u5de5\u7a0b\u65f6\uff0c\u907f\u514d\u4f7f\u7528\u6b64\u7c7b\u6269\u5c55\u3002","title":"cannot find -lncrt_balanced: No such file or directory"},{"location":"14-cannot_find_-lncrt_balanced_no_such_file_or_directory/#cannot-find-lncrt_balanced-no-such-file-or-directory","text":"","title":"cannot find -lncrt_balanced: No such file or directory"},{"location":"14-cannot_find_-lncrt_balanced_no_such_file_or_directory/#_1","text":"\u5728NucleiStudio\u4e2d\u4f7f\u7528\u7f16\u8bd1\u5de5\u7a0b\u65f6\u6709\u62a5\u9519\u4fe1\u606f\u5982\u4e0b\uff1a 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 G:/NucleiStudio/toolchain/gcc/bin/../lib/gcc/riscv64-unknown-elf/13.1.1/../../../../riscv64-unknown-elf/bin/ld.exe: cannot find -lheapops_basic: No such file or directory G:/NucleiStudio/toolchain/gcc/bin/../lib/gcc/riscv64-unknown-elf/13.1.1/../../../../riscv64-unknown-elf/bin/ld.exe: cannot find -lfileops_uart: No such file or directory 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 \u662f\u56e0\u4e3a\u5728\u521b\u5efa\u5de5\u7a0b\u65f6\uff0c\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a64\u4f4d\u7684\u5de5\u7a0b\uff0c\u540c\u65f6\u5728Standard C Library\u65f6\uff0c\u9009\u62e9\u4e86\u5e26 -lncrt_balanced \u3001 -lfileops_uart \u7684\u6269\u5c55\uff0c\u800c\u6b64\u7c7b\u6269\u5c55\u53c8\u4e0d\u652f\u630164\u4f4d\uff0c\u5bfc\u81f4\u7f16\u8bd1\u4e0d\u901a\u8fc7\u3002","title":"\u95ee\u9898\u8bf4\u660e"},{"location":"14-cannot_find_-lncrt_balanced_no_such_file_or_directory/#_2","text":"-lncrt_balanced \u3001 -lfileops_uart \u4e0d\u652f\u630164\u4f4d\u5904\u7406\u5668\uff0c\u5728\u521b\u5efa\u6b64\u7c7b\u5904\u7406\u5668\u5de5\u7a0b\u65f6\uff0c\u907f\u514d\u4f7f\u7528\u6b64\u7c7b\u6269\u5c55\u3002","title":"\u89e3\u51b3\u65b9\u6848"},{"location":"15-unsatisfiedLinkError_of_swt-win32-4965r8_dll_on_windows7/","text":"UnsatisfiedLinkError of swt-win32-4965r8.dll on Windows 7 \u00b6 \u95ee\u9898\u8bf4\u660e \u00b6 \u7528\u6237\u5728Windows 7\u3001Windows 8\u4e0b\u4f7f\u7528NucleiStudio 2024.06\u65f6\uff0c\u53d1\u73b0\u542f\u52a8\u4e0d\u4e86\uff0c\u5728 NucleiStudio\\configuration \u76ee\u5f55\u7684\u65e5\u5fd7\u4e2d\u53ef\u4ee5\u770b\u5230\u4ee5\u4e0b\u62a5\u9519\u5185\u5bb9\uff1a !ENTRY org.eclipse.osgi 4 0 2024-07-16 10:41:57.010 !MESSAGE Application error !STACK 1 java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: C:\\NucleiStudio\\configuration\\org.eclipse.osgi\\492\\0\\.cp\\swt-win32-4965r11.dll: \u627e\u4e0d\u5230\u6307\u5b9a\u7684\u7a0b\u5e8f\u3002 no swt-win32 in java.library.path: C:\\NucleiStudio;C:\\Windows\\Sun\\Java\\bin;C:\\Windows\\system32;C:\\Windows;C:/NucleiStudio//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin/server;C:/NucleiStudio//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin;C:\\Java\\JCDK3.0.4_ClassicEdition\\bin;C:\\Java\\jdk1.6.0_26\\bin;C:\\Java\\jdk1.6.0_26\\lib;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files (x86)\\Microsoft SQL Server\\90\\Tools\\binn\\;D:\\Python25;C:\\NucleiStudio;;. no swt in java.library.path: C:\\NucleiStudio;C:\\Windows\\Sun\\Java\\bin;C:\\Windows\\system32;C:\\Windows;C:/NucleiStudio//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin/server;C:/NucleiStudio//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin;C:\\Java\\JCDK3.0.4_ClassicEdition\\bin;C:\\Java\\jdk1.6.0_26\\bin;C:\\Java\\jdk1.6.0_26\\lib;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files (x86)\\Microsoft SQL Server\\90\\Tools\\binn\\;D:\\Python25;C:\\NucleiStudio;;. C:\\Users\\username\\.swt\\lib\\win32\\x86_64\\swt-win32-4965r11.dll: \u627e\u4e0d\u5230\u6307\u5b9a\u7684\u7a0b\u5e8f\u3002 Can't load library: C:\\Users\\username\\.swt\\lib\\win32\\x86_64\\swt-win32.dll Can't load library: C:\\Users\\username\\.swt\\lib\\win32\\x86_64\\swt.dll C:\\Users\\username\\.swt\\lib\\win32\\x86_64\\swt-win32-4965r11.dll: \u627e\u4e0d\u5230\u6307\u5b9a\u7684\u7a0b\u5e8f\u3002 at org.eclipse.swt.internal.Library.loadLibrary(Library.java:345) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254) at org.eclipse.swt.internal.C.(C.java:19) at org.eclipse.swt.internal.win32.STARTUPINFO.(STARTUPINFO.java:42) at org.eclipse.swt.widgets.Display.(Display.java:149) at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:721) at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:185) at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:182) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605) at org.eclipse.equinox.launcher.Main.run(Main.java:1481) \u662f\u56e0\u4e3a\u5728eclipse 2024.06\u7248\u672c\u4e2d\uff0c\u6709\u4f7f\u7528\u5230\u4e00\u4e9b\u7279\u6027\uff0c\u800c\u8be5\u7279\u6027\u5bf9\u64cd\u4f5c\u7cfb\u7edf\u6709\u8981\u6c42\uff0c\u53ef\u4ee5\u53c2\u8003 https://github.com/eclipse-platform/eclipse.platform.swt/issues/1252 \u5e76\u4e14\u5728eclipse\u7684\u5b98\u65b9\u6587\u6863\u4e2d\uff0c\u9488\u5bf9eclipse\u6d4b\u8bd5\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u4e5f\u505a\u4e86\u8bf4\u660e\uff0c\u5bf9\u67d0\u4e9b\u7248\u672c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0d\u518d\u505a\u517c\u5bb9\u3002\u53ef\u4ee5\u53c2\u8003 https://eclipse.dev/eclipse/development/plans/eclipse_project_plan_4_32.xml#target_environments \u800cNucleiStudio 2024.06\u662f\u57fa\u4e8eeclipse 2024.06\uff0c\u6240\u4ee5\u4e5f\u4f1a\u6709\u540c\u7c7b\u578b\u7684\u95ee\u9898\u3002 \u89e3\u51b3\u65b9\u6848 \u00b6 \u8bf7\u5728windows 10\u6216\u4ee5\u4e0a\u7684\u7248\u672c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528 NucleiStudio 2024.06\u3002 \u5982\u679c\u60f3\u5728Windows 7\u3001Windows 8\u7b49\u4f4e\u7248\u672c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528NucleiStudio\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528NucleiStudio 2024.02\u53ca\u4ee5\u4e0b\u7248\u672c\u3002","title":"UnsatisfiedLinkError of swt-win32-4965r8.dll on Windows 7"},{"location":"15-unsatisfiedLinkError_of_swt-win32-4965r8_dll_on_windows7/#unsatisfiedlinkerror-of-swt-win32-4965r8dll-on-windows-7","text":"","title":"UnsatisfiedLinkError of swt-win32-4965r8.dll on Windows 7"},{"location":"15-unsatisfiedLinkError_of_swt-win32-4965r8_dll_on_windows7/#_1","text":"\u7528\u6237\u5728Windows 7\u3001Windows 8\u4e0b\u4f7f\u7528NucleiStudio 2024.06\u65f6\uff0c\u53d1\u73b0\u542f\u52a8\u4e0d\u4e86\uff0c\u5728 NucleiStudio\\configuration \u76ee\u5f55\u7684\u65e5\u5fd7\u4e2d\u53ef\u4ee5\u770b\u5230\u4ee5\u4e0b\u62a5\u9519\u5185\u5bb9\uff1a !ENTRY org.eclipse.osgi 4 0 2024-07-16 10:41:57.010 !MESSAGE Application error !STACK 1 java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: C:\\NucleiStudio\\configuration\\org.eclipse.osgi\\492\\0\\.cp\\swt-win32-4965r11.dll: \u627e\u4e0d\u5230\u6307\u5b9a\u7684\u7a0b\u5e8f\u3002 no swt-win32 in java.library.path: C:\\NucleiStudio;C:\\Windows\\Sun\\Java\\bin;C:\\Windows\\system32;C:\\Windows;C:/NucleiStudio//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin/server;C:/NucleiStudio//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin;C:\\Java\\JCDK3.0.4_ClassicEdition\\bin;C:\\Java\\jdk1.6.0_26\\bin;C:\\Java\\jdk1.6.0_26\\lib;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files (x86)\\Microsoft SQL Server\\90\\Tools\\binn\\;D:\\Python25;C:\\NucleiStudio;;. no swt in java.library.path: C:\\NucleiStudio;C:\\Windows\\Sun\\Java\\bin;C:\\Windows\\system32;C:\\Windows;C:/NucleiStudio//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin/server;C:/NucleiStudio//plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.3.v20240426-1530/jre/bin;C:\\Java\\JCDK3.0.4_ClassicEdition\\bin;C:\\Java\\jdk1.6.0_26\\bin;C:\\Java\\jdk1.6.0_26\\lib;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files\\TortoiseSVN\\bin;C:\\Program Files (x86)\\Microsoft SQL Server\\90\\Tools\\binn\\;D:\\Python25;C:\\NucleiStudio;;. C:\\Users\\username\\.swt\\lib\\win32\\x86_64\\swt-win32-4965r11.dll: \u627e\u4e0d\u5230\u6307\u5b9a\u7684\u7a0b\u5e8f\u3002 Can't load library: C:\\Users\\username\\.swt\\lib\\win32\\x86_64\\swt-win32.dll Can't load library: C:\\Users\\username\\.swt\\lib\\win32\\x86_64\\swt.dll C:\\Users\\username\\.swt\\lib\\win32\\x86_64\\swt-win32-4965r11.dll: \u627e\u4e0d\u5230\u6307\u5b9a\u7684\u7a0b\u5e8f\u3002 at org.eclipse.swt.internal.Library.loadLibrary(Library.java:345) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254) at org.eclipse.swt.internal.C.(C.java:19) at org.eclipse.swt.internal.win32.STARTUPINFO.(STARTUPINFO.java:42) at org.eclipse.swt.widgets.Display.(Display.java:149) at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:721) at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:185) at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:182) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:668) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:605) at org.eclipse.equinox.launcher.Main.run(Main.java:1481) \u662f\u56e0\u4e3a\u5728eclipse 2024.06\u7248\u672c\u4e2d\uff0c\u6709\u4f7f\u7528\u5230\u4e00\u4e9b\u7279\u6027\uff0c\u800c\u8be5\u7279\u6027\u5bf9\u64cd\u4f5c\u7cfb\u7edf\u6709\u8981\u6c42\uff0c\u53ef\u4ee5\u53c2\u8003 https://github.com/eclipse-platform/eclipse.platform.swt/issues/1252 \u5e76\u4e14\u5728eclipse\u7684\u5b98\u65b9\u6587\u6863\u4e2d\uff0c\u9488\u5bf9eclipse\u6d4b\u8bd5\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u4e5f\u505a\u4e86\u8bf4\u660e\uff0c\u5bf9\u67d0\u4e9b\u7248\u672c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0d\u518d\u505a\u517c\u5bb9\u3002\u53ef\u4ee5\u53c2\u8003 https://eclipse.dev/eclipse/development/plans/eclipse_project_plan_4_32.xml#target_environments \u800cNucleiStudio 2024.06\u662f\u57fa\u4e8eeclipse 2024.06\uff0c\u6240\u4ee5\u4e5f\u4f1a\u6709\u540c\u7c7b\u578b\u7684\u95ee\u9898\u3002","title":"\u95ee\u9898\u8bf4\u660e"},{"location":"15-unsatisfiedLinkError_of_swt-win32-4965r8_dll_on_windows7/#_2","text":"\u8bf7\u5728windows 10\u6216\u4ee5\u4e0a\u7684\u7248\u672c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528 NucleiStudio 2024.06\u3002 \u5982\u679c\u60f3\u5728Windows 7\u3001Windows 8\u7b49\u4f4e\u7248\u672c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u4f7f\u7528NucleiStudio\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528NucleiStudio 2024.02\u53ca\u4ee5\u4e0b\u7248\u672c\u3002","title":"\u89e3\u51b3\u65b9\u6848"},{"location":"16-incomplete_data_output_when_using_profiling_function/","text":"\u4f7f\u7528 Profiling \u529f\u80fd\u65f6\u53ef\u80fd\u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898 \u00b6 \u76ee\u524d\u4f7f\u7528 Profiling \u529f\u80fd\u53ef\u80fd\u9047\u5230\u4e00\u4e9b\u95ee\u9898\uff0c\u8bb0\u5f55\u5982\u4e0b\uff1a \u95ee\u98981 \uff1a\u65e5\u5fd7\u6253\u5370\u4e2d\u62a5\u7247\u4e0a\u5185\u5b58\u4e0d\u8db3\uff0c\u6ca1\u6709\u5145\u8db3\u5185\u5b58\u6765\u5b58\u653e gprof/gcov \u6570\u636e \u95ee\u98982 \uff1a\u91c7\u7528\u4e32\u53e3\u8f93\u51fa\u7684\u65b9\u5f0f\u6536\u96c6\u6570\u636e\uff0c\u6253\u5370\u88ab\u51b2\u6389\uff0cConsole \u6216 Terminal \u6536\u96c6\u7684\u6570\u636e\u4e0d\u5168\uff0c\u5bfc\u81f4\u6570\u636e\u89e3\u6790\u5931\u8d25\uff0c\u5f39\u51fa No files have been generated \u9519\u8bef\u5f39\u6846 \u95ee\u98983 \uff1a\u5220\u6389 gmon.out \u6587\u4ef6\uff0c\u518d\u6b21\u89e3\u6790\u65f6\uff0c\u5f39\u51fa No files have been generated \u9519\u8bef\u5f39\u6846 \u95ee\u98981\uff1a\u65e5\u5fd7\u6253\u5370\u4e2d\u62a5\u7247\u4e0a\u5185\u5b58\u4e0d\u8db3\uff0c\u6ca1\u6709\u5145\u8db3\u5185\u5b58\u6765\u5b58\u653e gprof/gcov \u6570\u636e \u00b6 gprof/gcov data \u9700\u8981\u5b58\u5230\u7247\u4e0a\u5185\u5b58\u4e0a\uff0c\u5360\u7528\u5185\u5b58\u7684\u5927\u5c0f\u4e0e\u7528\u4f8b\u89c4\u6a21\u6709\u5173(\u51e0\u5341\u5230\u51e0\u767eKB\u4e0d\u7b49)\uff0c\u9700\u8981\u786e\u4fdd\u7247\u4e0a\u5185\u5b58\u8db3\u591f\u5927\u3002 \u89e3\u51b3\u65b9\u6848 \u00b6 \u9996\u5148\u9700\u8981\u786e\u8ba4\u8f6f\u4ef6\u914d\u7f6e\u7684\u5185\u5b58\u5927\u5c0f\u4e0e\u786c\u4ef6\u5b9e\u9645\u5927\u5c0f\u76f8\u5339\u914d\uff08ilm/sram/flash/ddr/\uff09\uff0c\u5426\u5219\u9700\u8981\u9002\u914d\u8f6f\u4ef6\u94fe\u63a5\u811a\u672c\u5185\u5b58\u5e03\u5c40\uff1a \u6bd4\u5982\uff0c\u5982\u679c\u662f DOWNLOAD=ilm \u6a21\u5f0f\u4e0b\u8f7d\uff0c\u53ef\u4ee5\u6309\u786c\u4ef6\u7684 ilm \u4e0e dlm \u5927\u5c0f\u9002\u914d\u3002 \u5bf9\u4e8e nuclei sdk 0.6.0 \u7248\u672c\uff0c\u4fee\u6539\u7684\u6587\u4ef6\u4e3a nuclei-sdk/SoC/evalsoc/Board/nuclei_fpga_eval/Source/GCC/gcc_evalsoc_ilm.ld INCLUDE evalsoc.memory MEMORY { ilm (rxa!w) : ORIGIN = ILM_MEMORY_BASE, LENGTH = ILM_MEMORY_SIZE ram (wxa!r) : ORIGIN = DLM_MEMORY_BASE, LENGTH = DLM_MEMORY_SIZE } \u5982\u679c DOWNLOAD=ilm \u6a21\u5f0f\u5185\u5b58\u4e0d\u8db3\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u5b58\u5927\u4e00\u70b9\u7684\u4e0b\u8f7d\u65b9\u5f0f\uff08\u5982 DOWNLOAD=ddr \uff09\u3002 \u95ee\u98982\uff1aConsole \u6216 Terminal \u6536\u96c6\u7684\u6570\u636e\u4e0d\u5168\u5bfc\u81f4\u6570\u636e\u89e3\u6790\u65f6\u5931\u8d25 \u00b6 \u5728 NucleiStudio 2024.06 \u4e2d\uff0c\u5f53\u9009\u62e9\u4f7f\u7528\u4e32\u53e3\u8f93\u51fa\u7684\u65b9\u5f0f\u4f7f\u7528 Profiling \u529f\u80fd\u65f6\uff0c\u53ef\u80fd\u4f7f\u7528 Parse and Generate Hexdump \u89e3\u6790\u6570\u636e\u65f6 \u5f39\u51fa No files have been generated \u9519\u8bef\u5f39\u6846\uff0c\u6700\u540e\u6ca1\u6709\u751f\u6210\u5bf9\u5e94\u7684 gmon.out \u6587\u4ef6\u6216\u8005 *.gcno \u6587\u4ef6\u3002\u8fd9\u53ef\u80fd\u662f\u56e0\u4e3a\u4e32\u53e3\u6570\u636e\u88ab\u51b2\u6389\uff0c\u5bfc\u81f4\u6570\u636e\u4e0d\u5b8c\u6574\u4ece\u800c\u89e3\u6790\u5931\u8d25 \u786e\u8ba4\u65b9\u6cd5\uff1a \u9700\u786e\u4fdd\u4e32\u53e3\u5f00\u59cb\u65f6\u7684\u6253\u5370\u6ca1\u6709\u88ab\u51b2\u6389\uff0c\u53c2\u8003 Nuclei Studio\u4f7f\u7528Profiling\u529f\u80fd\u8fdb\u884c\u6027\u80fd\u8c03\u4f18\u4e3e\u4f8b \u89e3\u51b3\u65b9\u6848 \u00b6 \u56e0\u4e3a\u5728Console\u6216\u8005Terminal\u4e2d\uff0c\u5bf9\u8f93\u51fa\u7684\u5185\u5bb9\u6761\u6570\u6709\u9650\u5236\uff0c\u5f53\u8f93\u51fa\u7684\u5185\u5bb9\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\u65f6\uff0c\u524d\u9762\u7684\u5185\u5bb9\u4f1a\u88ab\u51b2\u6389\uff0c\u5bfc\u81f4\u5185\u5bb9\u4e0d\u5b8c\u6574\uff0c\u8fd9\u6837\u4f1a\u89e3\u6790\u5931\u8d25\u3002 \u9700\u8981\u8c03\u8282 Console \u6216 Terminal \u8f93\u51fa\u5927\u5c0f\u9650\u5236\uff0c\u786e\u4fdd\u6570\u636e\u6ca1\u6709\u88ab\u51b2\u6389\u3002 \u5efa\u8bae\u5c06Console\u4e2d\u8f93\u51fa\u5185\u5bb9\u6761\u9650\u4fee\u6539\u4e3a\u4e0d\u53d7\u9650\u5236\u3002 Window->Preference \u8fdb\u5165\u5982\u4e0b\u754c\u9762\uff1a \u5efa\u8bae\u5c06Terminal\u4e2d\u8f93\u51fa\u5185\u5bb9\u6761\u9650\u4fee\u6539\u4e3a\u4e00\u4e2a\u8f83\u5927\u7684\u503c\u3002 Window->Preference \u8fdb\u5165\u5982\u4e0b\u754c\u9762\uff1a \u95ee\u98983\uff1a\u5220\u6389 gmon.out \u6587\u4ef6\uff0c\u518d\u6b21\u89e3\u6790\uff0c\u5f39\u51fa No files have been generated \u9519\u8bef\u5f39\u6846 \u00b6 \u624b\u52a8\u5220\u6389\u5de5\u7a0b\u6587\u4ef6\u5939\u4e0b\u7684 gmon.out \u6587\u4ef6\uff0c\u518d\u6b21\u89e3\u6790\u65f6\u51fa\u73b0 No files have been generated \u7684\u9519\u8bef\u5f39\u6846 \u89e3\u51b3\u65b9\u6848 \u00b6 \u624b\u52a8\u5220\u6389 gmon.out \u6587\u4ef6\u540e\uff0c\u9700\u8981\u624b\u52a8\u5237\u65b0\u4e00\u4e0b\u5de5\u7a0b\u3002","title":"\u4f7f\u7528 Profiling \u529f\u80fd\u65f6\u53ef\u80fd\u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898"},{"location":"16-incomplete_data_output_when_using_profiling_function/#profiling","text":"\u76ee\u524d\u4f7f\u7528 Profiling \u529f\u80fd\u53ef\u80fd\u9047\u5230\u4e00\u4e9b\u95ee\u9898\uff0c\u8bb0\u5f55\u5982\u4e0b\uff1a \u95ee\u98981 \uff1a\u65e5\u5fd7\u6253\u5370\u4e2d\u62a5\u7247\u4e0a\u5185\u5b58\u4e0d\u8db3\uff0c\u6ca1\u6709\u5145\u8db3\u5185\u5b58\u6765\u5b58\u653e gprof/gcov \u6570\u636e \u95ee\u98982 \uff1a\u91c7\u7528\u4e32\u53e3\u8f93\u51fa\u7684\u65b9\u5f0f\u6536\u96c6\u6570\u636e\uff0c\u6253\u5370\u88ab\u51b2\u6389\uff0cConsole \u6216 Terminal \u6536\u96c6\u7684\u6570\u636e\u4e0d\u5168\uff0c\u5bfc\u81f4\u6570\u636e\u89e3\u6790\u5931\u8d25\uff0c\u5f39\u51fa No files have been generated \u9519\u8bef\u5f39\u6846 \u95ee\u98983 \uff1a\u5220\u6389 gmon.out \u6587\u4ef6\uff0c\u518d\u6b21\u89e3\u6790\u65f6\uff0c\u5f39\u51fa No files have been generated \u9519\u8bef\u5f39\u6846","title":"\u4f7f\u7528 Profiling \u529f\u80fd\u65f6\u53ef\u80fd\u9047\u5230\u7684\u4e00\u4e9b\u95ee\u9898"},{"location":"16-incomplete_data_output_when_using_profiling_function/#1-gprofgcov","text":"gprof/gcov data \u9700\u8981\u5b58\u5230\u7247\u4e0a\u5185\u5b58\u4e0a\uff0c\u5360\u7528\u5185\u5b58\u7684\u5927\u5c0f\u4e0e\u7528\u4f8b\u89c4\u6a21\u6709\u5173(\u51e0\u5341\u5230\u51e0\u767eKB\u4e0d\u7b49)\uff0c\u9700\u8981\u786e\u4fdd\u7247\u4e0a\u5185\u5b58\u8db3\u591f\u5927\u3002","title":"\u95ee\u98981\uff1a\u65e5\u5fd7\u6253\u5370\u4e2d\u62a5\u7247\u4e0a\u5185\u5b58\u4e0d\u8db3\uff0c\u6ca1\u6709\u5145\u8db3\u5185\u5b58\u6765\u5b58\u653e gprof/gcov \u6570\u636e"},{"location":"16-incomplete_data_output_when_using_profiling_function/#_1","text":"\u9996\u5148\u9700\u8981\u786e\u8ba4\u8f6f\u4ef6\u914d\u7f6e\u7684\u5185\u5b58\u5927\u5c0f\u4e0e\u786c\u4ef6\u5b9e\u9645\u5927\u5c0f\u76f8\u5339\u914d\uff08ilm/sram/flash/ddr/\uff09\uff0c\u5426\u5219\u9700\u8981\u9002\u914d\u8f6f\u4ef6\u94fe\u63a5\u811a\u672c\u5185\u5b58\u5e03\u5c40\uff1a \u6bd4\u5982\uff0c\u5982\u679c\u662f DOWNLOAD=ilm \u6a21\u5f0f\u4e0b\u8f7d\uff0c\u53ef\u4ee5\u6309\u786c\u4ef6\u7684 ilm \u4e0e dlm \u5927\u5c0f\u9002\u914d\u3002 \u5bf9\u4e8e nuclei sdk 0.6.0 \u7248\u672c\uff0c\u4fee\u6539\u7684\u6587\u4ef6\u4e3a nuclei-sdk/SoC/evalsoc/Board/nuclei_fpga_eval/Source/GCC/gcc_evalsoc_ilm.ld INCLUDE evalsoc.memory MEMORY { ilm (rxa!w) : ORIGIN = ILM_MEMORY_BASE, LENGTH = ILM_MEMORY_SIZE ram (wxa!r) : ORIGIN = DLM_MEMORY_BASE, LENGTH = DLM_MEMORY_SIZE } \u5982\u679c DOWNLOAD=ilm \u6a21\u5f0f\u5185\u5b58\u4e0d\u8db3\uff0c\u53ef\u4ee5\u4f7f\u7528\u5185\u5b58\u5927\u4e00\u70b9\u7684\u4e0b\u8f7d\u65b9\u5f0f\uff08\u5982 DOWNLOAD=ddr \uff09\u3002","title":"\u89e3\u51b3\u65b9\u6848"},{"location":"16-incomplete_data_output_when_using_profiling_function/#2console-terminal","text":"\u5728 NucleiStudio 2024.06 \u4e2d\uff0c\u5f53\u9009\u62e9\u4f7f\u7528\u4e32\u53e3\u8f93\u51fa\u7684\u65b9\u5f0f\u4f7f\u7528 Profiling \u529f\u80fd\u65f6\uff0c\u53ef\u80fd\u4f7f\u7528 Parse and Generate Hexdump \u89e3\u6790\u6570\u636e\u65f6 \u5f39\u51fa No files have been generated \u9519\u8bef\u5f39\u6846\uff0c\u6700\u540e\u6ca1\u6709\u751f\u6210\u5bf9\u5e94\u7684 gmon.out \u6587\u4ef6\u6216\u8005 *.gcno \u6587\u4ef6\u3002\u8fd9\u53ef\u80fd\u662f\u56e0\u4e3a\u4e32\u53e3\u6570\u636e\u88ab\u51b2\u6389\uff0c\u5bfc\u81f4\u6570\u636e\u4e0d\u5b8c\u6574\u4ece\u800c\u89e3\u6790\u5931\u8d25 \u786e\u8ba4\u65b9\u6cd5\uff1a \u9700\u786e\u4fdd\u4e32\u53e3\u5f00\u59cb\u65f6\u7684\u6253\u5370\u6ca1\u6709\u88ab\u51b2\u6389\uff0c\u53c2\u8003 Nuclei Studio\u4f7f\u7528Profiling\u529f\u80fd\u8fdb\u884c\u6027\u80fd\u8c03\u4f18\u4e3e\u4f8b","title":"\u95ee\u98982\uff1aConsole \u6216 Terminal \u6536\u96c6\u7684\u6570\u636e\u4e0d\u5168\u5bfc\u81f4\u6570\u636e\u89e3\u6790\u65f6\u5931\u8d25"},{"location":"16-incomplete_data_output_when_using_profiling_function/#_2","text":"\u56e0\u4e3a\u5728Console\u6216\u8005Terminal\u4e2d\uff0c\u5bf9\u8f93\u51fa\u7684\u5185\u5bb9\u6761\u6570\u6709\u9650\u5236\uff0c\u5f53\u8f93\u51fa\u7684\u5185\u5bb9\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\u65f6\uff0c\u524d\u9762\u7684\u5185\u5bb9\u4f1a\u88ab\u51b2\u6389\uff0c\u5bfc\u81f4\u5185\u5bb9\u4e0d\u5b8c\u6574\uff0c\u8fd9\u6837\u4f1a\u89e3\u6790\u5931\u8d25\u3002 \u9700\u8981\u8c03\u8282 Console \u6216 Terminal \u8f93\u51fa\u5927\u5c0f\u9650\u5236\uff0c\u786e\u4fdd\u6570\u636e\u6ca1\u6709\u88ab\u51b2\u6389\u3002 \u5efa\u8bae\u5c06Console\u4e2d\u8f93\u51fa\u5185\u5bb9\u6761\u9650\u4fee\u6539\u4e3a\u4e0d\u53d7\u9650\u5236\u3002 Window->Preference \u8fdb\u5165\u5982\u4e0b\u754c\u9762\uff1a \u5efa\u8bae\u5c06Terminal\u4e2d\u8f93\u51fa\u5185\u5bb9\u6761\u9650\u4fee\u6539\u4e3a\u4e00\u4e2a\u8f83\u5927\u7684\u503c\u3002 Window->Preference \u8fdb\u5165\u5982\u4e0b\u754c\u9762\uff1a","title":"\u89e3\u51b3\u65b9\u6848"},{"location":"16-incomplete_data_output_when_using_profiling_function/#3-gmonout-no-files-have-been-generated","text":"\u624b\u52a8\u5220\u6389\u5de5\u7a0b\u6587\u4ef6\u5939\u4e0b\u7684 gmon.out \u6587\u4ef6\uff0c\u518d\u6b21\u89e3\u6790\u65f6\u51fa\u73b0 No files have been generated \u7684\u9519\u8bef\u5f39\u6846","title":"\u95ee\u98983\uff1a\u5220\u6389 gmon.out \u6587\u4ef6\uff0c\u518d\u6b21\u89e3\u6790\uff0c\u5f39\u51fa No files have been generated \u9519\u8bef\u5f39\u6846"},{"location":"16-incomplete_data_output_when_using_profiling_function/#_3","text":"\u624b\u52a8\u5220\u6389 gmon.out \u6587\u4ef6\u540e\uff0c\u9700\u8981\u624b\u52a8\u5237\u65b0\u4e00\u4e0b\u5de5\u7a0b\u3002","title":"\u89e3\u51b3\u65b9\u6848"},{"location":"17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage/","text":"Nuclei Studio\u4f7f\u7528Profiling\u529f\u80fd\u8fdb\u884c\u6027\u80fd\u8c03\u4f18\u4e3e\u4f8b \u00b6 \u6587\u6863\u662f\u57fa\u4e8e Nuclei Studio \u7684 2024.06 Windows \u7248\u672c\u5b9e\u6d4b\u3002 \u95ee\u9898\u8bf4\u660e \u00b6 Nuclei Studio 2024.06 \u63d0\u4f9b Profiling \u529f\u80fd\u3001Call Graph \u529f\u80fd \u4ee5\u53ca Code coverage \u529f\u80fd\uff0c\u65b9\u4fbf\u7528\u6237\u4f7f\u7528\u3002 \u7b80\u5355\u63cf\u8ff0\u5982\u4e0b\uff1a Profiling \u529f\u80fd \uff1a\u57fa\u4e8e binutils gprof \u5de5\u5177\uff0c\u53ef\u7528\u4e8e\u5206\u6790\u51fd\u6570\u8c03\u7528\u5173\u7cfb\u3001\u8c03\u7528\u6b21\u6570\u3001\u4ee5\u53ca\u8fd0\u884c\u65f6\u95f4\uff1b\u901a\u8fc7 Profiling \u6293\u53d6\u70ed\u70b9\u51fd\u6570\u53ef\u4ee5\u7528\u6765\u5206\u6790\u7a0b\u5e8f\u7684\u74f6\u9888\uff0c\u4ee5\u4fbf\u8fdb\u884c\u6027\u80fd\u4f18\u5316\u3002 Call Graph \u529f\u80fd \uff1a\u57fa\u4e8e Profiling \u529f\u80fd\uff0c\u5c06\u51fd\u6570\u8c03\u7528\u5173\u7cfb\u3001\u8c03\u7528\u6b21\u6570\u3001\u4ee5\u53ca\u8fd0\u884c\u65f6\u95f4\u7528\u56fe\u5c55\u793a\u51fa\u6765\uff0c\u65b9\u4fbf\u5f00\u53d1\u4eba\u5458\u5206\u6790\u3002 Code coverage \u529f\u80fd \uff1a\u57fa\u4e8e gcc \u7f16\u8bd1\u5668\u63d0\u4f9b gcov \u5de5\u5177\uff0c\u53ef\u7528\u6765\u67e5\u770b\u6e90\u7801\u6587\u4ef6\u7684\u4ee3\u7801\u8986\u76d6\u7387\uff0c\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u786e\u5b9a\u6d4b\u8bd5\u7528\u4f8b\u662f\u5426\u8db3\u591f\u5145\u5206\uff0c\u662f\u5426\u8986\u76d6\u4e86\u88ab\u6d4b\u4ee3\u7801\u7684\u6240\u6709\u5206\u652f\u548c\u8def\u5f84\u3002 \u5728 NucleiStudio_User_Guide.pdf \u76f8\u5173\u7ae0\u8282\u5bf9\u8fd9\u51e0\u4e2a\u529f\u80fd\u5df2\u7ecf\u6709\u8f83\u8be6\u7ec6\u7684\u63cf\u8ff0\uff0c\u8fd9\u7bc7\u6587\u6863\u4ee5\u4e00\u4e2a\u4f8b\u5b50\u6765\u5c55\u793a\u5b83\u4eec\u7684\u5b9e\u9645\u5e94\u7528\u3002 \u89e3\u51b3\u65b9\u6848 \u00b6 1 \u73af\u5883\u51c6\u5907 \u00b6 \u6240\u9700\u6750\u6599\uff1a Nuclei Studio\uff1a NucleiStudio 2024.06 \uff0c\u4ee5 Windows \u7248\u672c\u4e3a\u4f8b \u7528\u4f8b\uff1a \u4ee5 AMR-WB-enc \u5373\u81ea\u9002\u5e94\u591a\u901f\u7387\u5bbd\u5e26\u7f16\u7801\u97f3\u9891\u7b97\u6cd5\u4e3a\u4f8b\uff0c\u7528\u6237\u53ef\u4ee5\u79fb\u690d\u81ea\u5df1\u7684\u7528\u4f8b \u57fa\u4e8e nuclei-sdk v0.6.0 \u79fb\u690d amrwbenc \u88f8\u673a\u7528\u4f8b\uff1a \u6253\u5f00 Nuclei Studio \u5efa\u7acb amrwbenc \u5de5\u7a0b\uff0c\u7136\u540e\u79fb\u690d amrwbenc \u6e90\u7801\uff0c\u6700\u7ec8\u7528\u4f8b\u53ef\u6b63\u5e38\u8fd0\u884c\u3002\u7528\u6237\u53ef\u4ee5\u79fb\u690d\u81ea\u5df1\u7684\u7528\u4f8b\uff0c\u4e0d\u540c\u7528\u4f8b\u79fb\u690d\u7684\u7ec6\u8282\u5404\u4e0d\u76f8\u540c\uff0c\u8fd9\u4e00\u6b65\u4e0d\u662f\u8fd9\u7bc7\u6587\u6863\u7684\u91cd\u70b9\uff0c\u7565\u8fc7\u3002 2 Profiling \u529f\u80fd \u00b6 Nuclei studio \u4e2d Profiling \u529f\u80fd\u57fa\u4e8e binutils gprof \u5de5\u5177\u3002\u7f16\u8bd1\u65f6\u9700\u5e26\u7279\u5b9a\u7684\u7f16\u8bd1\u9009\u9879 -pg \u6765\u7f16\u8bd1\u6307\u5b9a\u6e90\u7801\u6587\u4ef6\uff0c\u7f16\u8bd1\u6210\u529f\u540e\u5f97\u5230 ELF \u6587\u4ef6\uff0c \u7136\u540e\u5728\u5b9e\u9645\u5f00\u53d1\u677f\u4e0a\u8fd0\u884c\u5e76\u6536\u96c6\u9700\u8981\u7684 gmon.out \u6587\u4ef6\uff0c\u6700\u7ec8\u5728 IDE \u4e0a\u4ee5\u56fe\u5f62\u5316\u7684\u65b9\u5f0f\u5c55\u793a\u3002\u6240\u4ee5\u8fd8\u9700\u8981\u5728\u7528\u4f8b\u672b\u5c3e\u6dfb\u52a0 gprof \u6570\u636e\u6536\u96c6\u4ee3\u7801\uff0c\u6709\u4e24\u79cd\u65b9\u5f0f\uff1a \u65b9\u5f0f1\uff1a\u79fb\u690d gprof \u6570\u636e\u6536\u96c6\u4ee3\u7801\u5230\u81ea\u5df1\u7684\u5de5\u7a0b\u4e2d\uff0c\u4ee3\u7801\u53ef\u4ee5\u53c2\u8003 Profiling README \u65b9\u5f0f2\uff1a\u57fa\u4e8e Nuclei Studio \u4e2d\u7684 Profiling demo \u8fdb\u884c\u6539\u9020\uff0c\u5373\u7528\u81ea\u5df1\u7684\u7528\u4f8b\u66ff\u6362\u6389 Profiling demo \u5de5\u7a0b\u7684\u7684\u7528\u4f8b\u90e8\u5206 \u4e0b\u9762\u793a\u4f8b\u91c7\u7528\u540e\u4e00\u79cd\u65b9\u6cd5\u8fdb\u884c\u6f14\u793a\uff1a step1\uff1a\u65b0\u5efa Profiling demo \u5de5\u7a0b File->New->New Nuclei RISC-V C/C++ Project \uff0c\u9009\u62e9 Nuclei FPGA Evalution Board->sdk-nuclei_sdk @0.6.0 \u6ce8\u610f\uff1a Nuclei SDK \u9700\u9009\u62e9 0.6.0 \u53ca\u4ee5\u540e\u7248\u672c\u624d\u652f\u6301 Profiling \u4e0e Code coverage \u529f\u80fd step2\uff1a\u57fa\u4e8e Profiling demo \u5de5\u7a0b\u79fb\u690d amrwbenc \u88f8\u673a\u7528\u4f8b \u5220\u6389 Profiling demo \u5de5\u7a0b\u4e2d application \u4e2d\u7684\u539f\u59cb\u7528\u4f8b\uff0c\u66ff\u6362\u6210 amrwbenc \u7528\u4f8b\uff0c\u5f62\u6210\u5982\u4e0b\u76ee\u5f55\u7ed3\u6784\uff0c\u5e76\u786e\u4fdd\u80fd\u7f16\u8bd1\u6210\u529f\u3002 \u8fd9\u91cc\u63d0\u4f9b\u672c\u793a\u4f8b\u4f7f\u7528\u7684\u5de5\u7a0b\uff0c\u6709\u5174\u8da3\u53ef\u4ee5\u4e0b\u8f7d\u4f7f\u7528\uff1a \u4f18\u5316\u524d\u7684\u5de5\u7a0b\u4e0b\u8f7d\u94fe\u63a5 \u4e0b\u8f7d zip \u5305\u540e\uff0c\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165\u5230 Nuclei Studio \u4e2d\u8fd0\u884c(\u5bfc\u5165\u6b65\u9aa4\uff1a File->Import->Existing Projects into Workspace->Next->Select archive file->\u9009\u62e9zip\u538b\u7f29\u5305->next \u5373\u53ef) step3\uff1a\u5728\u7528\u4f8b\u7ed3\u5c3e\u5904\u6dfb\u52a0 grof \u6570\u636e\u6536\u96c6\u4ee3\u7801\uff0c\u5e76\u6dfb\u52a0 -pg \u7f16\u8bd1\u9009\u9879\uff0c\u91cd\u65b0\u7f16\u8bd1\u4ee3\u7801 \u5728 main \u51fd\u6570\u7684\u7ed3\u5c3e\u5904\u6dfb\u52a0 gprof \u6570\u636e\u6536\u96c6\u4ee3\u7801\uff1a int main(int argc, char *argv[]) { /* * \u4ee3\u7801\u7701\u7565 */ /* * \u5728main\u51fd\u6570\u7684\u7ed3\u5c3e\u5904\u6dfb\u52a0gprof\u6570\u636e\u6536\u96c6\u4ee3\u7801 */ // TODO this is used for collect gprof and gcov data // See Components/profiling/README.md about how to set the IDE project properities extern long gprof_collect(unsigned long interface); gprof_collect(2); return 0; } \u6536\u96c6 gprof data \u6709\u4e09\u79cd\u65b9\u5f0f\uff0c\u901a\u8fc7\u5165\u53c2\u4e0d\u540c\u8fdb\u884c\u533a\u5206\uff1a gprof_collect(0)\uff1a\u5728\u7f13\u51b2\u533a\u4e2d\u6536\u96c6 gprof \u6216 gcov \u6570\u636e\uff0c\u5728\u8c03\u8bd5\u7a0b\u5e8f\u65f6\u53ef\u4ee5\u4f7f\u7528 GDB \u811a\u672c\u8f6c\u50a8 gcov \u6216 gprof \u4e8c\u8fdb\u5236\u6587\u4ef6 gprof_collect(1)\uff1a\u4f7f\u7528 semihost \u76f4\u63a5\u5c06 gprof \u6216 gcov \u6570\u636e\u5199\u5165\u6587\u4ef6\u4e2d gprof_collect(2)\uff1a\u76f4\u63a5\u5728 Console \u6216 Serial Terminal \u4e2d\u6253\u5370 gcov \u6216 gprof \u6570\u636e\uff0c\u7136\u540e\u53ef\u4ee5\u901a\u8fc7IDE\u4e2d Parse and Generate HexDump \u529f\u80fd\u8fdb\u884c\u89e3\u6790\u6570\u636e\u5e76\u4fdd\u5b58\u5230PC\u4e0a \u8be6\u60c5\u53ef\u53c2\u8003 Profiling README \uff0c\u8fd9\u91cc\u4ee5\u5c06 gprof data \u6253\u5370\u5230\u4e32\u53e3\uff08Console \u6216 Serial Terminal\uff09\u4e3a\u4f8b\u3002 \u5bf9\u9700\u8981\u8fdb\u884cprofiling\u7684\u4ee3\u7801\u6dfb\u52a0 -pg \u7f16\u8bd1\u9009\u9879\uff0c\u91cd\u65b0\u7f16\u8bd1\u4ee3\u7801\uff1a \u6ce8\u610f\uff1a \u9009\u62e9 application, \u5bf9\u5173\u952e\u4ee3\u7801\u6dfb\u52a0 -pg \u7f16\u8bd1\u9009\u9879\uff0c\u8fd9\u4e2a\u7528\u4f8b\u53ea\u6709 C \u4ee3\u7801\uff0c\u53ea\u5bf9 C \u4ee3\u7801\u6dfb\u52a0 -pg \u7f16\u8bd1\u9009\u9879\u5373\u53ef step4\uff1a\u8fd0\u884c\u7a0b\u5e8f \u6709\u51e0\u79cd\u65b9\u5f0f\u53ef\u4ee5\u8fd0\u884c\u7a0b\u5e8f\uff1a qemu \u6a21\u62df\u5668\uff08\u4e0d\u9700\u8981\u786c\u4ef6\uff0c\u7b80\u5355\u8dd1\u4e00\u4e0b\u6d41\u7a0b\uff0c\u6d4b\u8bd5\u7ed3\u679c\u4e0d\u51c6\u786e\uff09 \u4e0a\u677f\u6d4b\u8bd5 \uff08\u57fa\u4e8e\u5b9a\u65f6\u5668\u91c7\u96c6\u6570\u636e\uff09 \u57fa\u4e8e xl_cpumodel (Nuclei Near Cycle Model)\uff0c\u53c2\u8003: \u901a\u8fc7Profiling\u5c55\u793aNuclei Model NICE/VNICE\u6307\u4ee4\u52a0\u901f \u8fd9\u4e00\u7bc7\u6587\u7ae0\u53ea\u4ecb\u7ecd qemu \u4eff\u771f\u4e0e\u4e0a\u677f\u6d4b\u8bd5\u4e24\u79cd\u65b9\u5f0f\uff0cqemu \u6536\u96c6\u7684\u6570\u636e\u6253\u5370\u5230 Console \u53e3\uff0c\u4e0a\u677f\u5b9e\u9645\u8fd0\u884c\u8f93\u51fa\u5230 Nuclei Studio \u7684 Serial Terminal \u53e3\u3002 step5\uff1a\u89e3\u6790 gprof \u6570\u636e \u5f00\u59cb\u89e3\u6790 gprof \u6570\u636e\u3002 \u6ce8\u610f\uff1a \u8fd9\u4e00\u6b65\u53ef\u80fd\u9047\u5230\u4e00\u4e9b\u95ee\u9898\uff0c\u89e3\u51b3\u65b9\u6cd5\u53ef\u53c2\u8003 Profiling\u4e0e Code coverage \u529f\u80fd\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898 \u5728 qemu \u4e0a\u6d4b\u8bd5, log \u6253\u5370\u5230 Console \u53e3 \u6ce8\u610f : qemu \u4ec5\u7528\u6765\u6a21\u62df\u5c55\u793a\uff0c\u5982\u679c\u5e0c\u671b\u5f97\u5230\u51c6\u786e\u7684\u70ed\u70b9\u51fd\u6570\uff0c\u9700\u8981\u4e0a\u677f\u6d4b\u8bd5\u3002 \u89e3\u6790\u5b8c\u6210\u540e\uff0c\u4f1a\u5728\u5f53\u524d\u5de5\u7a0b\u76ee\u5f55\u4e0b\u751f\u6210 gmon.out\uff0c\u53cc\u51fb\u6253\u5f00\u5c55\u793a\uff1a \u4e0a\u677f\u6d4b\u8bd5 \u4e0a\u677f\u6d4b\u8bd5\u7684\u6b65\u9aa4\u4e0e qemu \u7c7b\u4f3c\uff0c\u552f\u4e00\u4e0d\u540c\u7684\u662f gprof \u6570\u636e\u8f93\u51fa\u5230 Serial Terminal \u4e0a\u3002 \u914d\u7f6e Serial Terminal: \u6ce8\u610f :\u5982\u679c\u4e32\u53e3\u5de5\u5177\u5df2\u7ecf\u6253\u5f00\uff0c\u786e\u4fdd\u6bcf\u6b21\u8fd0\u884c gprof \u524d\uff0c\u6e05\u9664\u6389\u4e32\u53e3\u6253\u5370\uff08\u9f20\u6807\u53f3\u952e-> Clear Terminal\uff09\uff0c\u907f\u514d\u5bf9\u6570\u636e\u89e3\u6790\u4ea7\u751f\u5f71\u54cd\u3002 \u540c\u6837, \u5168\u9009 log\uff0c\u53f3\u952e\u9009\u62e9 Parse and Generate HexDump \u529f\u80fd\uff0c\u5c31\u4f1a\u5728\u5de5\u7a0b\u6587\u4ef6\u5939\u4e0b\u751f\u6210 gmon.out \u6587\u4ef6\uff0c \u5237\u65b0\u5de5\u7a0b\u540e\uff0c\u5c31\u53ef\u4ee5\u53cc\u51fb\u6253\u5f00\u8fd9\u4e2agmon.out \u6587\u4ef6\u3002 \u5982\u4e0b\u56fe\u662f\u5728 \u677f\u5b50\u4e0a\u5b9e\u9645\u8fd0\u884c \u5f97\u5230\u7684 gprof \u6570\u636e\uff1a \u4ece\u800c\u5f97\u5230 TOP5 \u70ed\u70b9\u51fd\u6570\u4e3a\uff08\u5b9e\u9645\u4e0a\u677f\u6d4b\u8bd5\uff09\uff1a cor_h_vec_012 ACELP_4t64_fx voAWB_Residu voAWB_Convolve voAWB_Syn_filt \u83b7\u5f97\u70ed\u70b9\u51fd\u6570\u540e\uff0c\u53ef\u4ee5\u4ece\u70ed\u70b9\u51fd\u6570\u5165\u624b\u5f00\u59cb\u4f18\u5316\uff0c\u4f18\u5316 TOP \u51fd\u6570\u5f80\u5f80\u53ef\u4ee5\u4e8b\u534a\u529f\u500d\u3002 step6\uff1a\u4f18\u5316\u70ed\u70b9\u51fd\u6570 \u6709\u5982\u4e0b\u51e0\u79cd\u65b9\u6cd5\u4f18\u5316\u70ed\u70b9\u51fd\u6570\uff1a \u8c03\u8282\u7f16\u8bd1\u5668\u53c2\u6570\uff0c\u9488\u5bf9\u6574\u4e2a\u5de5\u7a0b\u6216\u5355\u72ec\u7b97\u5b50\u4f7f\u7528 O2/O3/Ofast \u7b49\u4f18\u5316\u7b49\u7ea7\uff0c\u5f00\u542f -finline-functions -funroll-all-loops \u7b49\u4f18\u5316\u9009\u9879 \u9488\u5bf9\u7b97\u6cd5\u8fdb\u884c\u4f18\u5316\uff0c\u4f7f\u7528\u66f4\u597d\u7684\u7b97\u6cd5\u5b9e\u73b0\u70ed\u70b9\u51fd\u6570 \u4f7f\u7528 RISC-V \u6269\u5c55\u6307\u4ee4\uff08 RVP/RVV \u6269\u5c55\u7b49\uff09\u4f18\u5316 \u8fd9\u91cc\u4ee5 RVP \u6269\u5c55\u4e3a\u4f8b\uff0c\u6309\u7167\u70ed\u70b9\u51fd\u6570\u4ece\u9ad8\u5230\u4f4e\uff0c\u7528 RVP \u6269\u5c55\u6765\u4f18\u5316\u3002\u9700\u8981\u786e\u5b9a\u6240\u7528\u786c\u4ef6\u652f\u6301 RVP \u6269\u5c55\u3002 \u4e3e\u4f8b\u5982\u4e0b\uff1a TOP1 \u70ed\u70b9\u51fd\u6570\u4e3a cor_h_vec_012 \uff0c\u5206\u6790\u51fd\u6570\uff0c\u5c1d\u8bd5\u4f7f\u7528 RVP \u6269\u5c55\u4f18\u5316\uff1a \u5982\u4e0b\u4ee5 #if defined __riscv_xxldspn3x \u9694\u5f00\u7684\u4ee3\u7801\u8868\u793a\u4f7f\u7528 Nuclei N3 P \u6269\u5c55\u6307\u4ee4\u4f18\u5316\u7684\u4ee3\u7801\u3002 \u5176\u4e2d __RV_DSMALDA \u662f\u4e00\u6761 Nuclei N3 P\u6269\u5c55\u6307\u4ee4\uff0c\u5b9e\u73b0\u4e86 \u4e00\u6b21\u5b8c\u6210 4 \u7b14 int16 \u76f8\u4e58\uff0c\u6700\u540e\u7d2f\u52a0\uff0c\u7ed3\u679c\u5b58\u653e\u5230 int64 \u53d8\u91cf\u4e2d\u3002 \u8fd9\u4e9b\u6307\u4ee4Intrinsic API\u53ef\u53c2\u8003 Nuclei P \u6269\u5c55\u6307\u4ee4Intrinsic API \u5177\u4f53\u7684RVP\u6307\u4ee4\u624b\u518c\uff0c\u8bf7\u8054\u7cfb\u82af\u6765\u79d1\u6280\u83b7\u53d6\u3002 \u4f18\u5316\u540e\u7684\u5de5\u7a0b\u5982\u4e0b\uff0c\u53ef\u4ee5\u4e0e\u4f18\u5316\u4e4b\u524d\u7684\u5de5\u7a0b\u505a\u5bf9\u6bd4\uff0c\u53ea\u4f18\u5316\u4e86 cor_h_vec_012 \u7b97\u5b50: \u4f18\u5316\u540e\u7684\u5de5\u7a0b\u4e0b\u8f7d\u94fe\u63a5 \u4f7f\u7528 Nuclei N3 P \u6269\u5c55\u6307\u4ee4\u4f18\u5316\u7684\u4ee3\u7801\u7247\u6bb5\u5982\u4e0b\uff1a void cor_h_vec_012( Word16 h[], /* (i) scaled impulse response */ Word16 vec[], /* (i) scaled vector (/8) to correlate with h[] */ Word16 track, /* (i) track to use */ Word16 sign[], /* (i) sign vector */ Word16 rrixix[][NB_POS], /* (i) correlation of h[x] with h[x] */ Word16 cor_1[], /* (o) result of correlation (NB_POS elements) */ Word16 cor_2[] /* (o) result of correlation (NB_POS elements) */ ) { Word32 i, j, pos, corr; Word16 *p0, *p1, *p2,*p3,*cor_x,*cor_y; Word32 L_sum1,L_sum2; cor_x = cor_1; cor_y = cor_2; p0 = rrixix[track]; p3 = rrixix[track+1]; pos = track; for (i = 0; i < NB_POS; i+=2) { p1 = h; p2 = &vec[pos]; #if defined __riscv_xxldspn3x Word32 tmp1, tmp2; int64_t sum64_1, sum64_2; int64_t p64_1, p64_2; sum64_1 = 0; sum64_2 = 0; for (j=62-pos ;(j - 4) >= 0; j -= 4) { p64_1 = *__SIMD64(p1)++; tmp1 = __RV_PKBB16(*(p2 + 1), *p2); tmp2 = __RV_PKBB16(*(p2 + 3), *(p2 + 2)); p64_2 = __RV_DPACK32(tmp2, tmp1); sum64_1 = __RV_DSMALDA(sum64_1, p64_1, p64_2); tmp1 = __RV_PKBB16(*(p2 + 2), *(p2 + 1)); tmp2 = __RV_PKBB16(*(p2 + 4), *(p2 + 3)); p64_2 = __RV_DPACK32(tmp2, tmp1); sum64_2 = __RV_DSMALDA(sum64_2, p64_1, p64_2); p2 += 4; } L_sum1 = (Word32)sum64_1; L_sum2 = (Word32)sum64_2; for ( ;j >= 0; j--) { L_sum1 += *p1 * *p2++; L_sum2 += *p1++ * *p2; } #endif L_sum1 += *p1 * *p2; L_sum1 = (L_sum1 << 2); L_sum2 = (L_sum2 << 2); corr = (L_sum1 + 0x8000) >> 16; cor_x[i] = vo_mult(corr, sign[pos]) + (*p0++); corr = (L_sum2 + 0x8000) >> 16; cor_y[i] = vo_mult(corr, sign[pos + 1]) + (*p3++); pos += STEP; p1 = h; p2 = &vec[pos]; #if defined __riscv_xxldspn3x sum64_1 = 0; sum64_2 = 0; for (j=62-pos ;(j - 4) >= 0; j -= 4) { p64_1 = *__SIMD64(p1)++; tmp1 = __RV_PKBB16(*(p2 + 1), *p2); tmp2 = __RV_PKBB16(*(p2 + 3), *(p2 + 2)); p64_2 = __RV_DPACK32(tmp2, tmp1); sum64_1 = __RV_DSMALDA(sum64_1, p64_1, p64_2); tmp1 = __RV_PKBB16(*(p2 + 2), *(p2 + 1)); tmp2 = __RV_PKBB16(*(p2 + 4), *(p2 + 3)); p64_2 = __RV_DPACK32(tmp2, tmp1); sum64_2 = __RV_DSMALDA(sum64_2, p64_1, p64_2); p2 += 4; } L_sum1 = (Word32)sum64_1; L_sum2 = (Word32)sum64_2; for ( ;j >= 0; j--) { L_sum1 += *p1 * *p2++; L_sum2 += *p1++ * *p2; } #endif L_sum1 += *p1 * *p2; L_sum1 = (L_sum1 << 2); L_sum2 = (L_sum2 << 2); corr = (L_sum1 + 0x8000) >> 16; cor_x[i+1] = vo_mult(corr, sign[pos]) + (*p0++); corr = (L_sum2 + 0x8000) >> 16; cor_y[i+1] = vo_mult(corr, sign[pos + 1]) + (*p3++); pos += STEP; } return; } \u8fd9\u4e2a\u7b97\u5b50\u8fdb\u884c P \u6269\u5c55\u4f18\u5316\u540e\uff0c \u7f16\u8bd1\u65f6\u52a1\u5fc5\u5e26\u4e0a dsp \u6269\u5c55\u9009\u9879\u8fdb\u884c\u7f16\u8bd1\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a CLean Project \u5e76\u91cd\u65b0\u7f16\u8bd1\uff0c\u91cd\u65b0\u8dd1\u4e00\u6b21profiling\uff0c\u53ef\u4ee5\u770b\u5230\u4f18\u5316\u6548\u679c\uff0c cor_h_vec_012 \u51fd\u6570\u5360\u7528\u7387\u6709\u6240\u4e0b\u964d\uff0c\u51fd\u6570\u8c03\u7528\u65f6\u95f4\u4e5f\u6709\u6240\u51cf\u5c11\u3002 \u6ce8\u610f\uff1a \u4e0a\u8ff0\u4ec5\u63d0\u4f9b\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u7528\u6237\u53ef\u4ee5\u4f9d\u6b21\u5bf9\u70ed\u70b9\u51fd\u6570\u8fdb\u884c\u5206\u6790\u5e76\u4f18\u5316\uff0c\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u7531\u4e8e\u91c7\u6837\u7b49\u539f\u56e0\uff0c \u5bfc\u81f4 TOP \u51fd\u6570\u5206\u5e03\u6709\u6240\u6ce2\u52a8\uff0c\u8fd9\u662f\u6b63\u5e38\u7684\uff0c\u6700\u7ec8\u7cbe\u786e\u7684\u5206\u6790\u9700\u8981\u7edf\u8ba1\u6700\u7ec8\u7684\u603b cycle \u6570\uff0c\u7136\u540e\u8ba1\u7b97\u63d0\u5347\u6bd4\u3002 2 Call Graph \u529f\u80fd \u00b6 Nuclei Studio \u4e2d Call Graph \u4e3b\u8981\u662f\u901a\u8fc7\u5206\u6790 Profiling \u7684\u6570\u636e\u6765\u83b7\u53d6\u5230\u7a0b\u5e8f\u4e2d\u51fd\u6570\u7684\u8c03\u7528\u5173\u7cfb\u3002 Call Graph \u529f\u80fd\u5305\u62ec\u5982\u4e0b\u51e0\u79cd\u89c6\u56fe\uff1a Radial View \u672c\u89c6\u56fe\u4e2d\u5c55\u793a\u4e86\u7a0b\u5e8f\u7684\u8c03\u7528\u5173\u7cfb\u3002 Tree View \u5c55\u793a\u4e86 Radial View \u4e2d\u6240\u9009\u4e2d\u7684\u7a0b\u5e8f\u7684\u8c03\u7528\u5173\u7cfb\u3001\u8017\u65f6\u6240\u5360\u6bd4\u7387\u3001\u8c03\u7528\u6b21\u6570\u7b49\u4fe1\u606f\uff1b\u9009\u4e2d\u67d0\u4e00\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u67e5\u770b\u5230\u5b83\u7684\u7236\u8282\u70b9\u4ee5\u53ca\u5b50\u8282\u70b9\u7b49\u4fe1\u606f\u3002 Level View \u4e0e Tree View \u6709\u70b9\u7c7b\u4f3c\uff0c\u5c55\u793a\u4e86\u7a0b\u5e8f\u7684\u8c03\u7528\u5173\u7cfb\u4ee5\u53ca\u8c03\u7528\u6b21\u6570\u3002 Aggregate View \u4ee5\u65b9\u56fe\u7684\u65b9\u5f0f\uff0c\u975e\u5e38\u76f4\u89c2\u7684\u5c55\u793a\u4e86\u7a0b\u5e8f\u7684\u8017\u65f6\u5173\u7cfb\u3002 3 Code coverage \u529f\u80fd \u00b6 Nuclei studio \u4e2d Code coverage \u529f\u80fd\u57fa\u4e8e gcc \u7f16\u8bd1\u5668\u63d0\u4f9b\u7684 gcov \u5de5\u5177\uff0c\u7f16\u8bd1\u65f6\u9700\u5e26\u7279\u5b9a\u7684\u7f16\u8bd1\u9009\u9879 -coverage \u6765\u7f16\u8bd1\u6307\u5b9a\u6e90\u7801\u6587\u4ef6\uff0c\u7f16\u8bd1\u6210\u529f\u540e\u5f97\u5230 ELF \u6587\u4ef6\uff0c\u7136\u540e\u5728\u5b9e\u9645\u5f00\u53d1\u677f\u4e0a\u8fd0\u884c\u5e76\u6536\u96c6\u9700\u8981\u7684 coverage \u6587\u4ef6(gcda/gcno \u6587\u4ef6)\uff0c\u6700\u7ec8\u5728 IDE \u4e0a\u4ee5\u56fe\u5f62\u5316\u7684\u65b9\u5f0f\u5c55\u793a\u3002 \u4f7f\u7528\u65b9\u6cd5\u4e0e Profiling \u529f\u80fd\u7c7b\u4f3c\uff0c\u8fd9\u91cc\u4ec5\u5bf9\u4e0d\u540c\u7684\u5730\u65b9\u8fdb\u884c\u8bf4\u660e\uff1a step1\uff1a\u65b0\u5efa Profiling demo \u5de5\u7a0b step2\uff1a\u57fa\u4e8e Profiling demo \u5de5\u7a0b\u79fb\u690d amrwbenc \u88f8\u673a\u7528\u4f8b step3\uff1a\u6dfb\u52a0 gcov \u6570\u636e\u6536\u96c6\u4ee3\u7801\uff0c\u5e76\u6dfb\u52a0 -coverage \u7f16\u8bd1\u9009\u9879\uff0c\u91cd\u65b0\u7f16\u8bd1\u4ee3\u7801 \u5728main\u51fd\u6570\u7684\u7ed3\u5c3e\u5904\u6dfb\u52a0gprof\u6570\u636e\u6536\u96c6\u4ee3\u7801\uff1a int main(int argc, char *argv[]) { /* * \u4ee3\u7801\u7701\u7565 */ /* * \u5728main\u51fd\u6570\u7684\u7ed3\u5c3e\u5904\u6dfb\u52a0 gcov \u6570\u636e\u6536\u96c6\u4ee3\u7801 */ // TODO this is used for collect gprof and gcov data // See Components/profiling/README.md about how to set the IDE project properities extern long gcov_collect(unsigned long interface); gcov_collect(2); return 0; } \u6dfb\u52a0 -coverage \u7f16\u8bd1\u9009\u9879\uff0c\u91cd\u65b0\u7f16\u8bd1\u4ee3\u7801\uff1a step4\uff1a\u8fd0\u884c\u7a0b\u5e8f \u53ef\u4ee5\u5728qemu\u4e2d\u6a21\u62df\u8fd0\u884c\uff0c\u6216\u8005\u4e0a\u677f\u5b9e\u9645\u8fd0\u884c\u90fd\u53ef\u4ee5\uff08\u7edf\u8ba1\u8986\u76d6\u7387\uff0c\u4e0d\u6d89\u53ca\u5230\u6027\u80fd\u5206\u6790\uff0c\u6240\u4ee5\u4f7f\u7528 qemu \u6216\u8005\u4e0a\u677f\u6d4b\u8bd5\u90fd\u53ef\u4ee5\uff09\u3002 \u89e3\u6790\u4e4b\u540e\uff0c\u5728Debug->application\u6587\u4ef6\u5939\u4e0b\u751f\u6210\u4e86 gcda \u4e0e gcno \u6587\u4ef6\uff0c\u53cc\u51fb\u6253\u5f00\u5373\u53ef 4 \u8865\u5145 \u00b6 Profiling \u4e0e Code coverage \u529f\u80fd\u53ef\u4ee5\u540c\u65f6\u6253\u5f00\uff0c\u53ea\u9700\u6dfb\u52a0\u4e00\u8d77\u6536\u96c6 Profiling \u6570\u636e\u4e0e Code coverage \u6570\u636e\u7684\u4ee3\u7801\uff0c\u5e76\u5728\u7f16\u8bd1\u65f6\u6dfb\u52a0 -pg -coverage \u7f16\u8bd1\u9009\u9879\u3002 // TODO this is used for collect gprof and gcov data // See Components/profiling/README.md about how to set the IDE project properities extern long gprof_collect(unsigned long interface); extern long gcov_collect(unsigned long interface); gprof_collect(2); gcov_collect(2); \u4f7f\u7528Profiling\u53ef\u80fd\u9047\u89c1\u7684\u95ee\u9898\uff1a \u7247\u4e0a\u5185\u5b58\u4e0d\u8db3\uff0c\u6253\u5370\u65e5\u5fd7\u4e2d\u6709\u9519\u8bef\u6253\u5370\uff0cgprof/gcov data \u9700\u8981\u5360\u7528\u4e00\u5b9a\u5927\u5c0f\u7a7a\u95f4 Console \u6216 Terminal \u6536\u96c6\u7684\u6570\u636e\u4e0d\u5168\u5bfc\u81f4\u89e3\u6790\u6570\u636e\u4e0d\u6b63\u786e\uff0c\u9700\u786e\u8ba4\u6570\u636e\u6ca1\u6709\u88ab\u51b2\u6389\uff0c\u9700\u8981\u8c03\u8282 Console \u6216 Terminal \u8f93\u51fa\u5927\u5c0f\u9650\u5236 \u624b\u52a8\u5220\u6389 gmon.out \u6587\u4ef6\uff0c\u518d\u6b21\u89e3\u6790\uff0c\u5f39\u51fa No files have been generated \u9519\u8bef\u5f39\u6846 \u4e0a\u8ff0\u5177\u4f53\u89e3\u51b3\u65b9\u6cd5\u53ef\u53c2\u8003 Profiling\u4e0e Code coverage \u529f\u80fd\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898","title":"Nuclei Studio\u4f7f\u7528Profiling\u529f\u80fd\u8fdb\u884c\u6027\u80fd\u8c03\u4f18\u4e3e\u4f8b"},{"location":"17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage/#nuclei-studioprofiling","text":"\u6587\u6863\u662f\u57fa\u4e8e Nuclei Studio \u7684 2024.06 Windows \u7248\u672c\u5b9e\u6d4b\u3002","title":"Nuclei Studio\u4f7f\u7528Profiling\u529f\u80fd\u8fdb\u884c\u6027\u80fd\u8c03\u4f18\u4e3e\u4f8b"},{"location":"17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage/#_1","text":"Nuclei Studio 2024.06 \u63d0\u4f9b Profiling \u529f\u80fd\u3001Call Graph \u529f\u80fd \u4ee5\u53ca Code coverage \u529f\u80fd\uff0c\u65b9\u4fbf\u7528\u6237\u4f7f\u7528\u3002 \u7b80\u5355\u63cf\u8ff0\u5982\u4e0b\uff1a Profiling \u529f\u80fd \uff1a\u57fa\u4e8e binutils gprof \u5de5\u5177\uff0c\u53ef\u7528\u4e8e\u5206\u6790\u51fd\u6570\u8c03\u7528\u5173\u7cfb\u3001\u8c03\u7528\u6b21\u6570\u3001\u4ee5\u53ca\u8fd0\u884c\u65f6\u95f4\uff1b\u901a\u8fc7 Profiling \u6293\u53d6\u70ed\u70b9\u51fd\u6570\u53ef\u4ee5\u7528\u6765\u5206\u6790\u7a0b\u5e8f\u7684\u74f6\u9888\uff0c\u4ee5\u4fbf\u8fdb\u884c\u6027\u80fd\u4f18\u5316\u3002 Call Graph \u529f\u80fd \uff1a\u57fa\u4e8e Profiling \u529f\u80fd\uff0c\u5c06\u51fd\u6570\u8c03\u7528\u5173\u7cfb\u3001\u8c03\u7528\u6b21\u6570\u3001\u4ee5\u53ca\u8fd0\u884c\u65f6\u95f4\u7528\u56fe\u5c55\u793a\u51fa\u6765\uff0c\u65b9\u4fbf\u5f00\u53d1\u4eba\u5458\u5206\u6790\u3002 Code coverage \u529f\u80fd \uff1a\u57fa\u4e8e gcc \u7f16\u8bd1\u5668\u63d0\u4f9b gcov \u5de5\u5177\uff0c\u53ef\u7528\u6765\u67e5\u770b\u6e90\u7801\u6587\u4ef6\u7684\u4ee3\u7801\u8986\u76d6\u7387\uff0c\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u786e\u5b9a\u6d4b\u8bd5\u7528\u4f8b\u662f\u5426\u8db3\u591f\u5145\u5206\uff0c\u662f\u5426\u8986\u76d6\u4e86\u88ab\u6d4b\u4ee3\u7801\u7684\u6240\u6709\u5206\u652f\u548c\u8def\u5f84\u3002 \u5728 NucleiStudio_User_Guide.pdf \u76f8\u5173\u7ae0\u8282\u5bf9\u8fd9\u51e0\u4e2a\u529f\u80fd\u5df2\u7ecf\u6709\u8f83\u8be6\u7ec6\u7684\u63cf\u8ff0\uff0c\u8fd9\u7bc7\u6587\u6863\u4ee5\u4e00\u4e2a\u4f8b\u5b50\u6765\u5c55\u793a\u5b83\u4eec\u7684\u5b9e\u9645\u5e94\u7528\u3002","title":"\u95ee\u9898\u8bf4\u660e"},{"location":"17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage/#_2","text":"","title":"\u89e3\u51b3\u65b9\u6848"},{"location":"17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage/#1","text":"\u6240\u9700\u6750\u6599\uff1a Nuclei Studio\uff1a NucleiStudio 2024.06 \uff0c\u4ee5 Windows \u7248\u672c\u4e3a\u4f8b \u7528\u4f8b\uff1a \u4ee5 AMR-WB-enc \u5373\u81ea\u9002\u5e94\u591a\u901f\u7387\u5bbd\u5e26\u7f16\u7801\u97f3\u9891\u7b97\u6cd5\u4e3a\u4f8b\uff0c\u7528\u6237\u53ef\u4ee5\u79fb\u690d\u81ea\u5df1\u7684\u7528\u4f8b \u57fa\u4e8e nuclei-sdk v0.6.0 \u79fb\u690d amrwbenc \u88f8\u673a\u7528\u4f8b\uff1a \u6253\u5f00 Nuclei Studio \u5efa\u7acb amrwbenc \u5de5\u7a0b\uff0c\u7136\u540e\u79fb\u690d amrwbenc \u6e90\u7801\uff0c\u6700\u7ec8\u7528\u4f8b\u53ef\u6b63\u5e38\u8fd0\u884c\u3002\u7528\u6237\u53ef\u4ee5\u79fb\u690d\u81ea\u5df1\u7684\u7528\u4f8b\uff0c\u4e0d\u540c\u7528\u4f8b\u79fb\u690d\u7684\u7ec6\u8282\u5404\u4e0d\u76f8\u540c\uff0c\u8fd9\u4e00\u6b65\u4e0d\u662f\u8fd9\u7bc7\u6587\u6863\u7684\u91cd\u70b9\uff0c\u7565\u8fc7\u3002","title":"1 \u73af\u5883\u51c6\u5907"},{"location":"17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage/#2-profiling","text":"Nuclei studio \u4e2d Profiling \u529f\u80fd\u57fa\u4e8e binutils gprof \u5de5\u5177\u3002\u7f16\u8bd1\u65f6\u9700\u5e26\u7279\u5b9a\u7684\u7f16\u8bd1\u9009\u9879 -pg \u6765\u7f16\u8bd1\u6307\u5b9a\u6e90\u7801\u6587\u4ef6\uff0c\u7f16\u8bd1\u6210\u529f\u540e\u5f97\u5230 ELF \u6587\u4ef6\uff0c \u7136\u540e\u5728\u5b9e\u9645\u5f00\u53d1\u677f\u4e0a\u8fd0\u884c\u5e76\u6536\u96c6\u9700\u8981\u7684 gmon.out \u6587\u4ef6\uff0c\u6700\u7ec8\u5728 IDE \u4e0a\u4ee5\u56fe\u5f62\u5316\u7684\u65b9\u5f0f\u5c55\u793a\u3002\u6240\u4ee5\u8fd8\u9700\u8981\u5728\u7528\u4f8b\u672b\u5c3e\u6dfb\u52a0 gprof \u6570\u636e\u6536\u96c6\u4ee3\u7801\uff0c\u6709\u4e24\u79cd\u65b9\u5f0f\uff1a \u65b9\u5f0f1\uff1a\u79fb\u690d gprof \u6570\u636e\u6536\u96c6\u4ee3\u7801\u5230\u81ea\u5df1\u7684\u5de5\u7a0b\u4e2d\uff0c\u4ee3\u7801\u53ef\u4ee5\u53c2\u8003 Profiling README \u65b9\u5f0f2\uff1a\u57fa\u4e8e Nuclei Studio \u4e2d\u7684 Profiling demo \u8fdb\u884c\u6539\u9020\uff0c\u5373\u7528\u81ea\u5df1\u7684\u7528\u4f8b\u66ff\u6362\u6389 Profiling demo \u5de5\u7a0b\u7684\u7684\u7528\u4f8b\u90e8\u5206 \u4e0b\u9762\u793a\u4f8b\u91c7\u7528\u540e\u4e00\u79cd\u65b9\u6cd5\u8fdb\u884c\u6f14\u793a\uff1a step1\uff1a\u65b0\u5efa Profiling demo \u5de5\u7a0b File->New->New Nuclei RISC-V C/C++ Project \uff0c\u9009\u62e9 Nuclei FPGA Evalution Board->sdk-nuclei_sdk @0.6.0 \u6ce8\u610f\uff1a Nuclei SDK \u9700\u9009\u62e9 0.6.0 \u53ca\u4ee5\u540e\u7248\u672c\u624d\u652f\u6301 Profiling \u4e0e Code coverage \u529f\u80fd step2\uff1a\u57fa\u4e8e Profiling demo \u5de5\u7a0b\u79fb\u690d amrwbenc \u88f8\u673a\u7528\u4f8b \u5220\u6389 Profiling demo \u5de5\u7a0b\u4e2d application \u4e2d\u7684\u539f\u59cb\u7528\u4f8b\uff0c\u66ff\u6362\u6210 amrwbenc \u7528\u4f8b\uff0c\u5f62\u6210\u5982\u4e0b\u76ee\u5f55\u7ed3\u6784\uff0c\u5e76\u786e\u4fdd\u80fd\u7f16\u8bd1\u6210\u529f\u3002 \u8fd9\u91cc\u63d0\u4f9b\u672c\u793a\u4f8b\u4f7f\u7528\u7684\u5de5\u7a0b\uff0c\u6709\u5174\u8da3\u53ef\u4ee5\u4e0b\u8f7d\u4f7f\u7528\uff1a \u4f18\u5316\u524d\u7684\u5de5\u7a0b\u4e0b\u8f7d\u94fe\u63a5 \u4e0b\u8f7d zip \u5305\u540e\uff0c\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165\u5230 Nuclei Studio \u4e2d\u8fd0\u884c(\u5bfc\u5165\u6b65\u9aa4\uff1a File->Import->Existing Projects into Workspace->Next->Select archive file->\u9009\u62e9zip\u538b\u7f29\u5305->next \u5373\u53ef) step3\uff1a\u5728\u7528\u4f8b\u7ed3\u5c3e\u5904\u6dfb\u52a0 grof \u6570\u636e\u6536\u96c6\u4ee3\u7801\uff0c\u5e76\u6dfb\u52a0 -pg \u7f16\u8bd1\u9009\u9879\uff0c\u91cd\u65b0\u7f16\u8bd1\u4ee3\u7801 \u5728 main \u51fd\u6570\u7684\u7ed3\u5c3e\u5904\u6dfb\u52a0 gprof \u6570\u636e\u6536\u96c6\u4ee3\u7801\uff1a int main(int argc, char *argv[]) { /* * \u4ee3\u7801\u7701\u7565 */ /* * \u5728main\u51fd\u6570\u7684\u7ed3\u5c3e\u5904\u6dfb\u52a0gprof\u6570\u636e\u6536\u96c6\u4ee3\u7801 */ // TODO this is used for collect gprof and gcov data // See Components/profiling/README.md about how to set the IDE project properities extern long gprof_collect(unsigned long interface); gprof_collect(2); return 0; } \u6536\u96c6 gprof data \u6709\u4e09\u79cd\u65b9\u5f0f\uff0c\u901a\u8fc7\u5165\u53c2\u4e0d\u540c\u8fdb\u884c\u533a\u5206\uff1a gprof_collect(0)\uff1a\u5728\u7f13\u51b2\u533a\u4e2d\u6536\u96c6 gprof \u6216 gcov \u6570\u636e\uff0c\u5728\u8c03\u8bd5\u7a0b\u5e8f\u65f6\u53ef\u4ee5\u4f7f\u7528 GDB \u811a\u672c\u8f6c\u50a8 gcov \u6216 gprof \u4e8c\u8fdb\u5236\u6587\u4ef6 gprof_collect(1)\uff1a\u4f7f\u7528 semihost \u76f4\u63a5\u5c06 gprof \u6216 gcov \u6570\u636e\u5199\u5165\u6587\u4ef6\u4e2d gprof_collect(2)\uff1a\u76f4\u63a5\u5728 Console \u6216 Serial Terminal \u4e2d\u6253\u5370 gcov \u6216 gprof \u6570\u636e\uff0c\u7136\u540e\u53ef\u4ee5\u901a\u8fc7IDE\u4e2d Parse and Generate HexDump \u529f\u80fd\u8fdb\u884c\u89e3\u6790\u6570\u636e\u5e76\u4fdd\u5b58\u5230PC\u4e0a \u8be6\u60c5\u53ef\u53c2\u8003 Profiling README \uff0c\u8fd9\u91cc\u4ee5\u5c06 gprof data \u6253\u5370\u5230\u4e32\u53e3\uff08Console \u6216 Serial Terminal\uff09\u4e3a\u4f8b\u3002 \u5bf9\u9700\u8981\u8fdb\u884cprofiling\u7684\u4ee3\u7801\u6dfb\u52a0 -pg \u7f16\u8bd1\u9009\u9879\uff0c\u91cd\u65b0\u7f16\u8bd1\u4ee3\u7801\uff1a \u6ce8\u610f\uff1a \u9009\u62e9 application, \u5bf9\u5173\u952e\u4ee3\u7801\u6dfb\u52a0 -pg \u7f16\u8bd1\u9009\u9879\uff0c\u8fd9\u4e2a\u7528\u4f8b\u53ea\u6709 C \u4ee3\u7801\uff0c\u53ea\u5bf9 C \u4ee3\u7801\u6dfb\u52a0 -pg \u7f16\u8bd1\u9009\u9879\u5373\u53ef step4\uff1a\u8fd0\u884c\u7a0b\u5e8f \u6709\u51e0\u79cd\u65b9\u5f0f\u53ef\u4ee5\u8fd0\u884c\u7a0b\u5e8f\uff1a qemu \u6a21\u62df\u5668\uff08\u4e0d\u9700\u8981\u786c\u4ef6\uff0c\u7b80\u5355\u8dd1\u4e00\u4e0b\u6d41\u7a0b\uff0c\u6d4b\u8bd5\u7ed3\u679c\u4e0d\u51c6\u786e\uff09 \u4e0a\u677f\u6d4b\u8bd5 \uff08\u57fa\u4e8e\u5b9a\u65f6\u5668\u91c7\u96c6\u6570\u636e\uff09 \u57fa\u4e8e xl_cpumodel (Nuclei Near Cycle Model)\uff0c\u53c2\u8003: \u901a\u8fc7Profiling\u5c55\u793aNuclei Model NICE/VNICE\u6307\u4ee4\u52a0\u901f \u8fd9\u4e00\u7bc7\u6587\u7ae0\u53ea\u4ecb\u7ecd qemu \u4eff\u771f\u4e0e\u4e0a\u677f\u6d4b\u8bd5\u4e24\u79cd\u65b9\u5f0f\uff0cqemu \u6536\u96c6\u7684\u6570\u636e\u6253\u5370\u5230 Console \u53e3\uff0c\u4e0a\u677f\u5b9e\u9645\u8fd0\u884c\u8f93\u51fa\u5230 Nuclei Studio \u7684 Serial Terminal \u53e3\u3002 step5\uff1a\u89e3\u6790 gprof \u6570\u636e \u5f00\u59cb\u89e3\u6790 gprof \u6570\u636e\u3002 \u6ce8\u610f\uff1a \u8fd9\u4e00\u6b65\u53ef\u80fd\u9047\u5230\u4e00\u4e9b\u95ee\u9898\uff0c\u89e3\u51b3\u65b9\u6cd5\u53ef\u53c2\u8003 Profiling\u4e0e Code coverage \u529f\u80fd\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898 \u5728 qemu \u4e0a\u6d4b\u8bd5, log \u6253\u5370\u5230 Console \u53e3 \u6ce8\u610f : qemu \u4ec5\u7528\u6765\u6a21\u62df\u5c55\u793a\uff0c\u5982\u679c\u5e0c\u671b\u5f97\u5230\u51c6\u786e\u7684\u70ed\u70b9\u51fd\u6570\uff0c\u9700\u8981\u4e0a\u677f\u6d4b\u8bd5\u3002 \u89e3\u6790\u5b8c\u6210\u540e\uff0c\u4f1a\u5728\u5f53\u524d\u5de5\u7a0b\u76ee\u5f55\u4e0b\u751f\u6210 gmon.out\uff0c\u53cc\u51fb\u6253\u5f00\u5c55\u793a\uff1a \u4e0a\u677f\u6d4b\u8bd5 \u4e0a\u677f\u6d4b\u8bd5\u7684\u6b65\u9aa4\u4e0e qemu \u7c7b\u4f3c\uff0c\u552f\u4e00\u4e0d\u540c\u7684\u662f gprof \u6570\u636e\u8f93\u51fa\u5230 Serial Terminal \u4e0a\u3002 \u914d\u7f6e Serial Terminal: \u6ce8\u610f :\u5982\u679c\u4e32\u53e3\u5de5\u5177\u5df2\u7ecf\u6253\u5f00\uff0c\u786e\u4fdd\u6bcf\u6b21\u8fd0\u884c gprof \u524d\uff0c\u6e05\u9664\u6389\u4e32\u53e3\u6253\u5370\uff08\u9f20\u6807\u53f3\u952e-> Clear Terminal\uff09\uff0c\u907f\u514d\u5bf9\u6570\u636e\u89e3\u6790\u4ea7\u751f\u5f71\u54cd\u3002 \u540c\u6837, \u5168\u9009 log\uff0c\u53f3\u952e\u9009\u62e9 Parse and Generate HexDump \u529f\u80fd\uff0c\u5c31\u4f1a\u5728\u5de5\u7a0b\u6587\u4ef6\u5939\u4e0b\u751f\u6210 gmon.out \u6587\u4ef6\uff0c \u5237\u65b0\u5de5\u7a0b\u540e\uff0c\u5c31\u53ef\u4ee5\u53cc\u51fb\u6253\u5f00\u8fd9\u4e2agmon.out \u6587\u4ef6\u3002 \u5982\u4e0b\u56fe\u662f\u5728 \u677f\u5b50\u4e0a\u5b9e\u9645\u8fd0\u884c \u5f97\u5230\u7684 gprof \u6570\u636e\uff1a \u4ece\u800c\u5f97\u5230 TOP5 \u70ed\u70b9\u51fd\u6570\u4e3a\uff08\u5b9e\u9645\u4e0a\u677f\u6d4b\u8bd5\uff09\uff1a cor_h_vec_012 ACELP_4t64_fx voAWB_Residu voAWB_Convolve voAWB_Syn_filt \u83b7\u5f97\u70ed\u70b9\u51fd\u6570\u540e\uff0c\u53ef\u4ee5\u4ece\u70ed\u70b9\u51fd\u6570\u5165\u624b\u5f00\u59cb\u4f18\u5316\uff0c\u4f18\u5316 TOP \u51fd\u6570\u5f80\u5f80\u53ef\u4ee5\u4e8b\u534a\u529f\u500d\u3002 step6\uff1a\u4f18\u5316\u70ed\u70b9\u51fd\u6570 \u6709\u5982\u4e0b\u51e0\u79cd\u65b9\u6cd5\u4f18\u5316\u70ed\u70b9\u51fd\u6570\uff1a \u8c03\u8282\u7f16\u8bd1\u5668\u53c2\u6570\uff0c\u9488\u5bf9\u6574\u4e2a\u5de5\u7a0b\u6216\u5355\u72ec\u7b97\u5b50\u4f7f\u7528 O2/O3/Ofast \u7b49\u4f18\u5316\u7b49\u7ea7\uff0c\u5f00\u542f -finline-functions -funroll-all-loops \u7b49\u4f18\u5316\u9009\u9879 \u9488\u5bf9\u7b97\u6cd5\u8fdb\u884c\u4f18\u5316\uff0c\u4f7f\u7528\u66f4\u597d\u7684\u7b97\u6cd5\u5b9e\u73b0\u70ed\u70b9\u51fd\u6570 \u4f7f\u7528 RISC-V \u6269\u5c55\u6307\u4ee4\uff08 RVP/RVV \u6269\u5c55\u7b49\uff09\u4f18\u5316 \u8fd9\u91cc\u4ee5 RVP \u6269\u5c55\u4e3a\u4f8b\uff0c\u6309\u7167\u70ed\u70b9\u51fd\u6570\u4ece\u9ad8\u5230\u4f4e\uff0c\u7528 RVP \u6269\u5c55\u6765\u4f18\u5316\u3002\u9700\u8981\u786e\u5b9a\u6240\u7528\u786c\u4ef6\u652f\u6301 RVP \u6269\u5c55\u3002 \u4e3e\u4f8b\u5982\u4e0b\uff1a TOP1 \u70ed\u70b9\u51fd\u6570\u4e3a cor_h_vec_012 \uff0c\u5206\u6790\u51fd\u6570\uff0c\u5c1d\u8bd5\u4f7f\u7528 RVP \u6269\u5c55\u4f18\u5316\uff1a \u5982\u4e0b\u4ee5 #if defined __riscv_xxldspn3x \u9694\u5f00\u7684\u4ee3\u7801\u8868\u793a\u4f7f\u7528 Nuclei N3 P \u6269\u5c55\u6307\u4ee4\u4f18\u5316\u7684\u4ee3\u7801\u3002 \u5176\u4e2d __RV_DSMALDA \u662f\u4e00\u6761 Nuclei N3 P\u6269\u5c55\u6307\u4ee4\uff0c\u5b9e\u73b0\u4e86 \u4e00\u6b21\u5b8c\u6210 4 \u7b14 int16 \u76f8\u4e58\uff0c\u6700\u540e\u7d2f\u52a0\uff0c\u7ed3\u679c\u5b58\u653e\u5230 int64 \u53d8\u91cf\u4e2d\u3002 \u8fd9\u4e9b\u6307\u4ee4Intrinsic API\u53ef\u53c2\u8003 Nuclei P \u6269\u5c55\u6307\u4ee4Intrinsic API \u5177\u4f53\u7684RVP\u6307\u4ee4\u624b\u518c\uff0c\u8bf7\u8054\u7cfb\u82af\u6765\u79d1\u6280\u83b7\u53d6\u3002 \u4f18\u5316\u540e\u7684\u5de5\u7a0b\u5982\u4e0b\uff0c\u53ef\u4ee5\u4e0e\u4f18\u5316\u4e4b\u524d\u7684\u5de5\u7a0b\u505a\u5bf9\u6bd4\uff0c\u53ea\u4f18\u5316\u4e86 cor_h_vec_012 \u7b97\u5b50: \u4f18\u5316\u540e\u7684\u5de5\u7a0b\u4e0b\u8f7d\u94fe\u63a5 \u4f7f\u7528 Nuclei N3 P \u6269\u5c55\u6307\u4ee4\u4f18\u5316\u7684\u4ee3\u7801\u7247\u6bb5\u5982\u4e0b\uff1a void cor_h_vec_012( Word16 h[], /* (i) scaled impulse response */ Word16 vec[], /* (i) scaled vector (/8) to correlate with h[] */ Word16 track, /* (i) track to use */ Word16 sign[], /* (i) sign vector */ Word16 rrixix[][NB_POS], /* (i) correlation of h[x] with h[x] */ Word16 cor_1[], /* (o) result of correlation (NB_POS elements) */ Word16 cor_2[] /* (o) result of correlation (NB_POS elements) */ ) { Word32 i, j, pos, corr; Word16 *p0, *p1, *p2,*p3,*cor_x,*cor_y; Word32 L_sum1,L_sum2; cor_x = cor_1; cor_y = cor_2; p0 = rrixix[track]; p3 = rrixix[track+1]; pos = track; for (i = 0; i < NB_POS; i+=2) { p1 = h; p2 = &vec[pos]; #if defined __riscv_xxldspn3x Word32 tmp1, tmp2; int64_t sum64_1, sum64_2; int64_t p64_1, p64_2; sum64_1 = 0; sum64_2 = 0; for (j=62-pos ;(j - 4) >= 0; j -= 4) { p64_1 = *__SIMD64(p1)++; tmp1 = __RV_PKBB16(*(p2 + 1), *p2); tmp2 = __RV_PKBB16(*(p2 + 3), *(p2 + 2)); p64_2 = __RV_DPACK32(tmp2, tmp1); sum64_1 = __RV_DSMALDA(sum64_1, p64_1, p64_2); tmp1 = __RV_PKBB16(*(p2 + 2), *(p2 + 1)); tmp2 = __RV_PKBB16(*(p2 + 4), *(p2 + 3)); p64_2 = __RV_DPACK32(tmp2, tmp1); sum64_2 = __RV_DSMALDA(sum64_2, p64_1, p64_2); p2 += 4; } L_sum1 = (Word32)sum64_1; L_sum2 = (Word32)sum64_2; for ( ;j >= 0; j--) { L_sum1 += *p1 * *p2++; L_sum2 += *p1++ * *p2; } #endif L_sum1 += *p1 * *p2; L_sum1 = (L_sum1 << 2); L_sum2 = (L_sum2 << 2); corr = (L_sum1 + 0x8000) >> 16; cor_x[i] = vo_mult(corr, sign[pos]) + (*p0++); corr = (L_sum2 + 0x8000) >> 16; cor_y[i] = vo_mult(corr, sign[pos + 1]) + (*p3++); pos += STEP; p1 = h; p2 = &vec[pos]; #if defined __riscv_xxldspn3x sum64_1 = 0; sum64_2 = 0; for (j=62-pos ;(j - 4) >= 0; j -= 4) { p64_1 = *__SIMD64(p1)++; tmp1 = __RV_PKBB16(*(p2 + 1), *p2); tmp2 = __RV_PKBB16(*(p2 + 3), *(p2 + 2)); p64_2 = __RV_DPACK32(tmp2, tmp1); sum64_1 = __RV_DSMALDA(sum64_1, p64_1, p64_2); tmp1 = __RV_PKBB16(*(p2 + 2), *(p2 + 1)); tmp2 = __RV_PKBB16(*(p2 + 4), *(p2 + 3)); p64_2 = __RV_DPACK32(tmp2, tmp1); sum64_2 = __RV_DSMALDA(sum64_2, p64_1, p64_2); p2 += 4; } L_sum1 = (Word32)sum64_1; L_sum2 = (Word32)sum64_2; for ( ;j >= 0; j--) { L_sum1 += *p1 * *p2++; L_sum2 += *p1++ * *p2; } #endif L_sum1 += *p1 * *p2; L_sum1 = (L_sum1 << 2); L_sum2 = (L_sum2 << 2); corr = (L_sum1 + 0x8000) >> 16; cor_x[i+1] = vo_mult(corr, sign[pos]) + (*p0++); corr = (L_sum2 + 0x8000) >> 16; cor_y[i+1] = vo_mult(corr, sign[pos + 1]) + (*p3++); pos += STEP; } return; } \u8fd9\u4e2a\u7b97\u5b50\u8fdb\u884c P \u6269\u5c55\u4f18\u5316\u540e\uff0c \u7f16\u8bd1\u65f6\u52a1\u5fc5\u5e26\u4e0a dsp \u6269\u5c55\u9009\u9879\u8fdb\u884c\u7f16\u8bd1\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a CLean Project \u5e76\u91cd\u65b0\u7f16\u8bd1\uff0c\u91cd\u65b0\u8dd1\u4e00\u6b21profiling\uff0c\u53ef\u4ee5\u770b\u5230\u4f18\u5316\u6548\u679c\uff0c cor_h_vec_012 \u51fd\u6570\u5360\u7528\u7387\u6709\u6240\u4e0b\u964d\uff0c\u51fd\u6570\u8c03\u7528\u65f6\u95f4\u4e5f\u6709\u6240\u51cf\u5c11\u3002 \u6ce8\u610f\uff1a \u4e0a\u8ff0\u4ec5\u63d0\u4f9b\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u7528\u6237\u53ef\u4ee5\u4f9d\u6b21\u5bf9\u70ed\u70b9\u51fd\u6570\u8fdb\u884c\u5206\u6790\u5e76\u4f18\u5316\uff0c\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u7531\u4e8e\u91c7\u6837\u7b49\u539f\u56e0\uff0c \u5bfc\u81f4 TOP \u51fd\u6570\u5206\u5e03\u6709\u6240\u6ce2\u52a8\uff0c\u8fd9\u662f\u6b63\u5e38\u7684\uff0c\u6700\u7ec8\u7cbe\u786e\u7684\u5206\u6790\u9700\u8981\u7edf\u8ba1\u6700\u7ec8\u7684\u603b cycle \u6570\uff0c\u7136\u540e\u8ba1\u7b97\u63d0\u5347\u6bd4\u3002","title":"2 Profiling \u529f\u80fd"},{"location":"17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage/#2-call-graph","text":"Nuclei Studio \u4e2d Call Graph \u4e3b\u8981\u662f\u901a\u8fc7\u5206\u6790 Profiling \u7684\u6570\u636e\u6765\u83b7\u53d6\u5230\u7a0b\u5e8f\u4e2d\u51fd\u6570\u7684\u8c03\u7528\u5173\u7cfb\u3002 Call Graph \u529f\u80fd\u5305\u62ec\u5982\u4e0b\u51e0\u79cd\u89c6\u56fe\uff1a Radial View \u672c\u89c6\u56fe\u4e2d\u5c55\u793a\u4e86\u7a0b\u5e8f\u7684\u8c03\u7528\u5173\u7cfb\u3002 Tree View \u5c55\u793a\u4e86 Radial View \u4e2d\u6240\u9009\u4e2d\u7684\u7a0b\u5e8f\u7684\u8c03\u7528\u5173\u7cfb\u3001\u8017\u65f6\u6240\u5360\u6bd4\u7387\u3001\u8c03\u7528\u6b21\u6570\u7b49\u4fe1\u606f\uff1b\u9009\u4e2d\u67d0\u4e00\u4e2a\u51fd\u6570\uff0c\u53ef\u4ee5\u67e5\u770b\u5230\u5b83\u7684\u7236\u8282\u70b9\u4ee5\u53ca\u5b50\u8282\u70b9\u7b49\u4fe1\u606f\u3002 Level View \u4e0e Tree View \u6709\u70b9\u7c7b\u4f3c\uff0c\u5c55\u793a\u4e86\u7a0b\u5e8f\u7684\u8c03\u7528\u5173\u7cfb\u4ee5\u53ca\u8c03\u7528\u6b21\u6570\u3002 Aggregate View \u4ee5\u65b9\u56fe\u7684\u65b9\u5f0f\uff0c\u975e\u5e38\u76f4\u89c2\u7684\u5c55\u793a\u4e86\u7a0b\u5e8f\u7684\u8017\u65f6\u5173\u7cfb\u3002","title":"2 Call Graph \u529f\u80fd"},{"location":"17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage/#3-code-coverage","text":"Nuclei studio \u4e2d Code coverage \u529f\u80fd\u57fa\u4e8e gcc \u7f16\u8bd1\u5668\u63d0\u4f9b\u7684 gcov \u5de5\u5177\uff0c\u7f16\u8bd1\u65f6\u9700\u5e26\u7279\u5b9a\u7684\u7f16\u8bd1\u9009\u9879 -coverage \u6765\u7f16\u8bd1\u6307\u5b9a\u6e90\u7801\u6587\u4ef6\uff0c\u7f16\u8bd1\u6210\u529f\u540e\u5f97\u5230 ELF \u6587\u4ef6\uff0c\u7136\u540e\u5728\u5b9e\u9645\u5f00\u53d1\u677f\u4e0a\u8fd0\u884c\u5e76\u6536\u96c6\u9700\u8981\u7684 coverage \u6587\u4ef6(gcda/gcno \u6587\u4ef6)\uff0c\u6700\u7ec8\u5728 IDE \u4e0a\u4ee5\u56fe\u5f62\u5316\u7684\u65b9\u5f0f\u5c55\u793a\u3002 \u4f7f\u7528\u65b9\u6cd5\u4e0e Profiling \u529f\u80fd\u7c7b\u4f3c\uff0c\u8fd9\u91cc\u4ec5\u5bf9\u4e0d\u540c\u7684\u5730\u65b9\u8fdb\u884c\u8bf4\u660e\uff1a step1\uff1a\u65b0\u5efa Profiling demo \u5de5\u7a0b step2\uff1a\u57fa\u4e8e Profiling demo \u5de5\u7a0b\u79fb\u690d amrwbenc \u88f8\u673a\u7528\u4f8b step3\uff1a\u6dfb\u52a0 gcov \u6570\u636e\u6536\u96c6\u4ee3\u7801\uff0c\u5e76\u6dfb\u52a0 -coverage \u7f16\u8bd1\u9009\u9879\uff0c\u91cd\u65b0\u7f16\u8bd1\u4ee3\u7801 \u5728main\u51fd\u6570\u7684\u7ed3\u5c3e\u5904\u6dfb\u52a0gprof\u6570\u636e\u6536\u96c6\u4ee3\u7801\uff1a int main(int argc, char *argv[]) { /* * \u4ee3\u7801\u7701\u7565 */ /* * \u5728main\u51fd\u6570\u7684\u7ed3\u5c3e\u5904\u6dfb\u52a0 gcov \u6570\u636e\u6536\u96c6\u4ee3\u7801 */ // TODO this is used for collect gprof and gcov data // See Components/profiling/README.md about how to set the IDE project properities extern long gcov_collect(unsigned long interface); gcov_collect(2); return 0; } \u6dfb\u52a0 -coverage \u7f16\u8bd1\u9009\u9879\uff0c\u91cd\u65b0\u7f16\u8bd1\u4ee3\u7801\uff1a step4\uff1a\u8fd0\u884c\u7a0b\u5e8f \u53ef\u4ee5\u5728qemu\u4e2d\u6a21\u62df\u8fd0\u884c\uff0c\u6216\u8005\u4e0a\u677f\u5b9e\u9645\u8fd0\u884c\u90fd\u53ef\u4ee5\uff08\u7edf\u8ba1\u8986\u76d6\u7387\uff0c\u4e0d\u6d89\u53ca\u5230\u6027\u80fd\u5206\u6790\uff0c\u6240\u4ee5\u4f7f\u7528 qemu \u6216\u8005\u4e0a\u677f\u6d4b\u8bd5\u90fd\u53ef\u4ee5\uff09\u3002 \u89e3\u6790\u4e4b\u540e\uff0c\u5728Debug->application\u6587\u4ef6\u5939\u4e0b\u751f\u6210\u4e86 gcda \u4e0e gcno \u6587\u4ef6\uff0c\u53cc\u51fb\u6253\u5f00\u5373\u53ef","title":"3 Code coverage \u529f\u80fd"},{"location":"17-an_example_to_demonstrate_the_use_of_profiling_and_code_coverage/#4","text":"Profiling \u4e0e Code coverage \u529f\u80fd\u53ef\u4ee5\u540c\u65f6\u6253\u5f00\uff0c\u53ea\u9700\u6dfb\u52a0\u4e00\u8d77\u6536\u96c6 Profiling \u6570\u636e\u4e0e Code coverage \u6570\u636e\u7684\u4ee3\u7801\uff0c\u5e76\u5728\u7f16\u8bd1\u65f6\u6dfb\u52a0 -pg -coverage \u7f16\u8bd1\u9009\u9879\u3002 // TODO this is used for collect gprof and gcov data // See Components/profiling/README.md about how to set the IDE project properities extern long gprof_collect(unsigned long interface); extern long gcov_collect(unsigned long interface); gprof_collect(2); gcov_collect(2); \u4f7f\u7528Profiling\u53ef\u80fd\u9047\u89c1\u7684\u95ee\u9898\uff1a \u7247\u4e0a\u5185\u5b58\u4e0d\u8db3\uff0c\u6253\u5370\u65e5\u5fd7\u4e2d\u6709\u9519\u8bef\u6253\u5370\uff0cgprof/gcov data \u9700\u8981\u5360\u7528\u4e00\u5b9a\u5927\u5c0f\u7a7a\u95f4 Console \u6216 Terminal \u6536\u96c6\u7684\u6570\u636e\u4e0d\u5168\u5bfc\u81f4\u89e3\u6790\u6570\u636e\u4e0d\u6b63\u786e\uff0c\u9700\u786e\u8ba4\u6570\u636e\u6ca1\u6709\u88ab\u51b2\u6389\uff0c\u9700\u8981\u8c03\u8282 Console \u6216 Terminal \u8f93\u51fa\u5927\u5c0f\u9650\u5236 \u624b\u52a8\u5220\u6389 gmon.out \u6587\u4ef6\uff0c\u518d\u6b21\u89e3\u6790\uff0c\u5f39\u51fa No files have been generated \u9519\u8bef\u5f39\u6846 \u4e0a\u8ff0\u5177\u4f53\u89e3\u51b3\u65b9\u6cd5\u53ef\u53c2\u8003 Profiling\u4e0e Code coverage \u529f\u80fd\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898","title":"4 \u8865\u5145"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/","text":"\u901a\u8fc7Profiling\u5c55\u793aNuclei Model NICE/VNICE\u6307\u4ee4\u52a0\u901f \u00b6 \u7531\u4e8e Nuclei Model \u4ec5\u652f\u6301Linux\u7248\u672c\uff0c\u6240\u4ee5\u6b64\u6587\u6863\u7684\u6d4b\u8bd5\u90fd\u662f\u57fa\u4e8e Nuclei Studio \u7684 Linux\u7248\u672c (>= 2024.06) \u5b8c\u6210\u7684\u3002 \u80cc\u666f\u63cf\u8ff0 \u00b6 Nuclei Model Profiling \u00b6 \u5728 Nuclei Studio\u4f7f\u7528Profiling\u529f\u80fd\u8fdb\u884c\u6027\u80fd\u8c03\u4f18\u4e3e\u4f8b \u4e2d\u5df2\u7ecf\u901a\u8fc7 qemu \u4ee5\u53ca\u4e0a\u677f\u6d4b\u8bd5\u4e24\u79cd\u8fd0\u884c\u65b9\u5f0f\u5c55\u793a\u4e86 \u5982\u4f55\u5728IDE\u4e2d\u5bfc\u5165\u7279\u5b9a\u7a0b\u5e8f\u8fdb\u884c Profiling\uff0c\u6b64\u6587\u6863\u4e2d\u7684\u4e00\u90e8\u5206\u5c06\u4ecb\u7ecd\u5982\u4f55\u9488\u5bf9 Nuclei Model \u5b8c\u6210 Profiling\u3002 Nuclei Model Profiling \u7684\u4f18\u52bf: \u65e0\u9700\u4f7f\u7528\u5f00\u53d1\u677f\u7b49\u786c\u4ef6 model \u4e2d\u5185\u5efa\u4e86 gprof \u529f\u80fd\uff0c\u65e0\u9700 Profiling \u5e93\u548c gcc -pg \u9009\u9879\u5c31\u53ef\u4ee5\u4ea7\u751f Profiling \u6587\u4ef6 \u91c7\u53d6\u4e86\u6307\u4ee4\u7ea7\u522b\u7684\u91c7\u6837\uff0c\u53ef\u4ee5\u8fdb\u884c\u6307\u4ee4\u7ea7\u522b\u7684 Profiling \u5206\u6790 \u5728 NucleiStudio_User_Guide.pdf \u76f8\u5173\u7ae0\u8282\u5bf9 Nuclei Model \u5982\u4f55\u4eff\u771f\u6027\u80fd\u5206\u6790\u914d\u7f6e\u5df2\u7ecf\u6709\u8f83\u8be6\u7ec6\u7684\u63cf\u8ff0\uff0c\u6b64\u6587\u6863\u4ee5\u4e00\u4e2a\u4f8b\u5b50\u6765\u5c55\u793a\u5176\u5b9e\u9645\u5e94\u7528\u3002 NICE/VNICE \u81ea\u5b9a\u4e49\u6307\u4ee4\u52a0\u901f \u00b6 NICE/VNICE \u4f7f\u5f97\u7528\u6237\u53ef\u4ee5\u7ed3\u5408\u81ea\u5df1\u7684\u5e94\u7528\u6269\u5c55\u81ea\u5b9a\u4e49\u6307\u4ee4\uff0c\u5c06\u82af\u6765\u7684\u6807\u51c6\u5904\u7406\u5668\u6838\u6269\u5c55\u6210\u4e3a\u9762\u5411\u9886\u57df\u4e13\u7528\u7684\u5904\u7406\u5668\uff0c NICE \u5177\u4f53\u7f16\u7801\u89c4\u5219\u53ef\u4ee5\u53c2\u8003 Nuclei_RISC-V_ISA_Spec.pdf \u4e2d\u7684 NICE Introduction \u3002 NICE \u9002\u7528\u4e8e\u65e0\u9700\u4f7f\u7528 RISCV Vector \u7684\u81ea\u5b9a\u4e49\u6307\u4ee4\uff0c VNICE \u9002\u7528\u4e8e\u9700\u8981\u4f7f\u7528 RISCV Vector \u7684\u81ea\u5b9a\u4e49\u6307\u4ee4\u3002 demo_nice / demo_vnice \u4ecb\u7ecd\u4e86 Nuclei \u9488\u5bf9 NICE/VNICE \u7684 demo \u5e94\u7528 \u662f\u5982\u4f55\u7f16\u8bd1\u8fd0\u884c\u7684\uff0c\u6b64\u6587\u6863\u5c06\u901a\u8fc7\u6539\u9020\u4e00\u4e2a\u66f4\u4e3a\u5e38\u89c1\u7684 AES \u52a0\u89e3\u5bc6\u7684\u4f8b\u5b50\uff0c\u91cd\u70b9\u8bf4\u660e\u8be5\u5982\u4f55\u4f7f\u7528 NICE/VNICE \u6307\u4ee4\u66ff\u6362\u70ed\u70b9\u51fd\u6570\u4ee5\u53ca\u5982\u4f55\u5728 model \u91cc\u5b9e\u73b0 NICE/VNICE \u6307\u4ee4\uff0c\u7136\u540e\u901a\u8fc7 Nuclei Studio \u7684 Profiling \u529f\u80fd\u5206\u6790\u66ff\u6362\u524d\u540e\u7684\u7a0b\u5e8f\u6027\u80fd\u3002 \u89e3\u51b3\u65b9\u6848 \u00b6 \u73af\u5883\u51c6\u5907 \u00b6 Nuclei Studio\uff1a NucleiStudio 2024.06 Linux Model Profiling \u00b6 \u5de5\u7a0b\u521b\u5efa\u65b9\u5f0f\u6709\u4e24\u79cd\uff1a \u65b9\u5f0f1\uff1a\u7528\u6237\u53ef\u4ee5\u4f7f\u7528 Nuclei Studio \u4e2d\u7684 demo_nice \u6216 demo_vnice \u6a21\u677f\u6765\u79fb\u690d\u6539\u9020\u81ea\u5df1\u7684 NICE/VNICE \u7a0b\u5e8f \u65b9\u5f0f2\uff1a\u7528\u6237\u5bfc\u5165\u81ea\u5df1\u7684\u5de5\u7a0b\u5230 Nuclei Studio \u4e2d\uff0c\u7136\u540e\u518d\u6dfb\u52a0NICE \u5185\u5d4c\u6c47\u7f16\u5934\u6587\u4ef6\u3001NICE CSR \u4f7f\u80fd\u7b49\u4ee3\u7801 \u6b64\u6587\u6863\u5c06\u91c7\u53d6\u524d\u4e00\u79cd\u65b9\u5f0f\u521b\u5efa\u5de5\u7a0b\uff0c\u7531\u4e8e\u6b64 demo \u4f1a\u7528\u5230 VNICE \u6307\u4ee4\uff0c\u6545\u521b\u5efa demo_vnice \u5de5\u7a0b\uff0c\u7136\u540e\u5c06 AES \u52a0\u89e3\u5bc6\u7a0b\u5e8f\u79fb\u690d\u66ff\u6362\u5230\u5176\u4e2d\u3002 step1\uff1a\u65b0\u5efa demo_vnice \u5de5\u7a0b \u00b6 File->New->New Nuclei RISC-V C/C++ Project\uff0c\u9009\u62e9Nuclei FPGA Evalution Board->sdk-nuclei_sdk @0.6.0 \u6ce8\u610f\uff1a Nuclei SDK \u9700\u9009\u62e9 0.6.0 \u53ca\u4ee5\u540e\u7248\u672c step2\uff1a\u57fa\u4e8e demo_vnice \u5de5\u7a0b\u79fb\u690d aes_demo \u88f8\u673a\u7528\u4f8b \u00b6 \u79fb\u690d aes_demo \u65f6\uff0c\u9700\u8981\u4fdd\u7559 demo_vnice \u4e2d\u7684 insn.h \u5185\u5d4c\u6c47\u7f16\u5934\u6587\u4ef6\u6846\u67b6\uff0c\u65b9\u4fbf\u540e\u7eed\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7684 NICE/VNICE \u6307\u4ee4\uff0c\u5728 main.c \u4e2d\u9700\u8981\u4fdd\u7559 NICE/VNICE \u6307\u4ee4\u6267\u884c\u524d\u7684 CSR \u4f7f\u80fd\u4ee3\u7801\uff1a __RV_CSR_SET(CSR_MSTATUS, MSTATUS_XS); \u5176\u4f59 demo_vnice \u5de5\u7a0b\u4e2d application \u539f\u59cb\u7528\u4f8b\u53ef\u5220\u9664\uff0c\u66ff\u6362\u6210 aes_demo \u7528\u4f8b\uff0c\u5f62\u6210\u5982\u4e0b\u76ee\u5f55\u7ed3\u6784\uff0c\u5e76\u786e\u4fdd\u80fd\u591f\u7f16\u8bd1\u901a\u8fc7\u3002 \u7528\u6237\u53ef\u4ee5\u4e0b\u8f7d\u6211\u4eec\u79fb\u690d\u597d\u7684 AES \u52a0\u89e3\u5bc6 demo\uff1a \u4f18\u5316\u524dAES\u5de5\u7a0b\u94fe\u63a5\u4e0b\u8f7d \u4e0b\u8f7d zip \u5305\u540e\uff0c\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165\u5230 Nuclei Studio \u4e2d\u8fd0\u884c(\u5bfc\u5165\u6b65\u9aa4\uff1a File->Import->Existing Projects into Workspace->Next->Select archive file->\u9009\u62e9zip\u538b\u7f29\u5305->next \u5373\u53ef) step3\uff1amodel \u4eff\u771f\u7a0b\u5e8f \u00b6 \u9996\u5148\u5c06 aes_debug.h \u4e2d\u7684 LOCAL_DEBUG \u6253\u5f00\uff0c\u51c6\u5907\u6d4b\u8bd5 AES \u7b97\u6cd5\u7684\u6574\u4f53 cycle \u6570\u3002 Nuclei Model \u4eff\u771f\u7a0b\u5e8f\u9700\u8981\u914d\u7f6e Nuclei Studio \u4e2d\u7684 RVProf \u8fd0\u884c\u914d\u7f6e\uff0c\u6253\u5f00 Nuclei Studio \u4e3b\u83dc\u5355\u680f\u7684 Run \u9009\u9879\u7684 Run Configurations \u540e\uff0c\u5148\u5728 Main \u9009\u9879\u5361\u4e2d\u9009\u62e9\u7f16\u8bd1\u597d\u7684 elf \u6587\u4ef6\u8def\u5f84\uff0c\u7136\u540e\u5728 RVProf \u9009\u9879\u5361 \u7684 Config options \u4e2d\u5b8c\u6210 model \u8fd0\u884c\u914d\u7f6e --trace=1 --gprof=1 --logdir=Debug \uff0c --trace=1 \u8868\u793a\u5f00\u542f rvtrace\uff0c --gprof=1 \u8868\u793a\u5f00\u542f gprof \u529f\u80fd\u751f\u6210 *.gmon \u6587\u4ef6\uff0c --logdir=Debug \u5219\u8868\u793a\u6700\u7ec8\u751f\u6210\u7684 *.rvtrace \u6587\u4ef6\u3001 *.gmon \u6587\u4ef6\u5b58\u5b58\u653e\u7684\u8def\u5f84\u4e3a\u5f53\u524d\u5de5\u7a0b\u4e0b\u7684 Debug \u76ee\u5f55\uff0c\u53d6\u6d88\u52fe\u9009 Start RVProf locally \uff0c\u7136\u540e\u70b9\u51fb Apply \u548c Run \uff0cmodel \u5c31\u5f00\u59cb\u8fd0\u884c\u7a0b\u5e8f\u4e86\u3002 \u5728 Console \u4e2d\u4f1a\u770b\u5230 Total elapsed time \u8bf4\u660e model \u5df2\u7ecf\u5b8c\u6210\u4eff\u771f\u4e86\uff0c\u5f97\u5230 AES \u7b97\u6cd5\u6574\u4f53\u6d88\u8017 154988 cycle\u3002 \u5c06 aes_debug.h \u4e2d\u7684 LOCAL_DEBUG \u5173\u6389\u53bb\u6389\u7a0b\u5e8f\u6253\u5370\uff0c\u4e3a\u4e86\u51c6\u786e\u6d4b\u8bd5 Profiling \u6570\u636e\uff0c\u786e\u4fdd Nuclei Studio \u7684 launch bar \u4e3a aes_demo Debug , \u91cd\u65b0 Run model\uff1a step4\uff1a\u89e3\u6790 gprof \u6570\u636e \u00b6 model \u4eff\u771f\u7a0b\u5e8f\u5b8c\u6210\u540e\uff0c\u53cc\u51fb\u6253\u5f00\u751f\u6210\u7684 gprof*.gmon \u6587\u4ef6\uff0c\u5207\u6362\u5230\u51fd\u6570\u89c6\u56fe\uff0c\u70b9\u51fb % Time \u4ece\u9ad8\u5230\u4f4e\u6392\u5217\u51fd\u6570 CPU \u5360\u7528\u7387\u3002 \u6ce8\u610f\uff1a Time/Call \u663e\u793a\u7684\u662f\u6bcf\u4e2a\u51fd\u6570\u7684\u51fd\u6570\u4f53 text \u6bb5\u7684 cycle \u6570\uff0c\u5e76\u4e0d\u662f\u6574\u4e2a\u51fd\u6570\u7684 cycle \u6570\uff0c\u662f\u4e0d\u8ba1\u5165\u5176\u4e2d\u5b50\u51fd\u6570\u5360\u7528\u7684 cycle \u6570\u7684\u3002 \u4ece\u800c\u5f97\u5230 CPU \u5360\u7528\u7387\u6700\u9ad8\u7684 TOP5 \u70ed\u70b9\u51fd\u6570\u4e3a\uff1a aes_mix_columns_dec aes_mix_columns_enc aes_key_schedule aes_ecb_decrypt aes_ecb_encrypt \u6ce8\u610f\uff1a \u6b64\u65f6\u9700\u8981\u5907\u4efd\u5f53\u524d\u7684 aes_demo \u5de5\u7a0b\uff0c\u6539\u540d\u4e3a aes_demo_nice \u5de5\u7a0b\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728 Nuclei Studio \u4e2d\u540c\u65f6\u6253\u5f00\u4e24\u4e2a\u5de5\u7a0b\uff0c\u65b9\u4fbf\u6dfb\u52a0 NICE/VNICE \u6307\u4ee4\u4f18\u5316\u540e\u7684\u5de5\u7a0b\u548c\u539f aes_demo \u5de5\u7a0b\u8fdb\u884c Profiling \u6bd4\u8f83\u3002 step5\uff1aNICE/VNICE \u6307\u4ee4\u66ff\u6362 \u00b6 \u7528\u6237\u9700\u8981\u5728\u5907\u4efd\u7684 aes_demo_nice \u5de5\u7a0b\u4e0b\uff0c\u7814\u7a76\u70ed\u70b9\u51fd\u6570\u7b97\u6cd5\u7279\u70b9\uff0c\u5c06\u5176\u66ff\u6362\u4e3a NICE/VNICE \u6307\u4ee4\uff0c\u4ece\u800c\u63d0\u5347\u6574\u4f53\u7a0b\u5e8f\u6027\u80fd\u3002 \u5728\u5305\u542b AES \u52a0\u89e3\u5bc6\u7684 TOP5 \u70ed\u70b9\u51fd\u6570\u7684 aes_dec.c \u548c aes_dec.c \u4e24\u4e2aC\u6587\u4ef6\u4e2d #include \"insn.h\" \u4ee5\u4fbf\u6dfb\u52a0 NICE/VNICE \u6307\u4ee4\u66ff\u6362\u3002 TOP1 \u70ed\u70b9\u51fd\u6570\u4e3a aes_mix_columns_dec \uff0c\u5b9e\u73b0\u4e86 AES \u7b97\u6cd5\u89e3\u5bc6\u7684\u9006\u6df7\u5408\u5217\uff0c\u8f93\u5165\u4e00\u4e2a\u72b6\u6001\u77e9\u9635\uff0c\u7ecf\u8fc7\u8ba1\u7b97\u540e\u539f\u5730\u5740\u8f93\u51fa\u4e00\u4e2a\u8ba1\u7b97\u540e\u7684\u72b6\u6001\u77e9\u9635\uff0c\u5b9e\u73b0\u4e86 Load \u6570\u636e\u3001\u9006\u6df7\u5408\u8fd0\u7b97\u4ee5\u53ca Store \u6570\u636e\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a static void aes_mix_columns_dec( uint8_t pt[16] //!< Current block state ){ // Col 0 for(int i = 0; i < 4; i ++) { uint8_t b0,b1,b2,b3; uint8_t s0,s1,s2,s3; s0 = pt[4*i+0]; s1 = pt[4*i+1]; s2 = pt[4*i+2]; s3 = pt[4*i+3]; b0 = XTE(s0) ^ XTB(s1) ^ XTD(s2) ^ XT9(s3); b1 = XT9(s0) ^ XTE(s1) ^ XTB(s2) ^ XTD(s3); b2 = XTD(s0) ^ XT9(s1) ^ XTE(s2) ^ XTB(s3); b3 = XTB(s0) ^ XTD(s1) ^ XT9(s2) ^ XTE(s3); pt[4*i+0] = b0; pt[4*i+1] = b1; pt[4*i+2] = b2; pt[4*i+3] = b3; } } \u7531\u4e8e\u8f93\u5165\u8f93\u51fa\u5730\u5740\u4e00\u6837\uff0c\u53ef\u4ee5\u8003\u8651\u7528\u4e00\u6761 NICE \u6307\u4ee4\u66ff\u6362\uff0c\u6307\u4ee4\u7684 opcode \u3001 funct3 \u548c funct7 \u90fd\u53ef\u4ee5\u5728\u7f16\u7801\u4f4d\u57df\u4e2d\u81ea\u5b9a\u4e49\uff0c\u8be5\u6307\u4ee4\u8bbe\u7f6e opcode \u4e3a Custom-0 \uff0c funct3 \u8bbe\u7f6e\u4e3a0\uff0c funct7 \u8bbe\u7f6e\u4e3a0x10\uff0c\u5bc4\u5b58\u5668\u53ea\u4f7f\u7528\u5230 rs1 \u63cf\u8ff0\u5165\u53c2\u5730\u5740\uff0c\u4e0d\u9700\u8981\u4f7f\u7528 rd \u548c rs2 \uff0c\u6307\u4ee4\u5199\u5230 insn.h \u4e2d\uff0c\u5185\u5d4c\u6c47\u7f16\u5982\u4e0b\uff1a __STATIC_FORCEINLINE void custom_aes_mix_columns_dec(uint8_t* addr) { int zero = 0; asm volatile(\".insn r 0xb, 0, 0x10, x0, %1, x0\" : \"=r\"(zero) : \"r\"(addr)); } \u7528\u6237\u53ef\u4ee5\u5728 insn.h \u4e2d\u5b9a\u4e49\u4e00\u4e2a USE_NICE \u7684\u5b8f\u9009\u62e9\u662f\u5426\u4f7f\u7528 NICE \uff0c\u5728 aes_dec.c \u6539\u5199 aes_mix_columns_dec \u5982\u4e0b \uff1a static void aes_mix_columns_dec( uint8_t pt[16] //!< Current block state ){ #ifdef USE_NICE custom_aes_mix_columns_dec(pt); #else // Col 0 for(int i = 0; i < 4; i ++) { uint8_t b0,b1,b2,b3; uint8_t s0,s1,s2,s3; s0 = pt[4*i+0]; s1 = pt[4*i+1]; s2 = pt[4*i+2]; s3 = pt[4*i+3]; b0 = XTE(s0) ^ XTB(s1) ^ XTD(s2) ^ XT9(s3); b1 = XT9(s0) ^ XTE(s1) ^ XTB(s2) ^ XTD(s3); b2 = XTD(s0) ^ XT9(s1) ^ XTE(s2) ^ XTB(s3); b3 = XTB(s0) ^ XTD(s1) ^ XT9(s2) ^ XTE(s3); pt[4*i+0] = b0; pt[4*i+1] = b1; pt[4*i+2] = b2; pt[4*i+3] = b3; } #endif } TOP2 \u70ed\u70b9\u51fd\u6570\u4e3a aes_mix_columns_enc \uff0c\u548c TOP1 \u7c7b\u4f3c\uff0c\u5b9e\u73b0\u7684\u662f AES \u52a0\u5bc6\u7684\u9006\u6df7\u5408\u5217\uff0c\u540c\u6837\u4e5f\u662f\u8f93\u5165\u4e00\u4e2a\u72b6\u6001\u77e9\u9635\uff0c\u7ecf\u8fc7\u8ba1\u7b97\u540e\u539f\u5730\u5740\u8f93\u51fa\u4e00\u4e2a\u8ba1\u7b97\u540e\u7684\u72b6\u6001\u77e9\u9635\uff1a static void aes_mix_columns_enc( uint8_t ct [16] //!< Current block state ){ for(int i = 0; i < 4; i ++) { uint8_t b0,b1,b2,b3; uint8_t s0,s1,s2,s3; s0 = ct[4*i+0]; s1 = ct[4*i+1]; s2 = ct[4*i+2]; s3 = ct[4*i+3]; b0 = XT2(s0) ^ XT3(s1) ^ (s2) ^ (s3); b1 = (s0) ^ XT2(s1) ^ XT3(s2) ^ (s3); b2 = (s0) ^ (s1) ^ XT2(s2) ^ XT3(s3); b3 = XT3(s0) ^ (s1) ^ (s2) ^ XT2(s3); ct[4*i+0] = b0; ct[4*i+1] = b1; ct[4*i+2] = b2; ct[4*i+3] = b3; } } \u8003\u8651\u5230\u6307\u4ee4\u5b9e\u73b0\u53ef\u80fd\u65e0\u6cd5\u53ea\u75281\u6761\u6307\u4ee4\u5b8c\u6210\uff0c\u53ef\u4f7f\u75282\u6761 VNICE \u6307\u4ee4\u66ff\u6362\u6b64\u7b97\u6cd5\uff0c\u7b2c\u4e00\u6761 load 16 byte \u6570\u636e\u5230 Vector \u5bc4\u5b58\u5668\uff0c\u7b2c\u4e8c\u6761\u518d\u5b8c\u6210\u8ba1\u7b97\u4ee5\u53ca store\u3002 \u6307\u4ee4\u7684 opcode \u3001 funct3 \u548c funct7 \u4ecd\u7136\u53ef\u4ee5\u5728\u7f16\u7801\u4f4d\u57df\u4e2d\u81ea\u5b9a\u4e49\uff0c\u7b2c\u4e00\u6761\u6307\u4ee4\u4f7f\u7528 rd \u63cf\u8ff0 Vector \u5bc4\u5b58\u5668\uff0c rs1 \u63cf\u8ff0\u5165\u53c2\u5730\u5740\uff0c\u7b2c\u4e8c\u6761\u6307\u4ee4\u4f7f\u7528 rs1 \u63cf\u8ff0\u5165\u53c2\u5730\u5740\uff0c rs1 \u63cf\u8ff0\u5165\u53c2 Vector \u5bc4\u5b58\u5668\uff0c\u4e24\u6761 VNICE \u6307\u4ee4\u7684\u5185\u5d4c\u6c47\u7f16\u5199\u5230 insn.h \u4e2d\uff0c\u5b9a\u4e49\u5982\u4e0b\uff1a __STATIC_FORCEINLINE vint8m1_t __custom_vnice_load_v_i8m1 (uint8_t* addr) { vint8m1_t rdata ; asm volatile(\".insn r 0xb,4,0,%0,%1,x0\" : \"=vr\"(rdata) : \"r\"(addr) ); return rdata; } __STATIC_FORCEINLINE void __custom_vnice_aes_mix_columns_enc_i8m1 (uint8_t *addr, vint8m1_t data) { int zero = 0; asm volatile(\".insn r 0xb,4,1,x0,%1,%2\" : \"=r\"(zero) : \"r\"(addr) , \"vr\"(data) ); } \u7528\u6237\u901a\u8fc7\u5b9a\u4e49 Vector \u5bc4\u5b58\u5668\u4ee5\u53ca\u4f7f\u7528\u4e0a\u5b9a\u4e49\u597d\u7684 VNICE \u6307\u4ee4\u5185\u5d4c\u6c47\u7f16\u6539\u5199 aes_enc.c \u4e2d\u7684 aes_mix_columns_enc \u5982\u4e0b\uff1a static void aes_mix_columns_enc( uint8_t ct [16] //!< Current block state ){ #ifdef USE_NICE uint32_t blkCnt = 16; size_t l; vint8m1_t vin; for (; (l = __riscv_vsetvl_e8m1(blkCnt)) > 0; blkCnt -= l) { vin = __custom_vnice_load_v_i8m1(ct); __custom_vnice_aes_mix_columns_enc_i8m1(ct, vin); } #else for(int i = 0; i < 4; i ++) { uint8_t b0,b1,b2,b3; uint8_t s0,s1,s2,s3; s0 = ct[4*i+0]; s1 = ct[4*i+1]; s2 = ct[4*i+2]; s3 = ct[4*i+3]; b0 = XT2(s0) ^ XT3(s1) ^ (s2) ^ (s3); b1 = (s0) ^ XT2(s1) ^ XT3(s2) ^ (s3); b2 = (s0) ^ (s1) ^ XT2(s2) ^ XT3(s3); b3 = XT3(s0) ^ (s1) ^ (s2) ^ XT2(s3); ct[4*i+0] = b0; ct[4*i+1] = b1; ct[4*i+2] = b2; ct[4*i+3] = b3; } #endif } \u4fee\u6539\u540e\u7684\u7a0b\u5e8f\u4ee3\u7801\u7f16\u8bd1\u901a\u8fc7\uff1a( aes_demo_nice \u5de5\u7a0b) step6\uff1a\u5728 Nuclei Model \u4e2d\u5b9e\u73b0 NICE/VNICE \u6307\u4ee4 \u00b6 \u9996\u5148\u9700\u8981\u4e0b\u8f7d\u652f\u6301\u7528\u6237\u914d\u7f6e\u81ea\u5b9a\u4e49 NICE/VNICE \u6307\u4ee4\u7684\u539f\u59cb Nuclei Model \u8f6f\u4ef6\u5305 \u539f\u59cbmodel\u8f6f\u4ef6\u5305\u4e0b\u8f7d \uff0c\u89e3\u538b\u8f6f\u4ef6\u5305\u4e3a xlmodel_nice \uff0c\u7136\u540e\u5c06\u5176\u5bfc\u5165 Nuclei Studio\u3002 \u5bfc\u5165\u6b65\u9aa4\uff1aFile->Import->Projects from Folder or Archive->Next->Directory->\u9009\u62e9 xlmodel_nice ->Finish\u5373\u53ef \u5982\u4f55\u4f7f\u7528 Nuclei Model \u4ee5\u53ca\u67e5\u770b xlmodel_nice \u8f6f\u4ef6\u5305\u7684\u76ee\u5f55\u7ed3\u6784\u53ef\u4ee5\u53c2\u8003 Nuclei Model\u4ecb\u7ecd \uff0c xlmodel_nice \u662f\u7531CMake\u6784\u5efa\u7684\uff0c\u7528\u6237\u65e0\u9700\u4fee\u6539\u5373\u53ef\u7f16\u8bd1\uff0c\u5728 \u7f16\u8bd1\u524d\u9009\u62e9 Nuclei Studio \u7684 launch bar \u7684 xlmodel_nice \uff0c\u7136\u540e\u70b9\u51fb\u7f16\u8bd1\uff0c\u786e\u4fdd\u8f6f\u4ef6\u5305\u672c\u8eab\u7f16\u8bd1\u901a\u8fc7\uff0c\u7f16\u8bd1\u751f\u6210\u7684 elf \u6587\u4ef6\u6240\u5728\u8def\u5f84\u4e3a build/default/xl_cpumodel \uff1a \u6253\u5f00 nice.cc \u6587\u4ef6\uff0c\u7528\u6237\u9700\u8981\u7528\u8be5\u6587\u4ef6\u7684 do_nice \u51fd\u6570\u5b9e\u73b0\u6240\u6709\u81ea\u5b9a\u4e49\u7684 NICE/VNICE \u6307\u4ee4\uff0c\u5f53\u524d do_nice \u91cc\u5305\u542b\u4e86\u9488\u5bf9 demo_nice \u6216 demo_vnice \u7684 Nuclei\u5b9a\u4e49\u7684 NICE/VNICE \u6307\u4ee4\uff0c \u7528\u6237\u53ef\u4ee5\u53c2\u8003\u5176\u4e2d\u6ce8\u91ca\u5b8c\u6210\u81ea\u5df1\u7684\u81ea\u5b9a\u4e49\u6307\u4ee4\u3002 \u6ce8\u610f\uff1a \u5f53\u7528\u6237\u7f16\u5199\u81ea\u5b9a\u4e49 NICE/VNICE \u6307\u4ee4\u65f6\uff0c\u9700\u8981\u5173\u6389\u548c Nuclei demo_nice / demo_vnice \u5bf9\u5e94\u7684 NUCLEI_NICE_SCALAR / NUCLEI_NICE_VECTOR \u5b8f\uff0c\u4ee5\u514d\u548c\u7528\u6237\u81ea\u5b9a\u4e49\u7684\u6307\u4ee4\u7f16\u7801\u76f8\u51b2\u7a81\u3002 AES demo \u4e2d\u5b9a\u4e49\u7684 NICE/VNICE \u6307\u4ee4\u5b9e\u73b0\u5982\u4e0b\u56fe\uff0c\u901a\u8fc7\u6307\u4ee4\u7684 opcode \u3001 funct3 \u548c funct7 \u7f16\u5199\u6761\u4ef6\u5224\u65ad\u8bed\u53e5\u6307\u5b9a\u8be5\u6761\u6307\u4ee4\uff0c\u7136\u540e\u5728\u5176\u4e2d\u5b9e\u73b0\u6307\u4ee4\u884c\u4e3a\u4ee5\u53ca\u6307\u4ee4 cycle \u6570\u6dfb\u52a0\u3002 NICE \u6307\u4ee4\u5b9e\u73b0\u4e2d\uff0c MMU \u5b8f\u8868\u793a memory \u8bbf\u95ee\uff0cload memory \u4f7f\u7528 MMU.load_uint \uff0cstore memory \u4f7f\u7528 MMU.store_uint \uff0c RD \u3001 RS1 \u3001 RS2 \u3001 RS3 \u5b8f\u8868\u793a\u5176\u5bf9\u5e94\u6807\u91cf\u5bc4\u5b58\u5668\u4e2d\u7684\u503c\uff0c FRS1 \u3001 FRS2 \u3001 FRS3 \u5b8f\u8868\u793a\u5176\u5bf9\u5e94\u6d6e\u70b9\u5bc4\u5b58\u5668\u4e2d\u7684\u503c\uff0c\u8fd9\u4e9b\u5b8f\u7684\u4f7f\u7528\u53ef\u4ee5\u53c2\u8003 nice/inc/decode_macros.h \u3002 VNICE \u6307\u4ee4\u5b9e\u73b0\u4e2d\u4ecd\u7136\u662f\u7528 MMU \u5b8f\u8bbf\u95ee memory\uff0c\u53ea\u4e0d\u8fc7 Vector \u5bc4\u5b58\u5668\u6570\u636e\u4f1a\u5b58\u50a8\u5728 P.VU.elt \u7c7b\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u53c2\u8003 xlspike/include/riscv/v_ext_macros.h \u5b8c\u6210\u76f8\u5173\u4ee3\u7801\u7f16\u5199\u3002 \u5728\u6307\u4ee4\u5b9e\u73b0\u5b8c\u540e\uff0c\u5c06\u81ea\u5b9a\u4e49\u6307\u4ee4\u9700\u8981\u7684 cycle \u6570 n \u76f4\u63a5\u6807\u5b9a\uff1a STATE.mcycle->bump(n); \u5373\u53ef\uff0c\u8fd9\u91cc\u6839\u636e\u786c\u4ef6\u901a\u8fc7 NICE/VNICE \u5b9e\u73b0\u6b64\u7b97\u6cd5\u7684\u7406\u8bba\u503c\uff0c\u6807\u5b9a custom_aes_mix_columns_dec \u4e3a 7 cycle\uff0c __custom_vnice_load_v_i8m1 \u4e3a 1 cycle\uff0c __custom_vnice_aes_mix_columns_enc_i8m1 \u4e3a 2 cycle\u3002 \u4ee5\u4e0a\u4ecb\u7ecd\u4e86\u7528\u6237\u5982\u4f55\u4ece\u539f\u59cb Nuclei Model \u8f6f\u4ef6\u5305\u6dfb\u52a0\u81ea\u5b9a\u4e49 NICE/VNICE \u6307\u4ee4\uff0c\u63a5\u4e0b\u6765\u9700\u8981\u5c06\u65b0\u7f16\u8bd1\u51fa\u7684 model \u53ef\u6267\u884c\u7a0b\u5e8f\u5bfc\u5165\u5230 Nuclei Studio \u4e2d\uff0c\u4e3a\u4e86\u4e0d\u548c Nuclei Studio \u539f\u59cb model \u540d\u79f0\u6df7\u6dc6\uff0c\u53ef\u4ee5\u5c06 model \u5bfc\u5165\u5230 NucleiStudio/toolchain/nucleimodel/bin_aes/ \u7684\u521b\u5efa\u8def\u5f84\u4e0b\uff0c\u6211\u4eec\u63d0\u4f9b\u4e86\u4e24\u79cd model \u53ef\u6267\u884c\u7a0b\u5e8f\u83b7\u53d6\u65b9\u5f0f\uff1a \u5b9e\u73b0 AES demo NICE/VNICE \u6307\u4ee4\u7684 Nuclei model \u8f6f\u4ef6\u5305 \u6dfb\u52a0AES NICE\u6307\u4ee4model\u8f6f\u4ef6\u5305 \uff0c\u7f16\u8bd1\u540e\u5c06 xl_cpumodel \u53ef\u6267\u884c\u7a0b\u5e8f\u5bfc\u5165\u4e0a\u8ff0\u8def\u5f84\u3002 \u7f16\u8bd1\u597d\u7684 model \u7684\u53ef\u6267\u884c\u7a0b\u5e8f xl_cpumodel \uff0c\u76f4\u63a5\u5bfc\u5165\u4e0a\u8ff0\u8def\u5f84\u3002 step7\uff1a\u70ed\u70b9\u51fd\u6570\u518d\u5206\u6790 \u00b6 \u6ce8\u610f\uff1a \u8bf7\u52a1\u5fc5\u5b8c\u6210 step6 \u4e2d\u4ecb\u7ecd\u7684\u5b9e\u73b0\u4e86 NICE/VNICE \u6307\u4ee4\u7684 model \u5bfc\u5165 Nuclei Studio \u4e2d\u624d\u80fd\u7528 model Run aes_demo_nice \u5de5\u7a0b\u3002 \u9996\u5148\u6253\u5f00 Nuclei Studio \u4e3b\u83dc\u5355\u680f\u7684 Run \u9009\u9879\u7684 Run Configurations \uff0cmodel \u914d\u7f6e\u9700\u8981\u91cd\u65b0\u6dfb\u52a0\u4e00\u4efd Nuclei Studio \u4e2d\u7684 RVProf \u8fd0\u884c\u914d\u7f6e aes_demo_nice Debug \uff1a \u5c06 Main \u9009\u9879\u5361\u7684 Project \u901a\u8fc7 Browse \u6539\u4e3a aes_demo_nice \uff0c C/C++ Application \u901a\u8fc7 Search Project \u6539\u4e3a aes_demo_nice.elf : \u7136\u540e\u5c06 RVProf \u9009\u9879\u5361\u4e2d\u7684 model \u6267\u884c\u8def\u5f84 Executable path \u6539\u4e3a step6 \u4e2d\u65b0\u4fee\u6539 model \u7684\u6267\u884c\u8def\u5f84\uff1a .../NucleiStudio/toolchain/nucleimodel/bin_aes/xl_cpumodel : \u8fd0\u884c\u524d\u5c06 aes_debug.h \u4e2d\u7684 LOCAL_DEBUG \u6253\u5f00\uff0c\u6d4b\u8bd5\u4f18\u5316\u540e AES \u7b97\u6cd5\u7684\u6574\u4f53 cycle \u6570\uff0c\u9009\u62e9 Nuclei Studio \u7684 launch bar \u7684 aes_demo_nice Debug \u540e Run model\uff0c\u5f97\u5230 AES \u7b97\u6cd5\u4f18\u5316\u540e\u6574\u4f53\u6d88\u8017 cycle \u6570\u4ece\u4f18\u5316\u524d\u7684 154988 \u964d\u5230\u4e86 35619 cycle\u3002 \u5c06 aes_debug.h \u4e2d\u7684 LOCAL_DEBUG \u5173\u6389\u6d4b\u8bd5\u91cd\u65b0 Run model \u6d4b\u8bd5 Profiling \u6570\u636e\uff0c\u53cc\u51fb gprof0.gmon \u53ef\u4ee5\u770b\u5230 CPU \u5360\u7528\u7387\u8f83\u9ad8\u7684\u70ed\u70b9\u51fd\u6570\u5df2\u7ecf\u6ca1\u6709 aes_mix_columns_enc \u548c aes_mix_columns_dec \u4e86\uff1a \u641c\u7d22 aes_mix_columns_enc \u548c aes_mix_columns_dec \uff0cCPU \u5360\u7528\u7387 aes_mix_columns_enc \u4ece 8.05% \u964d\u5230\u4e86 2.93%\uff0c aes_mix_columns_dec \u4ece 57.87% \u964d\u5230\u4e86 0.5%\uff0c\u51fd\u6570 Time per Call \u6d88\u8017 cycle \u6570 aes_mix_columns_enc \u4ece 1141 cycle \u964d\u5230\u4e86 146 cycle\uff0c aes_mix_columns_dec \u4ece 8209 cycle \u964d\u5230\u4e86 25 cycle\uff0c\u8bf4\u660e\u4e86\u901a\u8fc7 NICE/VNICE \u6307\u4ee4\u66ff\u6362\u70ed\u70b9\u51fd\u6570\u53ef\u4ee5\u5927\u5e45\u63d0\u9ad8\u7a0b\u5e8f\u7b97\u6cd5\u6027\u80fd\u3002 \u6570\u636e\u7edf\u8ba1\u5982\u4e0b\uff1a( enc : aes_mix_columns_enc , dec : aes_mix_columns_dec ) Function Before Optimization NICE/VNICE Optimization CPU Usage % ( enc ) 8.05 2.93 CPU Usage % ( dec ) 57.87 0.5 Time per Call Cycles ( enc ) 1,141 146 Time per Call Cycles ( dec ) 8,209 25 AES Program Total Before Optimization NICE/VNICE Optimization Cycles 154,988 35,619 AES\u52a0\u89e3\u5bc6 NICE/VNICE demo\uff1a \u4f18\u5316\u540eAES\u5de5\u7a0b\u94fe\u63a5\u4e0b\u8f7d","title":"\u901a\u8fc7Profiling\u5c55\u793aNuclei Model NICE/VNICE\u6307\u4ee4\u52a0\u901f"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#profilingnuclei-model-nicevnice","text":"\u7531\u4e8e Nuclei Model \u4ec5\u652f\u6301Linux\u7248\u672c\uff0c\u6240\u4ee5\u6b64\u6587\u6863\u7684\u6d4b\u8bd5\u90fd\u662f\u57fa\u4e8e Nuclei Studio \u7684 Linux\u7248\u672c (>= 2024.06) \u5b8c\u6210\u7684\u3002","title":"\u901a\u8fc7Profiling\u5c55\u793aNuclei Model NICE/VNICE\u6307\u4ee4\u52a0\u901f"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#_1","text":"","title":"\u80cc\u666f\u63cf\u8ff0"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#nuclei-model-profiling","text":"\u5728 Nuclei Studio\u4f7f\u7528Profiling\u529f\u80fd\u8fdb\u884c\u6027\u80fd\u8c03\u4f18\u4e3e\u4f8b \u4e2d\u5df2\u7ecf\u901a\u8fc7 qemu \u4ee5\u53ca\u4e0a\u677f\u6d4b\u8bd5\u4e24\u79cd\u8fd0\u884c\u65b9\u5f0f\u5c55\u793a\u4e86 \u5982\u4f55\u5728IDE\u4e2d\u5bfc\u5165\u7279\u5b9a\u7a0b\u5e8f\u8fdb\u884c Profiling\uff0c\u6b64\u6587\u6863\u4e2d\u7684\u4e00\u90e8\u5206\u5c06\u4ecb\u7ecd\u5982\u4f55\u9488\u5bf9 Nuclei Model \u5b8c\u6210 Profiling\u3002 Nuclei Model Profiling \u7684\u4f18\u52bf: \u65e0\u9700\u4f7f\u7528\u5f00\u53d1\u677f\u7b49\u786c\u4ef6 model \u4e2d\u5185\u5efa\u4e86 gprof \u529f\u80fd\uff0c\u65e0\u9700 Profiling \u5e93\u548c gcc -pg \u9009\u9879\u5c31\u53ef\u4ee5\u4ea7\u751f Profiling \u6587\u4ef6 \u91c7\u53d6\u4e86\u6307\u4ee4\u7ea7\u522b\u7684\u91c7\u6837\uff0c\u53ef\u4ee5\u8fdb\u884c\u6307\u4ee4\u7ea7\u522b\u7684 Profiling \u5206\u6790 \u5728 NucleiStudio_User_Guide.pdf \u76f8\u5173\u7ae0\u8282\u5bf9 Nuclei Model \u5982\u4f55\u4eff\u771f\u6027\u80fd\u5206\u6790\u914d\u7f6e\u5df2\u7ecf\u6709\u8f83\u8be6\u7ec6\u7684\u63cf\u8ff0\uff0c\u6b64\u6587\u6863\u4ee5\u4e00\u4e2a\u4f8b\u5b50\u6765\u5c55\u793a\u5176\u5b9e\u9645\u5e94\u7528\u3002","title":"Nuclei Model Profiling"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#nicevnice","text":"NICE/VNICE \u4f7f\u5f97\u7528\u6237\u53ef\u4ee5\u7ed3\u5408\u81ea\u5df1\u7684\u5e94\u7528\u6269\u5c55\u81ea\u5b9a\u4e49\u6307\u4ee4\uff0c\u5c06\u82af\u6765\u7684\u6807\u51c6\u5904\u7406\u5668\u6838\u6269\u5c55\u6210\u4e3a\u9762\u5411\u9886\u57df\u4e13\u7528\u7684\u5904\u7406\u5668\uff0c NICE \u5177\u4f53\u7f16\u7801\u89c4\u5219\u53ef\u4ee5\u53c2\u8003 Nuclei_RISC-V_ISA_Spec.pdf \u4e2d\u7684 NICE Introduction \u3002 NICE \u9002\u7528\u4e8e\u65e0\u9700\u4f7f\u7528 RISCV Vector \u7684\u81ea\u5b9a\u4e49\u6307\u4ee4\uff0c VNICE \u9002\u7528\u4e8e\u9700\u8981\u4f7f\u7528 RISCV Vector \u7684\u81ea\u5b9a\u4e49\u6307\u4ee4\u3002 demo_nice / demo_vnice \u4ecb\u7ecd\u4e86 Nuclei \u9488\u5bf9 NICE/VNICE \u7684 demo \u5e94\u7528 \u662f\u5982\u4f55\u7f16\u8bd1\u8fd0\u884c\u7684\uff0c\u6b64\u6587\u6863\u5c06\u901a\u8fc7\u6539\u9020\u4e00\u4e2a\u66f4\u4e3a\u5e38\u89c1\u7684 AES \u52a0\u89e3\u5bc6\u7684\u4f8b\u5b50\uff0c\u91cd\u70b9\u8bf4\u660e\u8be5\u5982\u4f55\u4f7f\u7528 NICE/VNICE \u6307\u4ee4\u66ff\u6362\u70ed\u70b9\u51fd\u6570\u4ee5\u53ca\u5982\u4f55\u5728 model \u91cc\u5b9e\u73b0 NICE/VNICE \u6307\u4ee4\uff0c\u7136\u540e\u901a\u8fc7 Nuclei Studio \u7684 Profiling \u529f\u80fd\u5206\u6790\u66ff\u6362\u524d\u540e\u7684\u7a0b\u5e8f\u6027\u80fd\u3002","title":"NICE/VNICE \u81ea\u5b9a\u4e49\u6307\u4ee4\u52a0\u901f"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#_2","text":"","title":"\u89e3\u51b3\u65b9\u6848"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#_3","text":"Nuclei Studio\uff1a NucleiStudio 2024.06 Linux","title":"\u73af\u5883\u51c6\u5907"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#model-profiling","text":"\u5de5\u7a0b\u521b\u5efa\u65b9\u5f0f\u6709\u4e24\u79cd\uff1a \u65b9\u5f0f1\uff1a\u7528\u6237\u53ef\u4ee5\u4f7f\u7528 Nuclei Studio \u4e2d\u7684 demo_nice \u6216 demo_vnice \u6a21\u677f\u6765\u79fb\u690d\u6539\u9020\u81ea\u5df1\u7684 NICE/VNICE \u7a0b\u5e8f \u65b9\u5f0f2\uff1a\u7528\u6237\u5bfc\u5165\u81ea\u5df1\u7684\u5de5\u7a0b\u5230 Nuclei Studio \u4e2d\uff0c\u7136\u540e\u518d\u6dfb\u52a0NICE \u5185\u5d4c\u6c47\u7f16\u5934\u6587\u4ef6\u3001NICE CSR \u4f7f\u80fd\u7b49\u4ee3\u7801 \u6b64\u6587\u6863\u5c06\u91c7\u53d6\u524d\u4e00\u79cd\u65b9\u5f0f\u521b\u5efa\u5de5\u7a0b\uff0c\u7531\u4e8e\u6b64 demo \u4f1a\u7528\u5230 VNICE \u6307\u4ee4\uff0c\u6545\u521b\u5efa demo_vnice \u5de5\u7a0b\uff0c\u7136\u540e\u5c06 AES \u52a0\u89e3\u5bc6\u7a0b\u5e8f\u79fb\u690d\u66ff\u6362\u5230\u5176\u4e2d\u3002","title":"Model Profiling"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#step1-demo_vnice","text":"File->New->New Nuclei RISC-V C/C++ Project\uff0c\u9009\u62e9Nuclei FPGA Evalution Board->sdk-nuclei_sdk @0.6.0 \u6ce8\u610f\uff1a Nuclei SDK \u9700\u9009\u62e9 0.6.0 \u53ca\u4ee5\u540e\u7248\u672c","title":"step1\uff1a\u65b0\u5efa demo_vnice \u5de5\u7a0b"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#step2-demo_vnice-aes_demo","text":"\u79fb\u690d aes_demo \u65f6\uff0c\u9700\u8981\u4fdd\u7559 demo_vnice \u4e2d\u7684 insn.h \u5185\u5d4c\u6c47\u7f16\u5934\u6587\u4ef6\u6846\u67b6\uff0c\u65b9\u4fbf\u540e\u7eed\u6dfb\u52a0\u81ea\u5b9a\u4e49\u7684 NICE/VNICE \u6307\u4ee4\uff0c\u5728 main.c \u4e2d\u9700\u8981\u4fdd\u7559 NICE/VNICE \u6307\u4ee4\u6267\u884c\u524d\u7684 CSR \u4f7f\u80fd\u4ee3\u7801\uff1a __RV_CSR_SET(CSR_MSTATUS, MSTATUS_XS); \u5176\u4f59 demo_vnice \u5de5\u7a0b\u4e2d application \u539f\u59cb\u7528\u4f8b\u53ef\u5220\u9664\uff0c\u66ff\u6362\u6210 aes_demo \u7528\u4f8b\uff0c\u5f62\u6210\u5982\u4e0b\u76ee\u5f55\u7ed3\u6784\uff0c\u5e76\u786e\u4fdd\u80fd\u591f\u7f16\u8bd1\u901a\u8fc7\u3002 \u7528\u6237\u53ef\u4ee5\u4e0b\u8f7d\u6211\u4eec\u79fb\u690d\u597d\u7684 AES \u52a0\u89e3\u5bc6 demo\uff1a \u4f18\u5316\u524dAES\u5de5\u7a0b\u94fe\u63a5\u4e0b\u8f7d \u4e0b\u8f7d zip \u5305\u540e\uff0c\u53ef\u4ee5\u76f4\u63a5\u5bfc\u5165\u5230 Nuclei Studio \u4e2d\u8fd0\u884c(\u5bfc\u5165\u6b65\u9aa4\uff1a File->Import->Existing Projects into Workspace->Next->Select archive file->\u9009\u62e9zip\u538b\u7f29\u5305->next \u5373\u53ef)","title":"step2\uff1a\u57fa\u4e8e demo_vnice \u5de5\u7a0b\u79fb\u690d aes_demo \u88f8\u673a\u7528\u4f8b"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#step3model","text":"\u9996\u5148\u5c06 aes_debug.h \u4e2d\u7684 LOCAL_DEBUG \u6253\u5f00\uff0c\u51c6\u5907\u6d4b\u8bd5 AES \u7b97\u6cd5\u7684\u6574\u4f53 cycle \u6570\u3002 Nuclei Model \u4eff\u771f\u7a0b\u5e8f\u9700\u8981\u914d\u7f6e Nuclei Studio \u4e2d\u7684 RVProf \u8fd0\u884c\u914d\u7f6e\uff0c\u6253\u5f00 Nuclei Studio \u4e3b\u83dc\u5355\u680f\u7684 Run \u9009\u9879\u7684 Run Configurations \u540e\uff0c\u5148\u5728 Main \u9009\u9879\u5361\u4e2d\u9009\u62e9\u7f16\u8bd1\u597d\u7684 elf \u6587\u4ef6\u8def\u5f84\uff0c\u7136\u540e\u5728 RVProf \u9009\u9879\u5361 \u7684 Config options \u4e2d\u5b8c\u6210 model \u8fd0\u884c\u914d\u7f6e --trace=1 --gprof=1 --logdir=Debug \uff0c --trace=1 \u8868\u793a\u5f00\u542f rvtrace\uff0c --gprof=1 \u8868\u793a\u5f00\u542f gprof \u529f\u80fd\u751f\u6210 *.gmon \u6587\u4ef6\uff0c --logdir=Debug \u5219\u8868\u793a\u6700\u7ec8\u751f\u6210\u7684 *.rvtrace \u6587\u4ef6\u3001 *.gmon \u6587\u4ef6\u5b58\u5b58\u653e\u7684\u8def\u5f84\u4e3a\u5f53\u524d\u5de5\u7a0b\u4e0b\u7684 Debug \u76ee\u5f55\uff0c\u53d6\u6d88\u52fe\u9009 Start RVProf locally \uff0c\u7136\u540e\u70b9\u51fb Apply \u548c Run \uff0cmodel \u5c31\u5f00\u59cb\u8fd0\u884c\u7a0b\u5e8f\u4e86\u3002 \u5728 Console \u4e2d\u4f1a\u770b\u5230 Total elapsed time \u8bf4\u660e model \u5df2\u7ecf\u5b8c\u6210\u4eff\u771f\u4e86\uff0c\u5f97\u5230 AES \u7b97\u6cd5\u6574\u4f53\u6d88\u8017 154988 cycle\u3002 \u5c06 aes_debug.h \u4e2d\u7684 LOCAL_DEBUG \u5173\u6389\u53bb\u6389\u7a0b\u5e8f\u6253\u5370\uff0c\u4e3a\u4e86\u51c6\u786e\u6d4b\u8bd5 Profiling \u6570\u636e\uff0c\u786e\u4fdd Nuclei Studio \u7684 launch bar \u4e3a aes_demo Debug , \u91cd\u65b0 Run model\uff1a","title":"step3\uff1amodel \u4eff\u771f\u7a0b\u5e8f"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#step4-gprof","text":"model \u4eff\u771f\u7a0b\u5e8f\u5b8c\u6210\u540e\uff0c\u53cc\u51fb\u6253\u5f00\u751f\u6210\u7684 gprof*.gmon \u6587\u4ef6\uff0c\u5207\u6362\u5230\u51fd\u6570\u89c6\u56fe\uff0c\u70b9\u51fb % Time \u4ece\u9ad8\u5230\u4f4e\u6392\u5217\u51fd\u6570 CPU \u5360\u7528\u7387\u3002 \u6ce8\u610f\uff1a Time/Call \u663e\u793a\u7684\u662f\u6bcf\u4e2a\u51fd\u6570\u7684\u51fd\u6570\u4f53 text \u6bb5\u7684 cycle \u6570\uff0c\u5e76\u4e0d\u662f\u6574\u4e2a\u51fd\u6570\u7684 cycle \u6570\uff0c\u662f\u4e0d\u8ba1\u5165\u5176\u4e2d\u5b50\u51fd\u6570\u5360\u7528\u7684 cycle \u6570\u7684\u3002 \u4ece\u800c\u5f97\u5230 CPU \u5360\u7528\u7387\u6700\u9ad8\u7684 TOP5 \u70ed\u70b9\u51fd\u6570\u4e3a\uff1a aes_mix_columns_dec aes_mix_columns_enc aes_key_schedule aes_ecb_decrypt aes_ecb_encrypt \u6ce8\u610f\uff1a \u6b64\u65f6\u9700\u8981\u5907\u4efd\u5f53\u524d\u7684 aes_demo \u5de5\u7a0b\uff0c\u6539\u540d\u4e3a aes_demo_nice \u5de5\u7a0b\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728 Nuclei Studio \u4e2d\u540c\u65f6\u6253\u5f00\u4e24\u4e2a\u5de5\u7a0b\uff0c\u65b9\u4fbf\u6dfb\u52a0 NICE/VNICE \u6307\u4ee4\u4f18\u5316\u540e\u7684\u5de5\u7a0b\u548c\u539f aes_demo \u5de5\u7a0b\u8fdb\u884c Profiling \u6bd4\u8f83\u3002","title":"step4\uff1a\u89e3\u6790 gprof \u6570\u636e"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#step5nicevnice","text":"\u7528\u6237\u9700\u8981\u5728\u5907\u4efd\u7684 aes_demo_nice \u5de5\u7a0b\u4e0b\uff0c\u7814\u7a76\u70ed\u70b9\u51fd\u6570\u7b97\u6cd5\u7279\u70b9\uff0c\u5c06\u5176\u66ff\u6362\u4e3a NICE/VNICE \u6307\u4ee4\uff0c\u4ece\u800c\u63d0\u5347\u6574\u4f53\u7a0b\u5e8f\u6027\u80fd\u3002 \u5728\u5305\u542b AES \u52a0\u89e3\u5bc6\u7684 TOP5 \u70ed\u70b9\u51fd\u6570\u7684 aes_dec.c \u548c aes_dec.c \u4e24\u4e2aC\u6587\u4ef6\u4e2d #include \"insn.h\" \u4ee5\u4fbf\u6dfb\u52a0 NICE/VNICE \u6307\u4ee4\u66ff\u6362\u3002 TOP1 \u70ed\u70b9\u51fd\u6570\u4e3a aes_mix_columns_dec \uff0c\u5b9e\u73b0\u4e86 AES \u7b97\u6cd5\u89e3\u5bc6\u7684\u9006\u6df7\u5408\u5217\uff0c\u8f93\u5165\u4e00\u4e2a\u72b6\u6001\u77e9\u9635\uff0c\u7ecf\u8fc7\u8ba1\u7b97\u540e\u539f\u5730\u5740\u8f93\u51fa\u4e00\u4e2a\u8ba1\u7b97\u540e\u7684\u72b6\u6001\u77e9\u9635\uff0c\u5b9e\u73b0\u4e86 Load \u6570\u636e\u3001\u9006\u6df7\u5408\u8fd0\u7b97\u4ee5\u53ca Store \u6570\u636e\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a static void aes_mix_columns_dec( uint8_t pt[16] //!< Current block state ){ // Col 0 for(int i = 0; i < 4; i ++) { uint8_t b0,b1,b2,b3; uint8_t s0,s1,s2,s3; s0 = pt[4*i+0]; s1 = pt[4*i+1]; s2 = pt[4*i+2]; s3 = pt[4*i+3]; b0 = XTE(s0) ^ XTB(s1) ^ XTD(s2) ^ XT9(s3); b1 = XT9(s0) ^ XTE(s1) ^ XTB(s2) ^ XTD(s3); b2 = XTD(s0) ^ XT9(s1) ^ XTE(s2) ^ XTB(s3); b3 = XTB(s0) ^ XTD(s1) ^ XT9(s2) ^ XTE(s3); pt[4*i+0] = b0; pt[4*i+1] = b1; pt[4*i+2] = b2; pt[4*i+3] = b3; } } \u7531\u4e8e\u8f93\u5165\u8f93\u51fa\u5730\u5740\u4e00\u6837\uff0c\u53ef\u4ee5\u8003\u8651\u7528\u4e00\u6761 NICE \u6307\u4ee4\u66ff\u6362\uff0c\u6307\u4ee4\u7684 opcode \u3001 funct3 \u548c funct7 \u90fd\u53ef\u4ee5\u5728\u7f16\u7801\u4f4d\u57df\u4e2d\u81ea\u5b9a\u4e49\uff0c\u8be5\u6307\u4ee4\u8bbe\u7f6e opcode \u4e3a Custom-0 \uff0c funct3 \u8bbe\u7f6e\u4e3a0\uff0c funct7 \u8bbe\u7f6e\u4e3a0x10\uff0c\u5bc4\u5b58\u5668\u53ea\u4f7f\u7528\u5230 rs1 \u63cf\u8ff0\u5165\u53c2\u5730\u5740\uff0c\u4e0d\u9700\u8981\u4f7f\u7528 rd \u548c rs2 \uff0c\u6307\u4ee4\u5199\u5230 insn.h \u4e2d\uff0c\u5185\u5d4c\u6c47\u7f16\u5982\u4e0b\uff1a __STATIC_FORCEINLINE void custom_aes_mix_columns_dec(uint8_t* addr) { int zero = 0; asm volatile(\".insn r 0xb, 0, 0x10, x0, %1, x0\" : \"=r\"(zero) : \"r\"(addr)); } \u7528\u6237\u53ef\u4ee5\u5728 insn.h \u4e2d\u5b9a\u4e49\u4e00\u4e2a USE_NICE \u7684\u5b8f\u9009\u62e9\u662f\u5426\u4f7f\u7528 NICE \uff0c\u5728 aes_dec.c \u6539\u5199 aes_mix_columns_dec \u5982\u4e0b \uff1a static void aes_mix_columns_dec( uint8_t pt[16] //!< Current block state ){ #ifdef USE_NICE custom_aes_mix_columns_dec(pt); #else // Col 0 for(int i = 0; i < 4; i ++) { uint8_t b0,b1,b2,b3; uint8_t s0,s1,s2,s3; s0 = pt[4*i+0]; s1 = pt[4*i+1]; s2 = pt[4*i+2]; s3 = pt[4*i+3]; b0 = XTE(s0) ^ XTB(s1) ^ XTD(s2) ^ XT9(s3); b1 = XT9(s0) ^ XTE(s1) ^ XTB(s2) ^ XTD(s3); b2 = XTD(s0) ^ XT9(s1) ^ XTE(s2) ^ XTB(s3); b3 = XTB(s0) ^ XTD(s1) ^ XT9(s2) ^ XTE(s3); pt[4*i+0] = b0; pt[4*i+1] = b1; pt[4*i+2] = b2; pt[4*i+3] = b3; } #endif } TOP2 \u70ed\u70b9\u51fd\u6570\u4e3a aes_mix_columns_enc \uff0c\u548c TOP1 \u7c7b\u4f3c\uff0c\u5b9e\u73b0\u7684\u662f AES \u52a0\u5bc6\u7684\u9006\u6df7\u5408\u5217\uff0c\u540c\u6837\u4e5f\u662f\u8f93\u5165\u4e00\u4e2a\u72b6\u6001\u77e9\u9635\uff0c\u7ecf\u8fc7\u8ba1\u7b97\u540e\u539f\u5730\u5740\u8f93\u51fa\u4e00\u4e2a\u8ba1\u7b97\u540e\u7684\u72b6\u6001\u77e9\u9635\uff1a static void aes_mix_columns_enc( uint8_t ct [16] //!< Current block state ){ for(int i = 0; i < 4; i ++) { uint8_t b0,b1,b2,b3; uint8_t s0,s1,s2,s3; s0 = ct[4*i+0]; s1 = ct[4*i+1]; s2 = ct[4*i+2]; s3 = ct[4*i+3]; b0 = XT2(s0) ^ XT3(s1) ^ (s2) ^ (s3); b1 = (s0) ^ XT2(s1) ^ XT3(s2) ^ (s3); b2 = (s0) ^ (s1) ^ XT2(s2) ^ XT3(s3); b3 = XT3(s0) ^ (s1) ^ (s2) ^ XT2(s3); ct[4*i+0] = b0; ct[4*i+1] = b1; ct[4*i+2] = b2; ct[4*i+3] = b3; } } \u8003\u8651\u5230\u6307\u4ee4\u5b9e\u73b0\u53ef\u80fd\u65e0\u6cd5\u53ea\u75281\u6761\u6307\u4ee4\u5b8c\u6210\uff0c\u53ef\u4f7f\u75282\u6761 VNICE \u6307\u4ee4\u66ff\u6362\u6b64\u7b97\u6cd5\uff0c\u7b2c\u4e00\u6761 load 16 byte \u6570\u636e\u5230 Vector \u5bc4\u5b58\u5668\uff0c\u7b2c\u4e8c\u6761\u518d\u5b8c\u6210\u8ba1\u7b97\u4ee5\u53ca store\u3002 \u6307\u4ee4\u7684 opcode \u3001 funct3 \u548c funct7 \u4ecd\u7136\u53ef\u4ee5\u5728\u7f16\u7801\u4f4d\u57df\u4e2d\u81ea\u5b9a\u4e49\uff0c\u7b2c\u4e00\u6761\u6307\u4ee4\u4f7f\u7528 rd \u63cf\u8ff0 Vector \u5bc4\u5b58\u5668\uff0c rs1 \u63cf\u8ff0\u5165\u53c2\u5730\u5740\uff0c\u7b2c\u4e8c\u6761\u6307\u4ee4\u4f7f\u7528 rs1 \u63cf\u8ff0\u5165\u53c2\u5730\u5740\uff0c rs1 \u63cf\u8ff0\u5165\u53c2 Vector \u5bc4\u5b58\u5668\uff0c\u4e24\u6761 VNICE \u6307\u4ee4\u7684\u5185\u5d4c\u6c47\u7f16\u5199\u5230 insn.h \u4e2d\uff0c\u5b9a\u4e49\u5982\u4e0b\uff1a __STATIC_FORCEINLINE vint8m1_t __custom_vnice_load_v_i8m1 (uint8_t* addr) { vint8m1_t rdata ; asm volatile(\".insn r 0xb,4,0,%0,%1,x0\" : \"=vr\"(rdata) : \"r\"(addr) ); return rdata; } __STATIC_FORCEINLINE void __custom_vnice_aes_mix_columns_enc_i8m1 (uint8_t *addr, vint8m1_t data) { int zero = 0; asm volatile(\".insn r 0xb,4,1,x0,%1,%2\" : \"=r\"(zero) : \"r\"(addr) , \"vr\"(data) ); } \u7528\u6237\u901a\u8fc7\u5b9a\u4e49 Vector \u5bc4\u5b58\u5668\u4ee5\u53ca\u4f7f\u7528\u4e0a\u5b9a\u4e49\u597d\u7684 VNICE \u6307\u4ee4\u5185\u5d4c\u6c47\u7f16\u6539\u5199 aes_enc.c \u4e2d\u7684 aes_mix_columns_enc \u5982\u4e0b\uff1a static void aes_mix_columns_enc( uint8_t ct [16] //!< Current block state ){ #ifdef USE_NICE uint32_t blkCnt = 16; size_t l; vint8m1_t vin; for (; (l = __riscv_vsetvl_e8m1(blkCnt)) > 0; blkCnt -= l) { vin = __custom_vnice_load_v_i8m1(ct); __custom_vnice_aes_mix_columns_enc_i8m1(ct, vin); } #else for(int i = 0; i < 4; i ++) { uint8_t b0,b1,b2,b3; uint8_t s0,s1,s2,s3; s0 = ct[4*i+0]; s1 = ct[4*i+1]; s2 = ct[4*i+2]; s3 = ct[4*i+3]; b0 = XT2(s0) ^ XT3(s1) ^ (s2) ^ (s3); b1 = (s0) ^ XT2(s1) ^ XT3(s2) ^ (s3); b2 = (s0) ^ (s1) ^ XT2(s2) ^ XT3(s3); b3 = XT3(s0) ^ (s1) ^ (s2) ^ XT2(s3); ct[4*i+0] = b0; ct[4*i+1] = b1; ct[4*i+2] = b2; ct[4*i+3] = b3; } #endif } \u4fee\u6539\u540e\u7684\u7a0b\u5e8f\u4ee3\u7801\u7f16\u8bd1\u901a\u8fc7\uff1a( aes_demo_nice \u5de5\u7a0b)","title":"step5\uff1aNICE/VNICE \u6307\u4ee4\u66ff\u6362"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#step6-nuclei-model-nicevnice","text":"\u9996\u5148\u9700\u8981\u4e0b\u8f7d\u652f\u6301\u7528\u6237\u914d\u7f6e\u81ea\u5b9a\u4e49 NICE/VNICE \u6307\u4ee4\u7684\u539f\u59cb Nuclei Model \u8f6f\u4ef6\u5305 \u539f\u59cbmodel\u8f6f\u4ef6\u5305\u4e0b\u8f7d \uff0c\u89e3\u538b\u8f6f\u4ef6\u5305\u4e3a xlmodel_nice \uff0c\u7136\u540e\u5c06\u5176\u5bfc\u5165 Nuclei Studio\u3002 \u5bfc\u5165\u6b65\u9aa4\uff1aFile->Import->Projects from Folder or Archive->Next->Directory->\u9009\u62e9 xlmodel_nice ->Finish\u5373\u53ef \u5982\u4f55\u4f7f\u7528 Nuclei Model \u4ee5\u53ca\u67e5\u770b xlmodel_nice \u8f6f\u4ef6\u5305\u7684\u76ee\u5f55\u7ed3\u6784\u53ef\u4ee5\u53c2\u8003 Nuclei Model\u4ecb\u7ecd \uff0c xlmodel_nice \u662f\u7531CMake\u6784\u5efa\u7684\uff0c\u7528\u6237\u65e0\u9700\u4fee\u6539\u5373\u53ef\u7f16\u8bd1\uff0c\u5728 \u7f16\u8bd1\u524d\u9009\u62e9 Nuclei Studio \u7684 launch bar \u7684 xlmodel_nice \uff0c\u7136\u540e\u70b9\u51fb\u7f16\u8bd1\uff0c\u786e\u4fdd\u8f6f\u4ef6\u5305\u672c\u8eab\u7f16\u8bd1\u901a\u8fc7\uff0c\u7f16\u8bd1\u751f\u6210\u7684 elf \u6587\u4ef6\u6240\u5728\u8def\u5f84\u4e3a build/default/xl_cpumodel \uff1a \u6253\u5f00 nice.cc \u6587\u4ef6\uff0c\u7528\u6237\u9700\u8981\u7528\u8be5\u6587\u4ef6\u7684 do_nice \u51fd\u6570\u5b9e\u73b0\u6240\u6709\u81ea\u5b9a\u4e49\u7684 NICE/VNICE \u6307\u4ee4\uff0c\u5f53\u524d do_nice \u91cc\u5305\u542b\u4e86\u9488\u5bf9 demo_nice \u6216 demo_vnice \u7684 Nuclei\u5b9a\u4e49\u7684 NICE/VNICE \u6307\u4ee4\uff0c \u7528\u6237\u53ef\u4ee5\u53c2\u8003\u5176\u4e2d\u6ce8\u91ca\u5b8c\u6210\u81ea\u5df1\u7684\u81ea\u5b9a\u4e49\u6307\u4ee4\u3002 \u6ce8\u610f\uff1a \u5f53\u7528\u6237\u7f16\u5199\u81ea\u5b9a\u4e49 NICE/VNICE \u6307\u4ee4\u65f6\uff0c\u9700\u8981\u5173\u6389\u548c Nuclei demo_nice / demo_vnice \u5bf9\u5e94\u7684 NUCLEI_NICE_SCALAR / NUCLEI_NICE_VECTOR \u5b8f\uff0c\u4ee5\u514d\u548c\u7528\u6237\u81ea\u5b9a\u4e49\u7684\u6307\u4ee4\u7f16\u7801\u76f8\u51b2\u7a81\u3002 AES demo \u4e2d\u5b9a\u4e49\u7684 NICE/VNICE \u6307\u4ee4\u5b9e\u73b0\u5982\u4e0b\u56fe\uff0c\u901a\u8fc7\u6307\u4ee4\u7684 opcode \u3001 funct3 \u548c funct7 \u7f16\u5199\u6761\u4ef6\u5224\u65ad\u8bed\u53e5\u6307\u5b9a\u8be5\u6761\u6307\u4ee4\uff0c\u7136\u540e\u5728\u5176\u4e2d\u5b9e\u73b0\u6307\u4ee4\u884c\u4e3a\u4ee5\u53ca\u6307\u4ee4 cycle \u6570\u6dfb\u52a0\u3002 NICE \u6307\u4ee4\u5b9e\u73b0\u4e2d\uff0c MMU \u5b8f\u8868\u793a memory \u8bbf\u95ee\uff0cload memory \u4f7f\u7528 MMU.load_uint \uff0cstore memory \u4f7f\u7528 MMU.store_uint \uff0c RD \u3001 RS1 \u3001 RS2 \u3001 RS3 \u5b8f\u8868\u793a\u5176\u5bf9\u5e94\u6807\u91cf\u5bc4\u5b58\u5668\u4e2d\u7684\u503c\uff0c FRS1 \u3001 FRS2 \u3001 FRS3 \u5b8f\u8868\u793a\u5176\u5bf9\u5e94\u6d6e\u70b9\u5bc4\u5b58\u5668\u4e2d\u7684\u503c\uff0c\u8fd9\u4e9b\u5b8f\u7684\u4f7f\u7528\u53ef\u4ee5\u53c2\u8003 nice/inc/decode_macros.h \u3002 VNICE \u6307\u4ee4\u5b9e\u73b0\u4e2d\u4ecd\u7136\u662f\u7528 MMU \u5b8f\u8bbf\u95ee memory\uff0c\u53ea\u4e0d\u8fc7 Vector \u5bc4\u5b58\u5668\u6570\u636e\u4f1a\u5b58\u50a8\u5728 P.VU.elt \u7c7b\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u53c2\u8003 xlspike/include/riscv/v_ext_macros.h \u5b8c\u6210\u76f8\u5173\u4ee3\u7801\u7f16\u5199\u3002 \u5728\u6307\u4ee4\u5b9e\u73b0\u5b8c\u540e\uff0c\u5c06\u81ea\u5b9a\u4e49\u6307\u4ee4\u9700\u8981\u7684 cycle \u6570 n \u76f4\u63a5\u6807\u5b9a\uff1a STATE.mcycle->bump(n); \u5373\u53ef\uff0c\u8fd9\u91cc\u6839\u636e\u786c\u4ef6\u901a\u8fc7 NICE/VNICE \u5b9e\u73b0\u6b64\u7b97\u6cd5\u7684\u7406\u8bba\u503c\uff0c\u6807\u5b9a custom_aes_mix_columns_dec \u4e3a 7 cycle\uff0c __custom_vnice_load_v_i8m1 \u4e3a 1 cycle\uff0c __custom_vnice_aes_mix_columns_enc_i8m1 \u4e3a 2 cycle\u3002 \u4ee5\u4e0a\u4ecb\u7ecd\u4e86\u7528\u6237\u5982\u4f55\u4ece\u539f\u59cb Nuclei Model \u8f6f\u4ef6\u5305\u6dfb\u52a0\u81ea\u5b9a\u4e49 NICE/VNICE \u6307\u4ee4\uff0c\u63a5\u4e0b\u6765\u9700\u8981\u5c06\u65b0\u7f16\u8bd1\u51fa\u7684 model \u53ef\u6267\u884c\u7a0b\u5e8f\u5bfc\u5165\u5230 Nuclei Studio \u4e2d\uff0c\u4e3a\u4e86\u4e0d\u548c Nuclei Studio \u539f\u59cb model \u540d\u79f0\u6df7\u6dc6\uff0c\u53ef\u4ee5\u5c06 model \u5bfc\u5165\u5230 NucleiStudio/toolchain/nucleimodel/bin_aes/ \u7684\u521b\u5efa\u8def\u5f84\u4e0b\uff0c\u6211\u4eec\u63d0\u4f9b\u4e86\u4e24\u79cd model \u53ef\u6267\u884c\u7a0b\u5e8f\u83b7\u53d6\u65b9\u5f0f\uff1a \u5b9e\u73b0 AES demo NICE/VNICE \u6307\u4ee4\u7684 Nuclei model \u8f6f\u4ef6\u5305 \u6dfb\u52a0AES NICE\u6307\u4ee4model\u8f6f\u4ef6\u5305 \uff0c\u7f16\u8bd1\u540e\u5c06 xl_cpumodel \u53ef\u6267\u884c\u7a0b\u5e8f\u5bfc\u5165\u4e0a\u8ff0\u8def\u5f84\u3002 \u7f16\u8bd1\u597d\u7684 model \u7684\u53ef\u6267\u884c\u7a0b\u5e8f xl_cpumodel \uff0c\u76f4\u63a5\u5bfc\u5165\u4e0a\u8ff0\u8def\u5f84\u3002","title":"step6\uff1a\u5728 Nuclei Model \u4e2d\u5b9e\u73b0 NICE/VNICE \u6307\u4ee4"},{"location":"18-demonstrate_NICE_VNICE_acceleration_of_the_Nuclei_Model_through_profiling/#step7","text":"\u6ce8\u610f\uff1a \u8bf7\u52a1\u5fc5\u5b8c\u6210 step6 \u4e2d\u4ecb\u7ecd\u7684\u5b9e\u73b0\u4e86 NICE/VNICE \u6307\u4ee4\u7684 model \u5bfc\u5165 Nuclei Studio \u4e2d\u624d\u80fd\u7528 model Run aes_demo_nice \u5de5\u7a0b\u3002 \u9996\u5148\u6253\u5f00 Nuclei Studio \u4e3b\u83dc\u5355\u680f\u7684 Run \u9009\u9879\u7684 Run Configurations \uff0cmodel \u914d\u7f6e\u9700\u8981\u91cd\u65b0\u6dfb\u52a0\u4e00\u4efd Nuclei Studio \u4e2d\u7684 RVProf \u8fd0\u884c\u914d\u7f6e aes_demo_nice Debug \uff1a \u5c06 Main \u9009\u9879\u5361\u7684 Project \u901a\u8fc7 Browse \u6539\u4e3a aes_demo_nice \uff0c C/C++ Application \u901a\u8fc7 Search Project \u6539\u4e3a aes_demo_nice.elf : \u7136\u540e\u5c06 RVProf \u9009\u9879\u5361\u4e2d\u7684 model \u6267\u884c\u8def\u5f84 Executable path \u6539\u4e3a step6 \u4e2d\u65b0\u4fee\u6539 model \u7684\u6267\u884c\u8def\u5f84\uff1a .../NucleiStudio/toolchain/nucleimodel/bin_aes/xl_cpumodel : \u8fd0\u884c\u524d\u5c06 aes_debug.h \u4e2d\u7684 LOCAL_DEBUG \u6253\u5f00\uff0c\u6d4b\u8bd5\u4f18\u5316\u540e AES \u7b97\u6cd5\u7684\u6574\u4f53 cycle \u6570\uff0c\u9009\u62e9 Nuclei Studio \u7684 launch bar \u7684 aes_demo_nice Debug \u540e Run model\uff0c\u5f97\u5230 AES \u7b97\u6cd5\u4f18\u5316\u540e\u6574\u4f53\u6d88\u8017 cycle \u6570\u4ece\u4f18\u5316\u524d\u7684 154988 \u964d\u5230\u4e86 35619 cycle\u3002 \u5c06 aes_debug.h \u4e2d\u7684 LOCAL_DEBUG \u5173\u6389\u6d4b\u8bd5\u91cd\u65b0 Run model \u6d4b\u8bd5 Profiling \u6570\u636e\uff0c\u53cc\u51fb gprof0.gmon \u53ef\u4ee5\u770b\u5230 CPU \u5360\u7528\u7387\u8f83\u9ad8\u7684\u70ed\u70b9\u51fd\u6570\u5df2\u7ecf\u6ca1\u6709 aes_mix_columns_enc \u548c aes_mix_columns_dec \u4e86\uff1a \u641c\u7d22 aes_mix_columns_enc \u548c aes_mix_columns_dec \uff0cCPU \u5360\u7528\u7387 aes_mix_columns_enc \u4ece 8.05% \u964d\u5230\u4e86 2.93%\uff0c aes_mix_columns_dec \u4ece 57.87% \u964d\u5230\u4e86 0.5%\uff0c\u51fd\u6570 Time per Call \u6d88\u8017 cycle \u6570 aes_mix_columns_enc \u4ece 1141 cycle \u964d\u5230\u4e86 146 cycle\uff0c aes_mix_columns_dec \u4ece 8209 cycle \u964d\u5230\u4e86 25 cycle\uff0c\u8bf4\u660e\u4e86\u901a\u8fc7 NICE/VNICE \u6307\u4ee4\u66ff\u6362\u70ed\u70b9\u51fd\u6570\u53ef\u4ee5\u5927\u5e45\u63d0\u9ad8\u7a0b\u5e8f\u7b97\u6cd5\u6027\u80fd\u3002 \u6570\u636e\u7edf\u8ba1\u5982\u4e0b\uff1a( enc : aes_mix_columns_enc , dec : aes_mix_columns_dec ) Function Before Optimization NICE/VNICE Optimization CPU Usage % ( enc ) 8.05 2.93 CPU Usage % ( dec ) 57.87 0.5 Time per Call Cycles ( enc ) 1,141 146 Time per Call Cycles ( dec ) 8,209 25 AES Program Total Before Optimization NICE/VNICE Optimization Cycles 154,988 35,619 AES\u52a0\u89e3\u5bc6 NICE/VNICE demo\uff1a \u4f18\u5316\u540eAES\u5de5\u7a0b\u94fe\u63a5\u4e0b\u8f7d","title":"step7\uff1a\u70ed\u70b9\u51fd\u6570\u518d\u5206\u6790"},{"location":"2-qemu-glib-gio-unexpectedly/","text":"windows 11\u4e0b\u4f7f\u7528Nuclei Studio\u8fdb\u884cqemu\u8c03\u8bd5\u7a0b\u5e8f\u65f6\u62a5\u9519 \u00b6 windows 11\u4e0b\u4f7f\u7528Nuclei Studio\u5f00\u53d1\u65f6\uff0c\u5f53\u4f7f\u7528qemu\u8c03\u8bd5\u7a0b\u5e8f\u65f6,\u4f1a\u6709\u62a5\u9519\u5982\u4e0b\uff0c\u662f\u56e0\u4e3a\u5728windows 11\u4e0b\u7f3a\u5c11\u76f8\u5173\u4f9d\u8d56\uff0c\u4f46\u4e00\u822c\u4e0d\u5f71\u54cdqemu\u7684\u6b63\u786e\u4f7f\u7528\uff0c\u53ef\u4ee5\u5ffd\u7565\u6b64\u9519\u8bef\u3002 qemu-system-riscv32.exe: warning: GLib-GIO: Unexpectedly, UWP app `Microsoft.ScreenSketch_11.2309.16.0_x64__8wekyb3d8bbwe' (AUMId `Microsoft.ScreenSketch_8wekyb3d8bbwe!App') supports 29 extensions but has no verbs qemu-system-riscv32.exe: warning: GLib-GIO: Unexpectedly, UWP app `Clipchamp.Clipchamp_2.8.1.0_neutral__yxz26nhyzhsrt' (AUMId `Clipchamp.Clipchamp_yxz26nhyzhsrt!App') supports 41 extensions but has no verbs","title":"windows 11\u4e0b\u4f7f\u7528Nuclei Studio\u8fdb\u884cqemu\u8c03\u8bd5\u7a0b\u5e8f\u65f6\u62a5\u9519"},{"location":"2-qemu-glib-gio-unexpectedly/#windows-11nuclei-studioqemu","text":"windows 11\u4e0b\u4f7f\u7528Nuclei Studio\u5f00\u53d1\u65f6\uff0c\u5f53\u4f7f\u7528qemu\u8c03\u8bd5\u7a0b\u5e8f\u65f6,\u4f1a\u6709\u62a5\u9519\u5982\u4e0b\uff0c\u662f\u56e0\u4e3a\u5728windows 11\u4e0b\u7f3a\u5c11\u76f8\u5173\u4f9d\u8d56\uff0c\u4f46\u4e00\u822c\u4e0d\u5f71\u54cdqemu\u7684\u6b63\u786e\u4f7f\u7528\uff0c\u53ef\u4ee5\u5ffd\u7565\u6b64\u9519\u8bef\u3002 qemu-system-riscv32.exe: warning: GLib-GIO: Unexpectedly, UWP app `Microsoft.ScreenSketch_11.2309.16.0_x64__8wekyb3d8bbwe' (AUMId `Microsoft.ScreenSketch_8wekyb3d8bbwe!App') supports 29 extensions but has no verbs qemu-system-riscv32.exe: warning: GLib-GIO: Unexpectedly, UWP app `Clipchamp.Clipchamp_2.8.1.0_neutral__yxz26nhyzhsrt' (AUMId `Clipchamp.Clipchamp_yxz26nhyzhsrt!App') supports 41 extensions but has no verbs","title":"windows 11\u4e0b\u4f7f\u7528Nuclei Studio\u8fdb\u884cqemu\u8c03\u8bd5\u7a0b\u5e8f\u65f6\u62a5\u9519"},{"location":"3-print_memor_usage_in_ide/","text":"How to print memory usage in Nuclei Studio \u00b6 See this issue #4","title":"How to print memory usage in Nuclei Studio"},{"location":"3-print_memor_usage_in_ide/#how-to-print-memory-usage-in-nuclei-studio","text":"See this issue #4","title":"How to print memory usage in Nuclei Studio"},{"location":"4-use_pre_build_or_post_build/","text":"\u5728\u7f16\u8bd1\u5de5\u7a0b\u65f6\uff0c\u4f7f\u7528\u4e86Pre-build Command/Post-build Command\u65f6\u62a5\u9519 \u00b6 \u5728 Nuclei Studio 2023.10.17\u4e0a\u4f20\u76842023.10 \u66f4\u6b63\u7248\u672c\u4e2d\u4fee\u6b63\uff0c\u53c2\u89c1 \u672c\u6587 \u53c2\u89c1 eclipse-embed-cdt/eclipse-plugins#597 \u5728Nuclei Studio 2023.10\u7248\u672c\u4e2d\uff0c\u5982\u679c\u5728\u5de5\u7a0b\u7f16\u8bd1\u4e2d\u9700\u8981\u4f7f\u7528\u5230Pre-build Command/Post-build Command, \u56e0Nuclei Studio\u4e2d\u96c6\u6210\u7684build-tools\u4e3av4.4.0\u7248\u672c\uff0c\u800c\u4e0a\u6e38CDT\u4e2d\u5728\u5904\u7406Pre-build Command/Post-build Command\u7684\u65b9\u6cd5\uff0c\u5728build-tools v4.4.0\u65e0\u6cd5\u6b63\u5e38\u4f7f\u7528\uff0c\u6240\u4ee5\u4f1a\u51fa\u73b0\u62a5\u9519\u95ee\u9898\u3002 \u9047\u5230\u8fd9\u79cd\u60c5\u51b5\u65f6\uff0c\u53ef\u4ee5\u4e0b\u8f7d https://www.nucleisys.com/upload/files/toochain/build-tools/build-tools_202002.zip \uff0c\u5e76\u66ff\u6362\u5de5\u5177\u94fe\u4e2d\u7684build-tools\uff0c\u95ee\u9898\u53ef\u4ee5\u5f97\u5230\u89e3\u51b3\u3002 NucleiStudio\\toolchain\\build-tools","title":"\u5728\u7f16\u8bd1\u5de5\u7a0b\u65f6\uff0c\u4f7f\u7528\u4e86Pre-build Command/Post-build Command\u65f6\u62a5\u9519"},{"location":"4-use_pre_build_or_post_build/#pre-build-commandpost-build-command","text":"\u5728 Nuclei Studio 2023.10.17\u4e0a\u4f20\u76842023.10 \u66f4\u6b63\u7248\u672c\u4e2d\u4fee\u6b63\uff0c\u53c2\u89c1 \u672c\u6587 \u53c2\u89c1 eclipse-embed-cdt/eclipse-plugins#597 \u5728Nuclei Studio 2023.10\u7248\u672c\u4e2d\uff0c\u5982\u679c\u5728\u5de5\u7a0b\u7f16\u8bd1\u4e2d\u9700\u8981\u4f7f\u7528\u5230Pre-build Command/Post-build Command, \u56e0Nuclei Studio\u4e2d\u96c6\u6210\u7684build-tools\u4e3av4.4.0\u7248\u672c\uff0c\u800c\u4e0a\u6e38CDT\u4e2d\u5728\u5904\u7406Pre-build Command/Post-build Command\u7684\u65b9\u6cd5\uff0c\u5728build-tools v4.4.0\u65e0\u6cd5\u6b63\u5e38\u4f7f\u7528\uff0c\u6240\u4ee5\u4f1a\u51fa\u73b0\u62a5\u9519\u95ee\u9898\u3002 \u9047\u5230\u8fd9\u79cd\u60c5\u51b5\u65f6\uff0c\u53ef\u4ee5\u4e0b\u8f7d https://www.nucleisys.com/upload/files/toochain/build-tools/build-tools_202002.zip \uff0c\u5e76\u66ff\u6362\u5de5\u5177\u94fe\u4e2d\u7684build-tools\uff0c\u95ee\u9898\u53ef\u4ee5\u5f97\u5230\u89e3\u51b3\u3002 NucleiStudio\\toolchain\\build-tools","title":"\u5728\u7f16\u8bd1\u5de5\u7a0b\u65f6\uff0c\u4f7f\u7528\u4e86Pre-build Command/Post-build Command\u65f6\u62a5\u9519"},{"location":"5-update_npk_to_support_nucleistudio_202310/","text":"\u5347\u7ea7npk.yml\u4ee5\u652f\u6301Nuclei Studio 2023.10 \u00b6 \u5728Nuclei Studio 2023.10\u4e2d\uff0c\u4e00\u4e2a\u91cd\u8981\u53d8\u66f4\uff0c\u662f\u652f\u6301GCC 13, \u6240\u4ee5\u4e4b\u524d\u53d1\u5e03\u7684NPK Package\u4e5f\u9700\u8981\u505a\u5bf9\u5e94\u7684\u53d8\u66f4\uff0c\u4ee5\u66f4\u597d\u7684\u9002\u7528\u4e8eNuclei Studio 2023.10\uff0c\u5176\u4e2d\u6709\u4ee5\u4e0b\u51e0\u4e2a\u53d8\u66f4\u70b9\u3002 \u9700\u8981\u6ce8\u610f\u65b0\u7248\u7684npk.yml \u4e0d\u518d\u652f\u6301\u4ee5\u524d 2022.12\u7248\u672c\u7684IDE npk.yml\u4e2d\u7684\u5de5\u5177\u94fe\u5347\u7ea7 \u00b6 \u5728npk\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86buildconfig\u6765\u81ea\u5b9a\u4e49\u5de5\u7a0bbuild\u65f6\u7684\u5404\u79cd\u53c2\u6570\uff0cNuclei Studio\u901a\u8fc7type\u6807\u8bc6\u4f7f\u7528\u7684\u662f\u90a3\u4e00\u79cdtoolchain\uff0c\u5982gcc\u3001clang\u7b49\uff0c \u901a\u8fc7 type-> toolchain_name & cross_prefix \u6765\u6807\u8bc6\u4f7f\u7528\u7684toolchain\u91cc\u9762\u5177\u4f53\u7684\u90a3\u4e2a\u53d1\u884c\u7248\u672c\u3002\u5347\u7ea7SDK\u4ee5\u652f\u6301GCC 13\uff0c\u5bf9\u6bd4\u4ee5\u4e0b\u4e24\u4e2a\u4f8b\u5b50\u4e0d\u96be\u770b\u51fa\uff0c \u53ea\u9700\u8981\u4fee\u6539 toolchain_name: RISC-V GCC/Newlib \u548c cross_prefix: riscv64-unknown-elf- \uff0c\u5c31\u53ef\u4ee5\u4f7fSDK\u652f\u6301\u5728\u521b\u5efa\u5de5\u7a0b\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9GCC 13\u5de5\u5177\u94fe\u3002 \u4ee5\u4e0b\u5185\u5bb9\u662f\u652f\u6301gcc 10 \u7684buildconfig\u914d\u7f6e\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09\u3002 ## Build Configuration buildconfig: - type: gcc description: Nuclei GNU Toolchain cross_prefix: riscv-nuclei-elf- # optional common_flags: # flags need to be combined together across all packages ldflags: cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: \u4e0b\u4ee5\u5185\u5bb9\uff0c\u662f\u652f\u6301GCC 13\u548cClang\u7684 buildconfig \u914d\u7f6e\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09\u3002 ## Build Configuration buildconfig: - type: gcc description: Nuclei GNU Toolchain # \u5347\u7ea7\u5230 GCC13\u65f6\uff0c\u8fd9\u91cc\u8fdb\u884c\u5982\u4e0b\u4e24\u884c\u7684\u6539\u53d8 # \u4e14\u9488\u5bf9\u6240\u6709npk.yml\u7684\u6587\u4ef6\u53ea\u8981\u5305\u542bbuildconfig\u7684\u90fd\u9700\u8981\u8fdb\u884c\u4fee\u6539\uff0c\u4e0d\u4ec5\u4ec5\u9650\u4e8essp/bsp\u7c7b\u578b\uff0c\u8fd8\u5305\u62ecbsp/app/mwp/osp/sdk\u7c7b\u578b toolchain_name: RISC-V GCC/Newlib cross_prefix: riscv64-unknown-elf- # optional common_flags: # flags need to be combined together across all packages ldflags: cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: - type: clang description: Nuclei LLVM Toolchain toolchain_name: RISC-V Clang/Newlib cross_prefix: riscv64-unknown-elf- # optional common_flags: # flags need to be combined together across all packages ldflags: cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: \u9664\u6807\u51c6\u7684IMAFDC\u4e4b\u5916\u7684\u6269\u5c55(ARCHEXT)\u7684\u5347\u7ea7 \u00b6 \u4ee5\u4e0b\u793a\u4f8b\u4ee5Nuclei SDK 0.5.0\u7684evalsoc\u7684npk.yml\u5347\u7ea7\u4e3e\u4f8b\uff0c \u4ec5\u8003\u8651GCC\u7684\u652f\u6301\uff0c\u5982\u679c\u9700\u8981\u8003\u8651CLANG\u7684\u652f\u6301\uff0c\u8bf7\u53c2\u89c1 SDK\u4e2devalsoc\u7684npk.yml\u7684\u8be6\u7ec6\u53d8\u66f4 \u5728GCC 13\u4e2d\uff0c\u5bf9RISC-V \u6307\u4ee4\u6269\u5c55\u4f7f\u7528\u6709\u4e86\u5f88\u5927\u7684\u53d8\u66f4\uff0c\u5177\u4f53\u5185\u5bb9\u53ef\u4ee5\u67e5\u770bNuclei Studio\u7528\u6237\u624b\u518c2.1.4\u7ae0\u5185\u5bb9\u548cNuclei SDK\u4e2d ARCH_EXT \u8bf4\u660e\u3002 Nuclei Studio\u7528\u6237\u624b\u518c ARCH_EXT\u8bf4\u660e \u5347\u7ea7npk.yml\u65f6\uff0c\u5982\u679cSDK\u4e2d\u4f7f\u7528\u5230\u4e86RISC-V \u9664\u4e86\u6807\u51c6\u7684 IMAFDC \u4e4b\u5916\u6307\u4ee4\u6269\u5c55\uff0c\u4f8b\u5982 B/P/K/V \uff0c \u4e5f\u9700\u8981\u5347\u7ea7\u5bf9\u5e94\u7684\u914d\u7f6e\u3002 \u5728NPK\u4e2d\uff0cRISC-V \u6307\u4ee4\u6269\u5c55\u4ee5\u662f -march=xxx \u7684\u65b9\u5f0f\u4f20\u9012\u7ed9Nuclei Studio\uff0cNuclei Studio\u63a5\u6536\u5230\u76f8\u5173\u914d\u7f6e\uff0c\u5c31\u4f1a\u5b58\u50a8\u5e76\u5e94\u7528\u5230\u7f16\u8bd1\u7684\u8fc7\u7a0b\u4e2d\u3002 \u4ee5Nuclei SDK\u4e2d\u7684npk.yml\u4e3a\u4f8b\uff0c\u901a\u8fc7\u4e0b\u9762\u8fd9\u6bb5\u914d\u7f6e\u6211\u4eec\u5c31\u53ef\u4ee5\u5f97\u5230 -march= \u7684\u503c\uff0c\u4e0d\u96be\u770b\u51fa\u4e0eRISC-V\u6307\u4ee4\u6269\u5c55\u76f8\u5173\u7684\u662fNPK\u4e2d\u7684\u53d8\u91cf nuclei_archext \u3002 ## \uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 ## Build Configuration buildconfig: - type: gcc description: Nuclei RISC-V GNU Toolchain #must cross_prefix: riscv-nuclei-elf- # optional common_flags: # flags need to be combined together across all packages # \u8fd9\u91cc -march \u4f20\u9012\u7684\u503c \u5c31\u662f nuclei_core.arch \u548c nuclei_archext \u4e24\u4e2a\u53d8\u91cf\u62fc\u63a5\u800c\u6765 # \u4f8b\u5982 nuclei_core.arch\u8bbe\u7f6e\u4e3arv32imafdc, nuclei_archext\u8bbe\u7f6e\u4e3a _zba_zbb_zbc_zbs_xxldspn1x, # \u90a3\u4e48 \u4f20\u9012\u7684\u5c31\u662f -march=rv32imafdc_zba_zbb_zbc_zbs_xxldspn1x # \u5982\u679c\u4f60\u7684 march\u662f\u5df2\u77e5\u548c\u786e\u5b9a\u7684\uff0c\u8fd9\u91cc\u76f4\u63a5\u5c31\u53ef\u4ee5\u7ed9\u5b9a -march/-mabi\u7684\u9009\u9879\uff0c\u65e0\u9700\u901a\u8fc7 configuration\u5b57\u6bb5\u6765\u8fdb\u884c\u4f20\u9012 - flags: -march=${nuclei_core.arch}$(join(${nuclei_archext},'')) -mabi=${nuclei_core.abi} ldflags: cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: \u5728\u65e7\u7248\u7684SDK\u4e2d\uff0cnuclei_archext\u5b9a\u4e49\u7684\u662f\u4e00\u4e2a multicheckbox \uff0c\u7528\u6237\u53ef\u4ee5\u81ea\u5df1\u9009\u62e9\uff0c\u800c\u5728\u65b0\u7248\u7684SDK\u4e2d nuclei_archext \u5b9a\u4e49\u7684\u662f\u4e00\u4e2a text \u8f93\u5165\u6846\uff0c \u8fd9\u6837\u7528\u6237\u53ef\u4ee5\u66f4\u7075\u6d3b\u7684\u4f7f\u7528RISC-V \u6307\u4ee4\u6269\u5c55\uff0c\u5982\u679c\u5728\u67d0\u4e9b\u5de5\u7a0b\u6216\u573a\u666f\u4e0b\uff0c\u60f3\u8981\u9884\u8bbe\u4e00\u4e9bRISC-V \u6307\u4ee4\u6269\u5c55\uff0c\u5efa\u8bae\u7ed9\u4e00\u4e2a\u9ed8\u8ba4\u503c\u5c31\u53ef\u4ee5\u4e86\uff0c\u53ef\u4ee5\u53c2\u8003\u4e0b\u4ee3\u7684\u793a\u4f8b\u4ee3\u7801\u3002 \u7528\u4e8e\u652f\u6301 Nuclei RISC-V Toolchain 2022.12 \u7684\u5199\u6cd5 ## \u65e7\u7248\u7684SDK\u4e2d\uff0cnuclei_archext\u5b9a\u4e49\u7684\u662f\u4e00\u4e2amulticheckbox ##\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 nuclei_archext: default_value: [] type: multicheckbox global: true description: Nuclei ARCH Extensions choices: - name: b description: Bitmanip Extension - name: p description: Packed SIMD Extension - name: v description: Vector Extension \u7528\u4e8e\u652f\u6301 Nuclei RISC-V Toolchain 2023.10 \u7684\u5199\u6cd5 ## \u65b0\u7248\u7684SDK\u4e2dnuclei_archext\u5b9a\u4e49\u7684\u662f\u4e00\u4e2atext\u8f93\u5165\u6846 ## Package Configurations configuration: nuclei_archext: default_value: \"_zba_zbb_zbc_zbs\" type: text global: true # hints and tips are introduced in Nuclei Studio 2023.10 # used to show tool tips and input hints tips: \"Possible other ISA extensions, seperated by underscores, like '_zba_zbb_zbc_zbs_xxldspn1x'\" hints: \"_zba_zbb_zbc_zbs_xxldspn1x\" description: Nuclei ARCH Extensions \u6700\u7ec8\u663e\u793a\u521b\u5efa\u9879\u76ee\u7684\u65f6\u5019\u663e\u793a\u6548\u679c\u5982\u4e0b libncrt\u7684\u5347\u7ea7 \u00b6 libncrt\u8f83\u4e4b\u524d\u4e5f\u6709\u4e86\u4e9b\u8bb8\u53d8\u5316\uff0c\u5728NPK\u4e2d\u4f7f\u7528libncrt\u4e4b\u524d\uff0c\u65b0\u65e7\u7248SDK\u4e2d\u90fd\u662f\u4e00\u6837\u7684\u5728 conifguration \u4e2d\u5b9a\u4e49\u4e86\u4e00\u4e2a\u53d8\u91cf stdclib \uff0c \u5b83\u7684\u503c\u662f\u4e00\u4e2a\u4e0b\u62c9\u6846\uff0c\u53ef\u4ee5\u9009\u62e9\u4e0d\u540c\u7684\u503c\u3002\u4e0d\u540c\u70b9\u662f\u5728\u5f97\u5230 stdclib \u540e\uff0c\u5728 common_flags \u6216\u8005\u5176\u5b83\u5730\u65b9\u4f7f\u7528 stdclib \u65f6\u7565\u6709\u4e0d\u540c\u3002 \u5173\u4e8e stdclib \u7684\u4e00\u4e9b\u8bf4\u660e\uff0c\u53ef\u4ee5\u53c2\u89c1 \u8fd9\u91cc ## \u5b9a\u4e49stdclib\u53d8\u91cf ##\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 ## Package Configurations configuration: stdclib: default_value: newlib_nano type: choice global: true description: Standard C Library choices: - name: newlib_full description: newlib with full feature - name: newlib_fast description: newlib nano with printf/scanf float - name: newlib_small description: newlib nano with printf float - name: newlib_nano description: newlib nano without printf/scanf float - name: libncrt_fast description: nuclei c runtime library, optimized for speed - name: libncrt_balanced description: nuclei c runtime library, balanced, full feature - name: libncrt_small description: nuclei c runtime library, optimized for size, full feature - name: libncrt_nano description: nuclei c runtime library, optimized for size, no float support - name: libncrt_pico description: nuclei c runtime library, optimized for size, no long/long long support - name: nostd description: no std c library will be used, and don't search the standard system directories for header files - name: nospec description: no std c library will be used, not pass any --specs options \u5728\u65b0\u7248\u7684SDK\u4e2d\uff0c\u5982\u679c\u4f7f\u7528 --specs=libncrt_xxx.specs \u6216\u8005\u94fe\u63a5\u5e93\u91cc\u9762\u5305\u542b -lncrt_xxx \uff08\u8868\u793a\u91c7\u7528libncrt c\u5e93\uff09\uff0c \u5219\u9700\u53d8\u66f4\u4e3a -lncrt_xxx -lfileops_uart -lheapops_basic \uff0c\u8fd9\u4e5f\u662f\u65e7SDK\u53d8\u66f4\u4e3a\u652f\u6301GCC 13\u7684\u65b0SDK\u7684\u539f\u5219\u3002 \u4e0b\u9762\u914d\u7f6e\u4e3a\u5728\u65e7\u7248SDK\u4e2d\u7684npk\u53d8\u91cfstdclib,\u5f53\u53d8\u91cfstdclib\u4ee5libncrt\u5f00\u5934\u65f6\uff0c\u4f1a\u76f4\u63a5\u5b9a\u4e49\u4e00\u4e2a --specs=${stdclib}.specs \uff0c \u6309\u7167\u4e0a\u9762\u6211\u4eec\u8bf4\u7684\u539f\u5219\uff0c\u8fd9\u91cc\u5e94\u8be5\u53d8\u6210\u8bbe\u7f6e -l$(subst(${stdclib},lib,)) -lfileops_uart -lheapops_basic \uff0c\u6240\u4ee5\u5728\u65b0\u7248SDK\u4e2d\u7684\u5199\u6cd5\u5c31\u53d8\u6210\u4e86\u4e0b\u9762\u7684\u914d\u7f6e\u65b9\u5f0f\u3002 ## \u5728\u65e7\u7248SDK\u4e2d\u4f7f\u7528stdclib\u53d8\u91cf ##\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 ## Build Configuration buildconfig: - type: gcc description: Nuclei GNU Toolchain cross_prefix: riscv-nuclei-elf- # optional common_flags: # flags need to be combined together across all packages - flags: --specs=${stdclib}.specs condition: $( startswith(${stdclib}, \"libncrt\") ) ldflags: cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: \u8f6c\u53d8\u4e3a ## \u5728\u65b0\u7248SDK\u4e2d\u4f7f\u7528stdclib\u53d8\u91cf ##\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 ## Build Configuration buildconfig: - type: gcc description: Nuclei GNU Toolchain toolchain_name: RISC-V GCC/Newlib cross_prefix: riscv64-unknown-elf- # optional common_flags: # flags need to be combined together across all packages - flags: --specs=${stdclib}.specs condition: $( startswith(${stdclib}, \"libncrt\") ) ldflags: - flags: -l$(subst(${stdclib},lib,)) -lheapops_basic -lfileops_uart condition: $( startswith(${stdclib}, \"libncrt\") ) cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: Link Warning\u7684\u6d88\u9664 \u00b6 \u5728Nuclei Studio 2023.10\u4e2d\u96c6\u6210\u7684GCC 13,\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4f1a\u6709warning\uff0c\u94fe\u63a5\u9009\u9879\u589e\u52a0\u4e00\u4e2a -Wl,--no-warn-rwx-segments \u53ef\u4ee5\u9690\u85cfwarning\u3002 \u5177\u4f53\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u914d\u7f6e\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 ## Build Configuration buildconfig: - type: gcc description: Nuclei GNU Toolchain toolchain_name: RISC-V GCC/Newlib cross_prefix: riscv64-unknown-elf- # optional common_flags: # flags need to be combined together across all packages ldflags: # \u7528\u4e8e\u6d88\u9664gcc13\u94fe\u63a5\u9636\u6bb5\u7684warning - flags: -Wl,--no-warn-rwx-segments cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: \u5173\u4e8eNuclei SDK 0.5.0 npk.yml \u8be6\u7ec6\u53d8\u66f4 \u00b6 \u5173\u4e8e\u652f\u6301Nuclei Studio + Nuclei RISC-V Toolchain 2023.10\u7684npk.yml\u53d8\u66f4\uff0c\u53ef\u4ee5\u53c2\u8003nuclei-sdk 0.5.0\u7684\u53d8\u66f4\u3002 gd32vf103\u7684\u53d8\u5316 git diff 0.4.1..0.5.0 SoC/gd32vf103/***npk.yml evalsoc\u7684\u53d8\u5316: git diff 0.4.1..0.5.0 SoC/evalsoc/***npk.yml NMSIS\u7684\u53d8\u5316: git diff 0.4.1..0.5.0 NMSIS/***npk.yml application\u7684\u53d8\u5316: git diff 0.4.1..0.5.0 application/***npk.yml RTOS\u7684\u53d8\u5316: git diff 0.4.1..0.5.0 OS/***npk.yml \u6267\u884c\u67e5\u770b\u4ee3\u7801\u53d8\u66f4\u547d\u4ee4\u65b9\u6cd5\u5982\u4e0b git clone https://github.com/Nuclei-Software/nuclei-sdk/ cd nuclei-sdk git fetch --all git diff 0.4.1..0.5.0 SoC/gd32vf103/***npk.yml git diff 0.4.1..0.5.0 SoC/evalsoc/***npk.yml git diff 0.4.1..0.5.0 NMSIS/***npk.yml git diff 0.4.1..0.5.0 application/***npk.yml git diff 0.4.1..0.5.0 OS/***npk.yml","title":"\u5347\u7ea7npk.yml\u4ee5\u652f\u6301Nuclei Studio 2023.10"},{"location":"5-update_npk_to_support_nucleistudio_202310/#npkymlnuclei-studio-202310","text":"\u5728Nuclei Studio 2023.10\u4e2d\uff0c\u4e00\u4e2a\u91cd\u8981\u53d8\u66f4\uff0c\u662f\u652f\u6301GCC 13, \u6240\u4ee5\u4e4b\u524d\u53d1\u5e03\u7684NPK Package\u4e5f\u9700\u8981\u505a\u5bf9\u5e94\u7684\u53d8\u66f4\uff0c\u4ee5\u66f4\u597d\u7684\u9002\u7528\u4e8eNuclei Studio 2023.10\uff0c\u5176\u4e2d\u6709\u4ee5\u4e0b\u51e0\u4e2a\u53d8\u66f4\u70b9\u3002 \u9700\u8981\u6ce8\u610f\u65b0\u7248\u7684npk.yml \u4e0d\u518d\u652f\u6301\u4ee5\u524d 2022.12\u7248\u672c\u7684IDE","title":"\u5347\u7ea7npk.yml\u4ee5\u652f\u6301Nuclei Studio 2023.10"},{"location":"5-update_npk_to_support_nucleistudio_202310/#npkyml","text":"\u5728npk\u4e2d\uff0c\u6211\u4eec\u5b9a\u4e49\u4e86buildconfig\u6765\u81ea\u5b9a\u4e49\u5de5\u7a0bbuild\u65f6\u7684\u5404\u79cd\u53c2\u6570\uff0cNuclei Studio\u901a\u8fc7type\u6807\u8bc6\u4f7f\u7528\u7684\u662f\u90a3\u4e00\u79cdtoolchain\uff0c\u5982gcc\u3001clang\u7b49\uff0c \u901a\u8fc7 type-> toolchain_name & cross_prefix \u6765\u6807\u8bc6\u4f7f\u7528\u7684toolchain\u91cc\u9762\u5177\u4f53\u7684\u90a3\u4e2a\u53d1\u884c\u7248\u672c\u3002\u5347\u7ea7SDK\u4ee5\u652f\u6301GCC 13\uff0c\u5bf9\u6bd4\u4ee5\u4e0b\u4e24\u4e2a\u4f8b\u5b50\u4e0d\u96be\u770b\u51fa\uff0c \u53ea\u9700\u8981\u4fee\u6539 toolchain_name: RISC-V GCC/Newlib \u548c cross_prefix: riscv64-unknown-elf- \uff0c\u5c31\u53ef\u4ee5\u4f7fSDK\u652f\u6301\u5728\u521b\u5efa\u5de5\u7a0b\u65f6\uff0c\u53ef\u4ee5\u9009\u62e9GCC 13\u5de5\u5177\u94fe\u3002 \u4ee5\u4e0b\u5185\u5bb9\u662f\u652f\u6301gcc 10 \u7684buildconfig\u914d\u7f6e\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09\u3002 ## Build Configuration buildconfig: - type: gcc description: Nuclei GNU Toolchain cross_prefix: riscv-nuclei-elf- # optional common_flags: # flags need to be combined together across all packages ldflags: cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: \u4e0b\u4ee5\u5185\u5bb9\uff0c\u662f\u652f\u6301GCC 13\u548cClang\u7684 buildconfig \u914d\u7f6e\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09\u3002 ## Build Configuration buildconfig: - type: gcc description: Nuclei GNU Toolchain # \u5347\u7ea7\u5230 GCC13\u65f6\uff0c\u8fd9\u91cc\u8fdb\u884c\u5982\u4e0b\u4e24\u884c\u7684\u6539\u53d8 # \u4e14\u9488\u5bf9\u6240\u6709npk.yml\u7684\u6587\u4ef6\u53ea\u8981\u5305\u542bbuildconfig\u7684\u90fd\u9700\u8981\u8fdb\u884c\u4fee\u6539\uff0c\u4e0d\u4ec5\u4ec5\u9650\u4e8essp/bsp\u7c7b\u578b\uff0c\u8fd8\u5305\u62ecbsp/app/mwp/osp/sdk\u7c7b\u578b toolchain_name: RISC-V GCC/Newlib cross_prefix: riscv64-unknown-elf- # optional common_flags: # flags need to be combined together across all packages ldflags: cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: - type: clang description: Nuclei LLVM Toolchain toolchain_name: RISC-V Clang/Newlib cross_prefix: riscv64-unknown-elf- # optional common_flags: # flags need to be combined together across all packages ldflags: cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description:","title":"npk.yml\u4e2d\u7684\u5de5\u5177\u94fe\u5347\u7ea7"},{"location":"5-update_npk_to_support_nucleistudio_202310/#imafdcarchext","text":"\u4ee5\u4e0b\u793a\u4f8b\u4ee5Nuclei SDK 0.5.0\u7684evalsoc\u7684npk.yml\u5347\u7ea7\u4e3e\u4f8b\uff0c \u4ec5\u8003\u8651GCC\u7684\u652f\u6301\uff0c\u5982\u679c\u9700\u8981\u8003\u8651CLANG\u7684\u652f\u6301\uff0c\u8bf7\u53c2\u89c1 SDK\u4e2devalsoc\u7684npk.yml\u7684\u8be6\u7ec6\u53d8\u66f4 \u5728GCC 13\u4e2d\uff0c\u5bf9RISC-V \u6307\u4ee4\u6269\u5c55\u4f7f\u7528\u6709\u4e86\u5f88\u5927\u7684\u53d8\u66f4\uff0c\u5177\u4f53\u5185\u5bb9\u53ef\u4ee5\u67e5\u770bNuclei Studio\u7528\u6237\u624b\u518c2.1.4\u7ae0\u5185\u5bb9\u548cNuclei SDK\u4e2d ARCH_EXT \u8bf4\u660e\u3002 Nuclei Studio\u7528\u6237\u624b\u518c ARCH_EXT\u8bf4\u660e \u5347\u7ea7npk.yml\u65f6\uff0c\u5982\u679cSDK\u4e2d\u4f7f\u7528\u5230\u4e86RISC-V \u9664\u4e86\u6807\u51c6\u7684 IMAFDC \u4e4b\u5916\u6307\u4ee4\u6269\u5c55\uff0c\u4f8b\u5982 B/P/K/V \uff0c \u4e5f\u9700\u8981\u5347\u7ea7\u5bf9\u5e94\u7684\u914d\u7f6e\u3002 \u5728NPK\u4e2d\uff0cRISC-V \u6307\u4ee4\u6269\u5c55\u4ee5\u662f -march=xxx \u7684\u65b9\u5f0f\u4f20\u9012\u7ed9Nuclei Studio\uff0cNuclei Studio\u63a5\u6536\u5230\u76f8\u5173\u914d\u7f6e\uff0c\u5c31\u4f1a\u5b58\u50a8\u5e76\u5e94\u7528\u5230\u7f16\u8bd1\u7684\u8fc7\u7a0b\u4e2d\u3002 \u4ee5Nuclei SDK\u4e2d\u7684npk.yml\u4e3a\u4f8b\uff0c\u901a\u8fc7\u4e0b\u9762\u8fd9\u6bb5\u914d\u7f6e\u6211\u4eec\u5c31\u53ef\u4ee5\u5f97\u5230 -march= \u7684\u503c\uff0c\u4e0d\u96be\u770b\u51fa\u4e0eRISC-V\u6307\u4ee4\u6269\u5c55\u76f8\u5173\u7684\u662fNPK\u4e2d\u7684\u53d8\u91cf nuclei_archext \u3002 ## \uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 ## Build Configuration buildconfig: - type: gcc description: Nuclei RISC-V GNU Toolchain #must cross_prefix: riscv-nuclei-elf- # optional common_flags: # flags need to be combined together across all packages # \u8fd9\u91cc -march \u4f20\u9012\u7684\u503c \u5c31\u662f nuclei_core.arch \u548c nuclei_archext \u4e24\u4e2a\u53d8\u91cf\u62fc\u63a5\u800c\u6765 # \u4f8b\u5982 nuclei_core.arch\u8bbe\u7f6e\u4e3arv32imafdc, nuclei_archext\u8bbe\u7f6e\u4e3a _zba_zbb_zbc_zbs_xxldspn1x, # \u90a3\u4e48 \u4f20\u9012\u7684\u5c31\u662f -march=rv32imafdc_zba_zbb_zbc_zbs_xxldspn1x # \u5982\u679c\u4f60\u7684 march\u662f\u5df2\u77e5\u548c\u786e\u5b9a\u7684\uff0c\u8fd9\u91cc\u76f4\u63a5\u5c31\u53ef\u4ee5\u7ed9\u5b9a -march/-mabi\u7684\u9009\u9879\uff0c\u65e0\u9700\u901a\u8fc7 configuration\u5b57\u6bb5\u6765\u8fdb\u884c\u4f20\u9012 - flags: -march=${nuclei_core.arch}$(join(${nuclei_archext},'')) -mabi=${nuclei_core.abi} ldflags: cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: \u5728\u65e7\u7248\u7684SDK\u4e2d\uff0cnuclei_archext\u5b9a\u4e49\u7684\u662f\u4e00\u4e2a multicheckbox \uff0c\u7528\u6237\u53ef\u4ee5\u81ea\u5df1\u9009\u62e9\uff0c\u800c\u5728\u65b0\u7248\u7684SDK\u4e2d nuclei_archext \u5b9a\u4e49\u7684\u662f\u4e00\u4e2a text \u8f93\u5165\u6846\uff0c \u8fd9\u6837\u7528\u6237\u53ef\u4ee5\u66f4\u7075\u6d3b\u7684\u4f7f\u7528RISC-V \u6307\u4ee4\u6269\u5c55\uff0c\u5982\u679c\u5728\u67d0\u4e9b\u5de5\u7a0b\u6216\u573a\u666f\u4e0b\uff0c\u60f3\u8981\u9884\u8bbe\u4e00\u4e9bRISC-V \u6307\u4ee4\u6269\u5c55\uff0c\u5efa\u8bae\u7ed9\u4e00\u4e2a\u9ed8\u8ba4\u503c\u5c31\u53ef\u4ee5\u4e86\uff0c\u53ef\u4ee5\u53c2\u8003\u4e0b\u4ee3\u7684\u793a\u4f8b\u4ee3\u7801\u3002 \u7528\u4e8e\u652f\u6301 Nuclei RISC-V Toolchain 2022.12 \u7684\u5199\u6cd5 ## \u65e7\u7248\u7684SDK\u4e2d\uff0cnuclei_archext\u5b9a\u4e49\u7684\u662f\u4e00\u4e2amulticheckbox ##\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 nuclei_archext: default_value: [] type: multicheckbox global: true description: Nuclei ARCH Extensions choices: - name: b description: Bitmanip Extension - name: p description: Packed SIMD Extension - name: v description: Vector Extension \u7528\u4e8e\u652f\u6301 Nuclei RISC-V Toolchain 2023.10 \u7684\u5199\u6cd5 ## \u65b0\u7248\u7684SDK\u4e2dnuclei_archext\u5b9a\u4e49\u7684\u662f\u4e00\u4e2atext\u8f93\u5165\u6846 ## Package Configurations configuration: nuclei_archext: default_value: \"_zba_zbb_zbc_zbs\" type: text global: true # hints and tips are introduced in Nuclei Studio 2023.10 # used to show tool tips and input hints tips: \"Possible other ISA extensions, seperated by underscores, like '_zba_zbb_zbc_zbs_xxldspn1x'\" hints: \"_zba_zbb_zbc_zbs_xxldspn1x\" description: Nuclei ARCH Extensions \u6700\u7ec8\u663e\u793a\u521b\u5efa\u9879\u76ee\u7684\u65f6\u5019\u663e\u793a\u6548\u679c\u5982\u4e0b","title":"\u9664\u6807\u51c6\u7684IMAFDC\u4e4b\u5916\u7684\u6269\u5c55(ARCHEXT)\u7684\u5347\u7ea7"},{"location":"5-update_npk_to_support_nucleistudio_202310/#libncrt","text":"libncrt\u8f83\u4e4b\u524d\u4e5f\u6709\u4e86\u4e9b\u8bb8\u53d8\u5316\uff0c\u5728NPK\u4e2d\u4f7f\u7528libncrt\u4e4b\u524d\uff0c\u65b0\u65e7\u7248SDK\u4e2d\u90fd\u662f\u4e00\u6837\u7684\u5728 conifguration \u4e2d\u5b9a\u4e49\u4e86\u4e00\u4e2a\u53d8\u91cf stdclib \uff0c \u5b83\u7684\u503c\u662f\u4e00\u4e2a\u4e0b\u62c9\u6846\uff0c\u53ef\u4ee5\u9009\u62e9\u4e0d\u540c\u7684\u503c\u3002\u4e0d\u540c\u70b9\u662f\u5728\u5f97\u5230 stdclib \u540e\uff0c\u5728 common_flags \u6216\u8005\u5176\u5b83\u5730\u65b9\u4f7f\u7528 stdclib \u65f6\u7565\u6709\u4e0d\u540c\u3002 \u5173\u4e8e stdclib \u7684\u4e00\u4e9b\u8bf4\u660e\uff0c\u53ef\u4ee5\u53c2\u89c1 \u8fd9\u91cc ## \u5b9a\u4e49stdclib\u53d8\u91cf ##\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 ## Package Configurations configuration: stdclib: default_value: newlib_nano type: choice global: true description: Standard C Library choices: - name: newlib_full description: newlib with full feature - name: newlib_fast description: newlib nano with printf/scanf float - name: newlib_small description: newlib nano with printf float - name: newlib_nano description: newlib nano without printf/scanf float - name: libncrt_fast description: nuclei c runtime library, optimized for speed - name: libncrt_balanced description: nuclei c runtime library, balanced, full feature - name: libncrt_small description: nuclei c runtime library, optimized for size, full feature - name: libncrt_nano description: nuclei c runtime library, optimized for size, no float support - name: libncrt_pico description: nuclei c runtime library, optimized for size, no long/long long support - name: nostd description: no std c library will be used, and don't search the standard system directories for header files - name: nospec description: no std c library will be used, not pass any --specs options \u5728\u65b0\u7248\u7684SDK\u4e2d\uff0c\u5982\u679c\u4f7f\u7528 --specs=libncrt_xxx.specs \u6216\u8005\u94fe\u63a5\u5e93\u91cc\u9762\u5305\u542b -lncrt_xxx \uff08\u8868\u793a\u91c7\u7528libncrt c\u5e93\uff09\uff0c \u5219\u9700\u53d8\u66f4\u4e3a -lncrt_xxx -lfileops_uart -lheapops_basic \uff0c\u8fd9\u4e5f\u662f\u65e7SDK\u53d8\u66f4\u4e3a\u652f\u6301GCC 13\u7684\u65b0SDK\u7684\u539f\u5219\u3002 \u4e0b\u9762\u914d\u7f6e\u4e3a\u5728\u65e7\u7248SDK\u4e2d\u7684npk\u53d8\u91cfstdclib,\u5f53\u53d8\u91cfstdclib\u4ee5libncrt\u5f00\u5934\u65f6\uff0c\u4f1a\u76f4\u63a5\u5b9a\u4e49\u4e00\u4e2a --specs=${stdclib}.specs \uff0c \u6309\u7167\u4e0a\u9762\u6211\u4eec\u8bf4\u7684\u539f\u5219\uff0c\u8fd9\u91cc\u5e94\u8be5\u53d8\u6210\u8bbe\u7f6e -l$(subst(${stdclib},lib,)) -lfileops_uart -lheapops_basic \uff0c\u6240\u4ee5\u5728\u65b0\u7248SDK\u4e2d\u7684\u5199\u6cd5\u5c31\u53d8\u6210\u4e86\u4e0b\u9762\u7684\u914d\u7f6e\u65b9\u5f0f\u3002 ## \u5728\u65e7\u7248SDK\u4e2d\u4f7f\u7528stdclib\u53d8\u91cf ##\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 ## Build Configuration buildconfig: - type: gcc description: Nuclei GNU Toolchain cross_prefix: riscv-nuclei-elf- # optional common_flags: # flags need to be combined together across all packages - flags: --specs=${stdclib}.specs condition: $( startswith(${stdclib}, \"libncrt\") ) ldflags: cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description: \u8f6c\u53d8\u4e3a ## \u5728\u65b0\u7248SDK\u4e2d\u4f7f\u7528stdclib\u53d8\u91cf ##\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 ## Build Configuration buildconfig: - type: gcc description: Nuclei GNU Toolchain toolchain_name: RISC-V GCC/Newlib cross_prefix: riscv64-unknown-elf- # optional common_flags: # flags need to be combined together across all packages - flags: --specs=${stdclib}.specs condition: $( startswith(${stdclib}, \"libncrt\") ) ldflags: - flags: -l$(subst(${stdclib},lib,)) -lheapops_basic -lfileops_uart condition: $( startswith(${stdclib}, \"libncrt\") ) cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description:","title":"libncrt\u7684\u5347\u7ea7"},{"location":"5-update_npk_to_support_nucleistudio_202310/#link-warning","text":"\u5728Nuclei Studio 2023.10\u4e2d\u96c6\u6210\u7684GCC 13,\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4f1a\u6709warning\uff0c\u94fe\u63a5\u9009\u9879\u589e\u52a0\u4e00\u4e2a -Wl,--no-warn-rwx-segments \u53ef\u4ee5\u9690\u85cfwarning\u3002 \u5177\u4f53\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u914d\u7f6e\uff08\u4e3a\u4e86\u65b9\u4fbf\u4e3e\u4f8b\uff0c\u9690\u85cf\u4e86\u90e8\u5206\u53c2\u6570\uff0c\u5177\u4f53\u53c2\u6570\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u5b9a\u4e49\uff09 ## Build Configuration buildconfig: - type: gcc description: Nuclei GNU Toolchain toolchain_name: RISC-V GCC/Newlib cross_prefix: riscv64-unknown-elf- # optional common_flags: # flags need to be combined together across all packages ldflags: # \u7528\u4e8e\u6d88\u9664gcc13\u94fe\u63a5\u9636\u6bb5\u7684warning - flags: -Wl,--no-warn-rwx-segments cflags: asmflags: cxxflags: common_defines: prebuild_steps: # could be override by app/bsp type command: description: postbuild_steps: # could be override by app/bsp type command: description:","title":"Link Warning\u7684\u6d88\u9664"},{"location":"5-update_npk_to_support_nucleistudio_202310/#nuclei-sdk-050-npkyml","text":"\u5173\u4e8e\u652f\u6301Nuclei Studio + Nuclei RISC-V Toolchain 2023.10\u7684npk.yml\u53d8\u66f4\uff0c\u53ef\u4ee5\u53c2\u8003nuclei-sdk 0.5.0\u7684\u53d8\u66f4\u3002 gd32vf103\u7684\u53d8\u5316 git diff 0.4.1..0.5.0 SoC/gd32vf103/***npk.yml evalsoc\u7684\u53d8\u5316: git diff 0.4.1..0.5.0 SoC/evalsoc/***npk.yml NMSIS\u7684\u53d8\u5316: git diff 0.4.1..0.5.0 NMSIS/***npk.yml application\u7684\u53d8\u5316: git diff 0.4.1..0.5.0 application/***npk.yml RTOS\u7684\u53d8\u5316: git diff 0.4.1..0.5.0 OS/***npk.yml \u6267\u884c\u67e5\u770b\u4ee3\u7801\u53d8\u66f4\u547d\u4ee4\u65b9\u6cd5\u5982\u4e0b git clone https://github.com/Nuclei-Software/nuclei-sdk/ cd nuclei-sdk git fetch --all git diff 0.4.1..0.5.0 SoC/gd32vf103/***npk.yml git diff 0.4.1..0.5.0 SoC/evalsoc/***npk.yml git diff 0.4.1..0.5.0 NMSIS/***npk.yml git diff 0.4.1..0.5.0 application/***npk.yml git diff 0.4.1..0.5.0 OS/***npk.yml","title":"\u5173\u4e8eNuclei SDK 0.5.0 npk.yml \u8be6\u7ec6\u53d8\u66f4"},{"location":"6-gcc13_gen_rvv_instructions_when_rvv_enabled/","text":"GCC13 auto generated RVV instructions when RVV enabled \u00b6 If you are using Nuclei SDK 0.5.0 with Nuclei RISC-V Toolchain 2023.10, and when compile some examples with RVV enabled, it may generate rvv instructions which called auto-vectorzation. Take application/baremetal/benchmark/dhrystone for example: cd application/baremetal/benchmark/dhrystone # enable extra vector extension, which means the -march=rv64imafdcv make CORE=nx900fd ARCH_EXT=v clean make CORE=nx900fd ARCH_EXT=v dasm Then if you check the dhrystone.dasm , you will be able to see rvv instructions: This auto generated instructions may affect your hardware performance, so if you want to disable it, you don't need to pass rvv extension when compile application. $ cat dhrystone.dasm |grep vs 800003e2: cc3ff057 vsetivli zero,31,e8,m8,ta,ma 800003f8: 02038427 vse8.v v8,(t2) 8000040c: 020b8027 vse8.v v0,(s7) 800004a2: cc3ff057 vsetivli zero,31,e8,m8,ta,ma 800004b2: 02098827 vse8.v v16,(s3) 80000524: cc3ff057 vsetivli zero,31,e8,m8,ta,ma 80000530: 02098c27 vse8.v v24,(s3) 80000df2: cdb3f057 vsetivli zero,7,e64,m8,ta,ma 80000dfa: 0204f427 vse64.v v8,(s1) 80000e20: cdb3f057 vsetivli zero,7,e64,m8,ta,ma 80000e28: 02047027 vse64.v v0,(s0) You can check https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112537 for more details.","title":"GCC13 auto generated RVV instructions when RVV enabled"},{"location":"6-gcc13_gen_rvv_instructions_when_rvv_enabled/#gcc13-auto-generated-rvv-instructions-when-rvv-enabled","text":"If you are using Nuclei SDK 0.5.0 with Nuclei RISC-V Toolchain 2023.10, and when compile some examples with RVV enabled, it may generate rvv instructions which called auto-vectorzation. Take application/baremetal/benchmark/dhrystone for example: cd application/baremetal/benchmark/dhrystone # enable extra vector extension, which means the -march=rv64imafdcv make CORE=nx900fd ARCH_EXT=v clean make CORE=nx900fd ARCH_EXT=v dasm Then if you check the dhrystone.dasm , you will be able to see rvv instructions: This auto generated instructions may affect your hardware performance, so if you want to disable it, you don't need to pass rvv extension when compile application. $ cat dhrystone.dasm |grep vs 800003e2: cc3ff057 vsetivli zero,31,e8,m8,ta,ma 800003f8: 02038427 vse8.v v8,(t2) 8000040c: 020b8027 vse8.v v0,(s7) 800004a2: cc3ff057 vsetivli zero,31,e8,m8,ta,ma 800004b2: 02098827 vse8.v v16,(s3) 80000524: cc3ff057 vsetivli zero,31,e8,m8,ta,ma 80000530: 02098c27 vse8.v v24,(s3) 80000df2: cdb3f057 vsetivli zero,7,e64,m8,ta,ma 80000dfa: 0204f427 vse64.v v8,(s1) 80000e20: cdb3f057 vsetivli zero,7,e64,m8,ta,ma 80000e28: 02047027 vse64.v v0,(s0) You can check https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112537 for more details.","title":"GCC13 auto generated RVV instructions when RVV enabled"},{"location":"7-update_nucleistudio_202310_to_fixed_version/","text":"\u66f4\u65b0 Nuclei Studio 2023.10 \u5230\u6700\u65b0\u4fee\u6b63\u7248\u672c \u00b6 2023.11.06 \u4e0a\u4f20\u7684Nuclei Studio 2023.10\u7248\u672c\u5b58\u5728\u4e00\u4e9b\u95ee\u9898\uff0c\u6211\u4eec\u8fdb\u884c\u4e86\u4fee\u6b63\uff0c\u5e76\u4e8e 2023.11.17 13:30 \u66ff\u6362\u7ebf\u4e0a2023.10\u7248\u672c\u3002 \u95ee\u9898\u63cf\u8ff0 \u00b6 2023\u5e7411\u670806\u65e5 \u53d1\u5e03\u7684 Nuclei Studio 2023.10 \u7248\u672c\u4e2d\u5b58\u5728\u4e00\u4e9b\u95ee\u9898,\u5f71\u54cd\u7528\u6237\u4f7f\u7528: build tools\u7684busybox\u5b58\u5728\u95ee\u9898\u5bfc\u81f4make \u5e26 pre- post- steps\u65f6\u7f16\u8bd1\u51fa\u95ee\u9898 Nuclei Settings\u4e2dcorner cases\u5728\u7279\u5b9a\u573a\u666f\u4e0b\u4f1a\u51fa\u9519 Nuclei Settings\u7684\u6253\u5f00\u65b9\u5f0f\u5f71\u54cd\u5de5\u7a0b\u4e2d\u5176\u4ed6\u6587\u4ef6\u7684\u6253\u5f00\u65b9\u5f0f \u5728QEMU\u4e2d\u4f7f\u7528V\u6269\u5c55\u65f6\uff0c\u6ca1\u6709\u4f20\u5165RVV length \u4fee\u590d\u6253\u5f00\u4e00\u4e2a\u5168\u65b0\u7684workspace\uff0c\u521b\u5efa\u65b0\u7684\u5de5\u7a0b\u7684\u65f6\u5019\uff0c\u80fd\u591f\u521b\u5efa\u540c\u540d\u9879\u76ee\u7684\u95ee\u9898\uff0c\u91cd\u5f00workspace\u5373\u53ef\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898 \u6211\u4eec\u91cd\u65b0\u505a\u4e86\u4e00\u4e9b\u53d8\u66f4\uff0c\u4ee5\u4fee\u590d\u4ee5\u4e0a\u95ee\u9898 \uff1a \u4fee\u6539\u5e76\u53d1\u5e03Nuclei Studio Plugins 2.1.0\uff0c \u4e0a\u4f20\u5230\u63d2\u4ef6\u66f4\u65b0\u7f51\u7ad9 \u4fee\u6539\u5e76\u53d1\u5e03Windows build-tools 1.2\uff0c\u66ff\u6362\u4e86\u7ebf\u4e0a\u7684Windows Build Tools 2023.10 \u53d1\u5e03\u4e86\u65b0\u7684Nuclei Studio 2023.10\uff0c\u66ff\u6362\u4e86\u7ebf\u4e0a\u7684Nuclei Studio 2023.10 \u5347\u7ea7Nuclei Studio 2023.10 \u5230\u6700\u65b0\u7248\u672c\u7684\u65b9\u6cd5 \u00b6 \u5982\u679c\u60a8\u7684Nuclei Studio 2023.10\uff0c\u662f\u5728 2023\u5e7411\u670818\u65e5 \u4e4b\u524d\u4e0b\u8f7d\uff0c\u7248\u672c\u4e2d\u5b58\u5728\u7684\u4e0a\u8ff0\u95ee\u9898\u53ef\u80fd\u4f1a\u5f15\u54cd\u60a8\u7684\u4f7f\u7528\u4f53\u9a8c\uff0c \u60a8\u53ef\u4ee5\u9009\u62e9\u624b\u52a8\u8fdb\u884c\u5347\u7ea7\uff0c\u4e5f\u53ef\u4ee5\u9009\u62e9\u91cd\u5b98\u7f51\u4e0a\u4e0b\u8f7d\u6211\u4eec\u6700\u65b0\u53d1\u5e03\u7684\u7248\u672c\u3002 \u5bf92023\u5e7411\u670818\u65e5\u4e4b\u524d\u4e0b\u8f7d\u4e86Nuclei Studio 2023.10\u8fdb\u884c\u5347\u7ea7 \u00b6 \u5982\u679c\u60a8\u662f\u57282023\u5e7411\u670818\u65e5\u4e4b\u524d\u4e0b\u8f7d\u4e86Nuclei Studio 2023.10\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u66f4\u65b0\u60a8\u7684Nuclei Studio 2023.10 \u5230\u6700\u65b0\u7248\u672c 1. \u5347\u7ea7Nuclei Studio Plugins \u5728Nuclei Studio\u83dc\u5355\u4e2d\u627e\u5230 Help->Install New Software , \u7136\u540e\u5728Install\u5de5\u5177\u7684 Work with \u9009\u4e2d NucleiStudio - https://ide.nucleisys.com/NucleiStudio/ ,\u4e0b\u9762\u4f1a\u5217\u51fa\u6240\u6709\u5f85\u66f4\u65b0\u7684\u63d2\u4ef6\u3002 \u5728\u5f39\u51fa\u7684\u63d2\u4ef6\u5217\u8868\u4e2d\u9009\u4e2d\u9700\u8981\u5347\u7ea7\u7684\u63d2\u4ef6\uff0c\u6211\u4eec\u9009\u4e2d RISC-V C/C++ Cross Development Tools , \u7136\u540eNext\u3002 \u5728\u5347\u7ea7\u8fc7\u7a0b\u4e2d\uff0cNuclei Studio\u4f1a\u8be2\u95eeTrust Artifacts\u65f6\uff0c\u64cd\u4f5c\u5982\u4e0b\u56fe\uff0c\u9009\u62e9Trust Selected, \u7136\u540e\u5347\u7ea7\u5b8c\u6210\uff0cNuclei Studio\u4f1a\u91cd\u542f\u3002\u81f3\u6b64Nuclei Studio Plugins\u5347\u7ea7\u5b8c\u6210\u3002 2. \u5347\u7ea7build-tools Linux\u7248\u672c\u4e0d\u9700\u8981\u6267\u884c\u6b64\u6b65\u9aa4\uff0c\u53ea\u9700\u8981\u786e\u4fdd\u7cfb\u7edf\u4e2d\u88c5\u4e86 make \u5de5\u5177\u5c31\u884c\u3002 \u4e0b\u8f7d build-tools-1.2 \uff0c\u5e76\u66ff\u6362Nuclei Studio 2023.10\u4e2d\u7684 NucleiStudio\\toolchain\\build-tools \u4e2d\u5185\u5bb9\u3002 \u5173\u4e8e\u8fd9\u90e8\u5206\uff0c\u53ef\u4ee5\u67e5\u9605 \u7f16\u8bd1\u5de5\u7a0b\u65f6\uff0c\u4f7f\u7528\u4e86Pre-build Command/Post-build Command\u65f6\u62a5\u9519 \u4e2d\u7684\u8be6\u7ec6\u8bf4\u660e\u3002 build-tools-1.2\u4e0b\u8f7d \u7ecf\u6b64\u4e24\u6b65\uff0c\u5b8c\u6210\u4e86\u5bf9Nuclei Studio 2023.10\u7684\u5347\u7ea7\u3002 \u4ece\u5b98\u7f51\u4e0b\u8f7d\u6700\u65b0\u7684\u7248\u672c \u00b6 \u5982\u679c\u4e0d\u60f3\u505a\u624b\u52a8\u5347\u7ea7\u5de5\u4f5c\uff0c\u53ef\u4ee5\u76f4\u63a5\u4ece\u6211\u4eec\u7684\u7f51\u7ad9\u4e0a\u4e0b\u8f7d\u6700\u65b0\u7684Nuclei Studio 2023.10\u3002 Windows\u7248\u4e0b\u8f7d Linux\u7248\u4e0b\u8f7d \u53c2\u8003\u8d44\u6599 \u00b6 Nuclei Studio FAQs Nuclei Studio/Tools \u4e0d\u65ad\u66f4\u65b0\u7684\u8865\u5145\u6587\u6863 Nuclei Studio Issues","title":"\u66f4\u65b0 Nuclei Studio 2023.10 \u5230\u6700\u65b0\u4fee\u6b63\u7248\u672c"},{"location":"7-update_nucleistudio_202310_to_fixed_version/#nuclei-studio-202310","text":"2023.11.06 \u4e0a\u4f20\u7684Nuclei Studio 2023.10\u7248\u672c\u5b58\u5728\u4e00\u4e9b\u95ee\u9898\uff0c\u6211\u4eec\u8fdb\u884c\u4e86\u4fee\u6b63\uff0c\u5e76\u4e8e 2023.11.17 13:30 \u66ff\u6362\u7ebf\u4e0a2023.10\u7248\u672c\u3002","title":"\u66f4\u65b0 Nuclei Studio 2023.10 \u5230\u6700\u65b0\u4fee\u6b63\u7248\u672c"},{"location":"7-update_nucleistudio_202310_to_fixed_version/#_1","text":"2023\u5e7411\u670806\u65e5 \u53d1\u5e03\u7684 Nuclei Studio 2023.10 \u7248\u672c\u4e2d\u5b58\u5728\u4e00\u4e9b\u95ee\u9898,\u5f71\u54cd\u7528\u6237\u4f7f\u7528: build tools\u7684busybox\u5b58\u5728\u95ee\u9898\u5bfc\u81f4make \u5e26 pre- post- steps\u65f6\u7f16\u8bd1\u51fa\u95ee\u9898 Nuclei Settings\u4e2dcorner cases\u5728\u7279\u5b9a\u573a\u666f\u4e0b\u4f1a\u51fa\u9519 Nuclei Settings\u7684\u6253\u5f00\u65b9\u5f0f\u5f71\u54cd\u5de5\u7a0b\u4e2d\u5176\u4ed6\u6587\u4ef6\u7684\u6253\u5f00\u65b9\u5f0f \u5728QEMU\u4e2d\u4f7f\u7528V\u6269\u5c55\u65f6\uff0c\u6ca1\u6709\u4f20\u5165RVV length \u4fee\u590d\u6253\u5f00\u4e00\u4e2a\u5168\u65b0\u7684workspace\uff0c\u521b\u5efa\u65b0\u7684\u5de5\u7a0b\u7684\u65f6\u5019\uff0c\u80fd\u591f\u521b\u5efa\u540c\u540d\u9879\u76ee\u7684\u95ee\u9898\uff0c\u91cd\u5f00workspace\u5373\u53ef\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898 \u6211\u4eec\u91cd\u65b0\u505a\u4e86\u4e00\u4e9b\u53d8\u66f4\uff0c\u4ee5\u4fee\u590d\u4ee5\u4e0a\u95ee\u9898 \uff1a \u4fee\u6539\u5e76\u53d1\u5e03Nuclei Studio Plugins 2.1.0\uff0c \u4e0a\u4f20\u5230\u63d2\u4ef6\u66f4\u65b0\u7f51\u7ad9 \u4fee\u6539\u5e76\u53d1\u5e03Windows build-tools 1.2\uff0c\u66ff\u6362\u4e86\u7ebf\u4e0a\u7684Windows Build Tools 2023.10 \u53d1\u5e03\u4e86\u65b0\u7684Nuclei Studio 2023.10\uff0c\u66ff\u6362\u4e86\u7ebf\u4e0a\u7684Nuclei Studio 2023.10","title":"\u95ee\u9898\u63cf\u8ff0"},{"location":"7-update_nucleistudio_202310_to_fixed_version/#nuclei-studio-202310_1","text":"\u5982\u679c\u60a8\u7684Nuclei Studio 2023.10\uff0c\u662f\u5728 2023\u5e7411\u670818\u65e5 \u4e4b\u524d\u4e0b\u8f7d\uff0c\u7248\u672c\u4e2d\u5b58\u5728\u7684\u4e0a\u8ff0\u95ee\u9898\u53ef\u80fd\u4f1a\u5f15\u54cd\u60a8\u7684\u4f7f\u7528\u4f53\u9a8c\uff0c \u60a8\u53ef\u4ee5\u9009\u62e9\u624b\u52a8\u8fdb\u884c\u5347\u7ea7\uff0c\u4e5f\u53ef\u4ee5\u9009\u62e9\u91cd\u5b98\u7f51\u4e0a\u4e0b\u8f7d\u6211\u4eec\u6700\u65b0\u53d1\u5e03\u7684\u7248\u672c\u3002","title":"\u5347\u7ea7Nuclei Studio 2023.10 \u5230\u6700\u65b0\u7248\u672c\u7684\u65b9\u6cd5"},{"location":"7-update_nucleistudio_202310_to_fixed_version/#20231118nuclei-studio-202310","text":"\u5982\u679c\u60a8\u662f\u57282023\u5e7411\u670818\u65e5\u4e4b\u524d\u4e0b\u8f7d\u4e86Nuclei Studio 2023.10\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u66f4\u65b0\u60a8\u7684Nuclei Studio 2023.10 \u5230\u6700\u65b0\u7248\u672c 1. \u5347\u7ea7Nuclei Studio Plugins \u5728Nuclei Studio\u83dc\u5355\u4e2d\u627e\u5230 Help->Install New Software , \u7136\u540e\u5728Install\u5de5\u5177\u7684 Work with \u9009\u4e2d NucleiStudio - https://ide.nucleisys.com/NucleiStudio/ ,\u4e0b\u9762\u4f1a\u5217\u51fa\u6240\u6709\u5f85\u66f4\u65b0\u7684\u63d2\u4ef6\u3002 \u5728\u5f39\u51fa\u7684\u63d2\u4ef6\u5217\u8868\u4e2d\u9009\u4e2d\u9700\u8981\u5347\u7ea7\u7684\u63d2\u4ef6\uff0c\u6211\u4eec\u9009\u4e2d RISC-V C/C++ Cross Development Tools , \u7136\u540eNext\u3002 \u5728\u5347\u7ea7\u8fc7\u7a0b\u4e2d\uff0cNuclei Studio\u4f1a\u8be2\u95eeTrust Artifacts\u65f6\uff0c\u64cd\u4f5c\u5982\u4e0b\u56fe\uff0c\u9009\u62e9Trust Selected, \u7136\u540e\u5347\u7ea7\u5b8c\u6210\uff0cNuclei Studio\u4f1a\u91cd\u542f\u3002\u81f3\u6b64Nuclei Studio Plugins\u5347\u7ea7\u5b8c\u6210\u3002 2. \u5347\u7ea7build-tools Linux\u7248\u672c\u4e0d\u9700\u8981\u6267\u884c\u6b64\u6b65\u9aa4\uff0c\u53ea\u9700\u8981\u786e\u4fdd\u7cfb\u7edf\u4e2d\u88c5\u4e86 make \u5de5\u5177\u5c31\u884c\u3002 \u4e0b\u8f7d build-tools-1.2 \uff0c\u5e76\u66ff\u6362Nuclei Studio 2023.10\u4e2d\u7684 NucleiStudio\\toolchain\\build-tools \u4e2d\u5185\u5bb9\u3002 \u5173\u4e8e\u8fd9\u90e8\u5206\uff0c\u53ef\u4ee5\u67e5\u9605 \u7f16\u8bd1\u5de5\u7a0b\u65f6\uff0c\u4f7f\u7528\u4e86Pre-build Command/Post-build Command\u65f6\u62a5\u9519 \u4e2d\u7684\u8be6\u7ec6\u8bf4\u660e\u3002 build-tools-1.2\u4e0b\u8f7d \u7ecf\u6b64\u4e24\u6b65\uff0c\u5b8c\u6210\u4e86\u5bf9Nuclei Studio 2023.10\u7684\u5347\u7ea7\u3002","title":"\u5bf92023\u5e7411\u670818\u65e5\u4e4b\u524d\u4e0b\u8f7d\u4e86Nuclei Studio 2023.10\u8fdb\u884c\u5347\u7ea7"},{"location":"7-update_nucleistudio_202310_to_fixed_version/#_2","text":"\u5982\u679c\u4e0d\u60f3\u505a\u624b\u52a8\u5347\u7ea7\u5de5\u4f5c\uff0c\u53ef\u4ee5\u76f4\u63a5\u4ece\u6211\u4eec\u7684\u7f51\u7ad9\u4e0a\u4e0b\u8f7d\u6700\u65b0\u7684Nuclei Studio 2023.10\u3002 Windows\u7248\u4e0b\u8f7d Linux\u7248\u4e0b\u8f7d","title":"\u4ece\u5b98\u7f51\u4e0b\u8f7d\u6700\u65b0\u7684\u7248\u672c"},{"location":"7-update_nucleistudio_202310_to_fixed_version/#_3","text":"Nuclei Studio FAQs Nuclei Studio/Tools \u4e0d\u65ad\u66f4\u65b0\u7684\u8865\u5145\u6587\u6863 Nuclei Studio Issues","title":"\u53c2\u8003\u8d44\u6599"},{"location":"8-openocd_202310_flashloader_flaws/","text":"OpenOCD\u5728\u64cd\u4f5c\u5bb9\u91cf\u5927\u4e8e16M-Byte\u7684nor-flash\u65f6\u7684\u95ee\u9898 \u00b6 \u64cd\u4f5c0 ~ 16M\u5730\u5740\u533a\u95f4spi\u63a7\u5236\u5668\u9700\u8981\u53d1\u9001\u4e09\u4e2a\u5b57\u8282\u7684\u5730\u5740\u4fe1\u606f\uff0c\u79f0\u4e3a3byte\u5730\u5740\u6a21\u5f0f\uff1b\u64cd\u4f5c16M ~ 2G\u5730\u5740\u533a\u95f4spi\u63a7\u5236\u5668\u5219\u9700\u8981\u53d1\u9001\u56db\u4e2a\u5b57\u8282\u7684\u5730\u5740\u4fe1\u606f\uff0c\u79f0\u4e3a4byte\u5730\u5740\u6a21\u5f0f\uff1b nuspi\u63a7\u5236\u5668\u7684\u666e\u901aspi\u548cxip\u9ed8\u8ba4\u90fd\u662f3byte\u5730\u5740\u6a21\u5f0f \u6211\u4eec\u5728OpenOCD\u91cc\u5f00\u53d1\u4e86\u4e24\u7ec4spi\u9a71\u52a8\u5206\u522b\u662fnuspi\u548ccustom\uff0c\u90fd\u53ef\u4ee5\u652f\u63013byte\u6a21\u5f0f\u548c4byte\u6a21\u5f0f\uff0c\u5176\u4e2dnuspi\u53ef\u901a\u8fc7\u5224\u65ad\u64cd\u4f5c\u5730\u5740\uff0c\u81ea\u52a8\u5207\u6362\u6a21\u5f0f \u5728OpenOCD\u91cc\u6709\u5f88\u591a\u79cd\u65b9\u5f0f\u53ef\u4ee5read/verify flash\u5185\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u5f52\u7ed3\u4e3a\u4e24\u5927\u7c7b\uff0c\u4e00\u7c7b\u662f\u76f4\u63a5\u901a\u8fc7xip\u7684\u65b9\u5f0f\u8bfb\u53d6flash\u6570\u636e\uff0c\u53e6\u4e00\u7c7b\u5219\u662f\u901a\u8fc7\u8c03\u7528\u9a71\u52a8\u4f7f\u7528\u666e\u901aspi\u7684\u65b9\u5f0f\u8bfb\u53d6flash\u6570\u636e\u3002 \u56e0\u6b64\uff0c\u76f4\u63a5\u901a\u8fc7xip\u7684\u65b9\u5f0f\u8bfb\u53d6flash\u6570\u636e\u65f6\uff0c\u5c31\u4f1a\u6709\u53ea\u80fd\u8bfb\u5230\u524d\u976216M\u5730\u5740\u8303\u56f4\u7684\u9650\u5236\uff0c\u8fd9\u6837\u7684\u547d\u4ee4\u6709 flash verify_image filename [offset] [type] dump_image filename address size gdb\u7684x\u547d\u4ee4 \u7b49\u7b49 \u76f4\u63a5\u8bfb\u53d6memory\u7684\u547d\u4ee4 \u5f53\u7136OpenOCD\u91cc\u9762\u4e5f\u5b58\u5728\u4e00\u4e9b\u8bfb\u53d6flash\u7684\u547d\u4ee4\uff0c\u4f1a\u76f4\u63a5\u8c03\u7528cfg\u6587\u4ef6\u6ce8\u518c\u7684spi\u9a71\u52a8\uff0c\u8fd9\u6837\u7684\u547d\u4ee4\u6709 flash read_bank num filename [offset [length]] flash verify_bank num filename [offset]","title":"OpenOCD\u5728\u64cd\u4f5c\u5bb9\u91cf\u5927\u4e8e16M-Byte\u7684nor-flash\u65f6\u7684\u95ee\u9898"},{"location":"8-openocd_202310_flashloader_flaws/#openocd16m-bytenor-flash","text":"\u64cd\u4f5c0 ~ 16M\u5730\u5740\u533a\u95f4spi\u63a7\u5236\u5668\u9700\u8981\u53d1\u9001\u4e09\u4e2a\u5b57\u8282\u7684\u5730\u5740\u4fe1\u606f\uff0c\u79f0\u4e3a3byte\u5730\u5740\u6a21\u5f0f\uff1b\u64cd\u4f5c16M ~ 2G\u5730\u5740\u533a\u95f4spi\u63a7\u5236\u5668\u5219\u9700\u8981\u53d1\u9001\u56db\u4e2a\u5b57\u8282\u7684\u5730\u5740\u4fe1\u606f\uff0c\u79f0\u4e3a4byte\u5730\u5740\u6a21\u5f0f\uff1b nuspi\u63a7\u5236\u5668\u7684\u666e\u901aspi\u548cxip\u9ed8\u8ba4\u90fd\u662f3byte\u5730\u5740\u6a21\u5f0f \u6211\u4eec\u5728OpenOCD\u91cc\u5f00\u53d1\u4e86\u4e24\u7ec4spi\u9a71\u52a8\u5206\u522b\u662fnuspi\u548ccustom\uff0c\u90fd\u53ef\u4ee5\u652f\u63013byte\u6a21\u5f0f\u548c4byte\u6a21\u5f0f\uff0c\u5176\u4e2dnuspi\u53ef\u901a\u8fc7\u5224\u65ad\u64cd\u4f5c\u5730\u5740\uff0c\u81ea\u52a8\u5207\u6362\u6a21\u5f0f \u5728OpenOCD\u91cc\u6709\u5f88\u591a\u79cd\u65b9\u5f0f\u53ef\u4ee5read/verify flash\u5185\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u5f52\u7ed3\u4e3a\u4e24\u5927\u7c7b\uff0c\u4e00\u7c7b\u662f\u76f4\u63a5\u901a\u8fc7xip\u7684\u65b9\u5f0f\u8bfb\u53d6flash\u6570\u636e\uff0c\u53e6\u4e00\u7c7b\u5219\u662f\u901a\u8fc7\u8c03\u7528\u9a71\u52a8\u4f7f\u7528\u666e\u901aspi\u7684\u65b9\u5f0f\u8bfb\u53d6flash\u6570\u636e\u3002 \u56e0\u6b64\uff0c\u76f4\u63a5\u901a\u8fc7xip\u7684\u65b9\u5f0f\u8bfb\u53d6flash\u6570\u636e\u65f6\uff0c\u5c31\u4f1a\u6709\u53ea\u80fd\u8bfb\u5230\u524d\u976216M\u5730\u5740\u8303\u56f4\u7684\u9650\u5236\uff0c\u8fd9\u6837\u7684\u547d\u4ee4\u6709 flash verify_image filename [offset] [type] dump_image filename address size gdb\u7684x\u547d\u4ee4 \u7b49\u7b49 \u76f4\u63a5\u8bfb\u53d6memory\u7684\u547d\u4ee4 \u5f53\u7136OpenOCD\u91cc\u9762\u4e5f\u5b58\u5728\u4e00\u4e9b\u8bfb\u53d6flash\u7684\u547d\u4ee4\uff0c\u4f1a\u76f4\u63a5\u8c03\u7528cfg\u6587\u4ef6\u6ce8\u518c\u7684spi\u9a71\u52a8\uff0c\u8fd9\u6837\u7684\u547d\u4ee4\u6709 flash read_bank num filename [offset [length]] flash verify_bank num filename [offset]","title":"OpenOCD\u5728\u64cd\u4f5c\u5bb9\u91cf\u5927\u4e8e16M-Byte\u7684nor-flash\u65f6\u7684\u95ee\u9898"},{"location":"9-modify_the_cproject_file_to_change_the_project_to_gcc13/","text":"\u901a\u8fc7\u4fee\u6539.cproject\u6587\u4ef6\uff0c\u5347\u7ea7\u5de5\u7a0b\u5de5\u5177\u94fe\u5230GCC 13 \u00b6 Nuclei Studio 2023.10\u7684IDE\u8fdb\u884c\u4e86\u4e00\u6b21\u5927\u7248\u672c\u7684\u5347\u7ea7, \u5176\u4e2d\u81ea\u5e26\u7684\u5de5\u5177\u94fe\u4ecegcc10\u5347\u7ea7\u5230\u4e86gcc13, \u5e76\u4e14\u5de5\u5177\u94fe\u7684\u524d\u7f00\u4e5f\u53d1\u751f\u4e86\u53d8\u5316\u3002 \u53c2\u89c1 https://github.com/Nuclei-Software/nuclei-studio/releases/tag/2023.10 \u867d\u7136\u6211\u4eec\u57282023.10\u7684IDE\u4e2d\u63d0\u4f9b\u4e86\u53f3\u952e\u9009\u4e2d\u5de5\u7a0b\u4e00\u952e\u5347\u7ea7\u7684\u5de5\u5177\uff08\u53c2\u89c1IDE\u7684\u624b\u518c\u7b2c8\u7ae0\u8282\uff09\uff0c\u4f46\u662f\u8fd9\u4e2a\u53ea\u80fd\u4e00\u4e2a\u5de5\u7a0b\u4e00\u4e2a\u5de5\u7a0b\u7684\u8f6c\u6362\uff0c\u5bf9\u4e8e\u6709\u5927\u91cf\u5de5\u7a0b\u9700\u8981\u6279\u91cf\u8f6c\u6362\u7684\u9879\u76ee\u800c\u8a00\u4e0d\u592a\u53cb\u597d\uff0c\u56e0\u6b64 \u6211\u4eec\u8fd9\u91cc\u5217\u51fa\u6765\u5982\u679c\u5199\u811a\u672c\u8fdb\u884c\u5de5\u7a0b\u7684\u8f6c\u6362\u5347\u7ea7\uff0c\u5219\u53ef\u4ee5\u53c2\u8003\u5982\u4e0b\u7684\u601d\u8def\u8fdb\u884c\u8f6c\u6362\u3002 \u4ee5\u4e0b\u53d8\u66f4\u4ec5\u9488\u5bf9Nuclei Studio 2023.10\u4e4b\u524d\u7248\u672c\u521b\u5efa\u7684gcc10\u7684\u5de5\u7a0b\uff0c\u8fdb\u884c\u5347\u7ea7\u53d8\u66f4\uff0c\u5982\u679c\u9700\u8981\u6279\u91cf\u53d8\u66f4\uff0c\u7f16\u5199\u811a\u672c\u7684\u65f6\u5019\u5e94\u5148\u68c0\u67e5\u5de5\u7a0b\u662f\u5426\u662friscv gcc10\u7684\u5de5\u7a0b\u3002 \u4fee\u6539toolchain\u76f8\u5173\u914d\u7f6e \u00b6 \u5728Nuclei Studio 2023.10\u4e4b\u524d\u7684\u7248\u672c\u4e2d\u4f7f\u7528\u7684gcc\u662f\u505a\u4e86\u8bb8\u591a\u4e2a\u6027\u5316\u7684\u53d8\u66f4\uff0c\u9700\u8981Nuclei Studio 2023.10\u7248\u4e2d\u4f7f\u7528\u7684gcc,\u7ee7\u627f\u4e86\u5b98\u65b9\u7248\u672c\u7684\u7279\u6027\u548c\u4e00\u4e9b\u547d\u540d\u65b9\u5f0f\uff0c\u5728\u5de5\u7a0b\u4e2d\u7684 .cproject \u6587\u4ef6\u4e2d\uff0c\u4e3b\u8981\u662f\u8981\u4fee\u6539\u4ee5\u4e0b\u51e0\u4e2a\u503c\u3002\u5176\u4e2d ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name \u7684\u503c\u662f RISC-V Nuclei GCC \u3001 ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.id \u7684\u503c\u662f 3901352267 \u3001 ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix \u7684\u503c\u662f riscv-nuclei-elf- ,\u5219\u8bf4\u660e\u5de5\u7a0b\u5728\u521b\u5efa\u65f6\u6240\u4f7f\u7528\u7684\u662fGCC 10\u3002\u5982\u679c\u9700\u8981\u4f7f\u5de5\u7a0b\u652f\u6301GCC 13,\u9700\u8981\u8fdb\u884c\u5982\u4e0b\u53d8\u66f4\uff1a toolchain.name\u7684\u503c \u4ece RISC-V Nuclei GCC \u53d8\u66f4\u4e3a RISC-V GCC/Newlib toolchain.id\u7684\u503c \u4ece 3901352267 \u53d8\u66f4\u4e3a 2262347901 command.prefix\u7684\u503c \u4ece riscv-nuclei-elf- \u53d8\u66f4\u4e3a riscv64-unknown-elf- \u53d8\u66f4\u524d .cproject \u6587\u4ef6\u7684\u5185\u5bb9 \u589e\u52a0link warning\u6d88\u9664\u7684\u914d\u7f6e \u00b6 \u5728GCC 13\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4f1a\u4ea7\u751f\u5f88\u591a\u7684warning\u4fe1\u606f\uff0c\u53ef\u4ee5\u5728\u94fe\u63a5\u9009\u9879\u4e2d\u989d\u5916\u589e\u52a0 -Wl,--no-warn-rwx-segments \u53c2\u6570\uff0c\u7528\u4ee5\u5173\u95ed\u8fd9\u4e9bwarning\u4fe1\u606f\u3002 \u5177\u4f53\u53c2\u89c1 https://sourceware.org/binutils/docs/ld/Options.html#index-_002d_002dwarn_002drwx_002dsegments \u53d8\u66f4\u524d .cproject \u6587\u4ef6\u7684\u5185\u5bb9 ","title":"\u4fee\u6539libncrt C\u5e93\u76f8\u5173\u914d\u7f6e"},{"location":"9-modify_the_cproject_file_to_change_the_project_to_gcc13/#link-warning","text":"\u5728GCC 13\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u4f1a\u4ea7\u751f\u5f88\u591a\u7684warning\u4fe1\u606f\uff0c\u53ef\u4ee5\u5728\u94fe\u63a5\u9009\u9879\u4e2d\u989d\u5916\u589e\u52a0 -Wl,--no-warn-rwx-segments \u53c2\u6570\uff0c\u7528\u4ee5\u5173\u95ed\u8fd9\u4e9bwarning\u4fe1\u606f\u3002 \u5177\u4f53\u53c2\u89c1 https://sourceware.org/binutils/docs/ld/Options.html#index-_002d_002dwarn_002drwx_002dsegments \u53d8\u66f4\u524d .cproject \u6587\u4ef6\u7684\u5185\u5bb9