diff --git a/README.md b/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..9736256c0ce2a8f9c30c3eee26c3d11e9ad88abb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,4 @@
+# 插件安装
+## 高亮显示RISCV assembly
+RISC-v Support
+zhuwu95 92k
diff --git a/hjs-1st-test/README.md b/hjs-1st-test/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..002eff3b2ee998ac18709f7ddc4c314188ae0dcd
--- /dev/null
+++ b/hjs-1st-test/README.md
@@ -0,0 +1,9 @@
+# 测试记录
+|工具链|模拟器|结果|
+|:-----:|:-----:|:-----:|
+|riscv64-unknown-elf-gcc|qemu-riscv64|ok|
+|riscv64-unknown-linux-gnu-gcc|-|编译就出错:target emulation 'elf32-littleriscv' does not match `elf64-littleriscv'|
+|riscv32-unknown-elf-gcc|qemu-riscv32|ok|
+|riscv32-unknown-linux-gnu-gcc|qemu-riscv32|ok
1. 为什么elf/linux效果没差别?
2. 为什么RV32用linux版本编译没问题,但是上面的RV64-linux版本就报错?|
+|riscv32-unknown-elf-gcc|qemu-riscv64|执行出错:Invalid ELF image for this architecture
---> 模拟器和编译的指令集架构必须对应|
+|riscv32-unknown-elf-gcc
riscv32-unknown-linux-gnu-gcc|qemu-system-riscv32|qemu-system-riscv32要求程序在虚拟机中运行,所以此时在宿主机上无论喂给qemu-system-riscv32哪个工具链编译生成的可执行文件,都会报错:
Image format was not specified for 'hello-riscv32-unknown-elf-gcc.elf/riscv32-unknown-linux-gnu-gcc' and probing guessed raw.
Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.|
diff --git a/hjs-1st-test/hello-riscv32-unknown-elf-gcc.elf b/hjs-1st-test/hello-riscv32-unknown-elf-gcc.elf
new file mode 100755
index 0000000000000000000000000000000000000000..409c8e5c0f26204f6e89a45083096c573308ce98
Binary files /dev/null and b/hjs-1st-test/hello-riscv32-unknown-elf-gcc.elf differ
diff --git a/hjs-1st-test/hello-riscv32-unknown-linux-gnu-gcc.elf b/hjs-1st-test/hello-riscv32-unknown-linux-gnu-gcc.elf
new file mode 100755
index 0000000000000000000000000000000000000000..b1885edf6dc877df13beed559dafb55fb8e02da3
Binary files /dev/null and b/hjs-1st-test/hello-riscv32-unknown-linux-gnu-gcc.elf differ
diff --git a/hjs-1st-test/hello.c b/hjs-1st-test/hello.c
new file mode 100644
index 0000000000000000000000000000000000000000..a5f5277651037a744f30cbadd2c5f69f08534385
--- /dev/null
+++ b/hjs-1st-test/hello.c
@@ -0,0 +1,6 @@
+#include
+
+int main() {
+ printf("Hello, QEMU!\n");
+ return 0;
+}
diff --git a/hjs-1st-test/hello.elf b/hjs-1st-test/hello.elf
new file mode 100755
index 0000000000000000000000000000000000000000..0b3a95a956da43a4e0d29cbfa47d959917aeb149
Binary files /dev/null and b/hjs-1st-test/hello.elf differ
diff --git a/hjs-1st-test/hello_rv64_unknown_elf_gcc.elf b/hjs-1st-test/hello_rv64_unknown_elf_gcc.elf
new file mode 100755
index 0000000000000000000000000000000000000000..0b3a95a956da43a4e0d29cbfa47d959917aeb149
Binary files /dev/null and b/hjs-1st-test/hello_rv64_unknown_elf_gcc.elf differ
diff --git a/lesson12~13/.vscode/launch.json b/lesson12~13/.vscode/launch.json
index 62e62a63bb7c1001dc3b20b3ea7c9c7e1d21fb84..67f9f4b3e7c9887256209f77b9235ce6de8e706c 100644
--- a/lesson12~13/.vscode/launch.json
+++ b/lesson12~13/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run" //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson12~13/.vscode/tasks.json b/lesson12~13/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson12~13/.vscode/tasks.json
+++ b/lesson12~13/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson12~13/Makefile b/lesson12~13/Makefile
index 5790519836f099d27221f6148aedfc17e164afb1..00386d0316eea347511f2068079610399e32e5f7 100644
--- a/lesson12~13/Makefile
+++ b/lesson12~13/Makefile
@@ -1,9 +1,10 @@
MAKEFLAGS = -sR
-CC := riscv64-unknown-elf-gcc
+# CC := riscv64-unknown-elf-gcc
+CC := riscv32-unknown-elf-gcc
CCFLAGES := -c -march=rv32imac -mabi=ilp32 -g -Wall
LKFLAGES := -march=rv32imac -mabi=ilp32
QEMU := qemu-riscv32
-QFLAGES := -g 1234
+QFLAGES := -g 22
RM := rm
RMFLAGES := -rf
diff --git a/lesson12~13/main.c b/lesson12~13/main.c
index 84bd2ba2ce8066940c9485308f9a25784eeb94ad..6edf1458a777c6fd0cb2753c5a0c6827d7fabce1 100644
--- a/lesson12~13/main.c
+++ b/lesson12~13/main.c
@@ -4,7 +4,8 @@ int add();
int main()
{
int i = 250;
- func();
- printf("hello world i is %d %d %d!\n", i, add(), sumdata);
+ // func();
+ // printf("hello world i is %d %d %d!\n", i, add(), sumdata);
+ printf("hello world!\n");
return 0;
}
diff --git a/lesson14/.vscode/launch.json b/lesson14/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100644
--- a/lesson14/.vscode/launch.json
+++ b/lesson14/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson14/.vscode/tasks.json b/lesson14/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson14/.vscode/tasks.json
+++ b/lesson14/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson14/Makefile b/lesson14/Makefile
index 60b7ae4dd980b3463e14c5bbadf0f08673ba0e7e..522d5b997b86d33e967ab10a5fa7b268bc850725 100644
--- a/lesson14/Makefile
+++ b/lesson14/Makefile
@@ -3,7 +3,7 @@ CC := riscv64-unknown-elf-gcc
CCFLAGES := -c -march=rv32imac -mabi=ilp32 -g -Wall -save-temps
LKFLAGES := -march=rv32imac -mabi=ilp32
QEMU := qemu-riscv32
-QFLAGES := -g 1234
+QFLAGES := -g 22
RM := rm
RMFLAGES := -rf
diff --git a/lesson15/.vscode/launch.json b/lesson15/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100644
--- a/lesson15/.vscode/launch.json
+++ b/lesson15/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson15/.vscode/tasks.json b/lesson15/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson15/.vscode/tasks.json
+++ b/lesson15/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson15/Makefile b/lesson15/Makefile
index f355a0abc03db0b013d8b8aa2cd9d4f73527a92e..9096f724ee57a6d88b0cd11155c5230ae2cbf040 100644
--- a/lesson15/Makefile
+++ b/lesson15/Makefile
@@ -5,7 +5,7 @@ OCFLAGES := -S -O binary
CCFLAGES := -c -march=rv32imac -mabi=ilp32 -O0 -Wall -save-temps
LKFLAGES := -march=rv32imac -mabi=ilp32
QEMU := qemu-riscv32
-QFLAGES := -g 1234
+QFLAGES := -g 22
RM := rm
RMFLAGES := -rf
diff --git a/lesson16~17/.vscode/launch.json b/lesson16~17/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100644
--- a/lesson16~17/.vscode/launch.json
+++ b/lesson16~17/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson16~17/.vscode/tasks.json b/lesson16~17/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson16~17/.vscode/tasks.json
+++ b/lesson16~17/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson16~17/Makefile b/lesson16~17/Makefile
index 743e405cfb807d5ecffe16a04f9382fef1ab312f..f35e8ebd8619cbaba236a9c03a76e3e70b1998c6 100644
--- a/lesson16~17/Makefile
+++ b/lesson16~17/Makefile
@@ -5,7 +5,7 @@ OCFLAGES := -S -O binary
CCFLAGES := -c -march=rv32i -mabi=ilp32 -O0 -Wall -g
LKFLAGES := -march=rv32i -mabi=ilp32
QEMU := qemu-riscv32
-QFLAGES := -g 1234
+QFLAGES := -g 22
RM := rm
RMFLAGES := -rf
diff --git a/lesson18~19/.vscode/launch.json b/lesson18~19/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100644
--- a/lesson18~19/.vscode/launch.json
+++ b/lesson18~19/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson18~19/.vscode/tasks.json b/lesson18~19/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson18~19/.vscode/tasks.json
+++ b/lesson18~19/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson18~19/Makefile b/lesson18~19/Makefile
index 743e405cfb807d5ecffe16a04f9382fef1ab312f..f35e8ebd8619cbaba236a9c03a76e3e70b1998c6 100644
--- a/lesson18~19/Makefile
+++ b/lesson18~19/Makefile
@@ -5,7 +5,7 @@ OCFLAGES := -S -O binary
CCFLAGES := -c -march=rv32i -mabi=ilp32 -O0 -Wall -g
LKFLAGES := -march=rv32i -mabi=ilp32
QEMU := qemu-riscv32
-QFLAGES := -g 1234
+QFLAGES := -g 22
RM := rm
RMFLAGES := -rf
diff --git a/lesson20/.vscode/launch.json b/lesson20/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100644
--- a/lesson20/.vscode/launch.json
+++ b/lesson20/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson20/.vscode/tasks.json b/lesson20/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson20/.vscode/tasks.json
+++ b/lesson20/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson20/Makefile b/lesson20/Makefile
index b3ad58b11de66d38b7b7d3c603c750e6b80db96f..f84195f590e283c0b5a89f474c2f63967dc5b683 100644
--- a/lesson20/Makefile
+++ b/lesson20/Makefile
@@ -5,7 +5,7 @@ OCFLAGES := -S -O binary
CCFLAGES := -c -march=rv32iac -mabi=ilp32 -O0 -Wall -g
LKFLAGES := -march=rv32iac -mabi=ilp32
QEMU := qemu-riscv32
-QFLAGES := -g 1234
+QFLAGES := -g 22
RM := rm
RMFLAGES := -rf
diff --git a/lesson21~22/.vscode/launch.json b/lesson21~22/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100644
--- a/lesson21~22/.vscode/launch.json
+++ b/lesson21~22/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson21~22/.vscode/tasks.json b/lesson21~22/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson21~22/.vscode/tasks.json
+++ b/lesson21~22/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson21~22/Makefile b/lesson21~22/Makefile
index 55e406d35e3c20f485ea65d7c069d73e2b154daa..3cca00cc88f724d78ef359bdbb4df75ec635184d 100644
--- a/lesson21~22/Makefile
+++ b/lesson21~22/Makefile
@@ -5,7 +5,7 @@ OCFLAGES := -S -O binary
CCFLAGES := -c -march=rv32iac -mabi=ilp32 -O0 -Wall -g
LKFLAGES := -march=rv32iac -mabi=ilp32
QEMU := qemu-riscv32
-QFLAGES := -g 1234
+QFLAGES := -g 22
RM := rm
RMFLAGES := -rf
diff --git a/lesson23/.vscode/launch.json b/lesson23/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100644
--- a/lesson23/.vscode/launch.json
+++ b/lesson23/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson23/.vscode/tasks.json b/lesson23/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson23/.vscode/tasks.json
+++ b/lesson23/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson23/Makefile b/lesson23/Makefile
index cc52cfa8d6e734e3366c6bdea7092229a577ac78..6d16b4abebc4ef0baa0f15c9afba19b465e26b71 100644
--- a/lesson23/Makefile
+++ b/lesson23/Makefile
@@ -6,7 +6,7 @@ OCFLAGES := -S -O binary
CCFLAGES := -c -march=rv32i -mabi=ilp32 -O3 -Wall -save-temps
LKFLAGES := -nostdlib -T ld.lds -Map main.Map
QEMU := qemu-riscv32
-QFLAGES := -g 1234
+QFLAGES := -g 22
RM := rm
RMFLAGES := -rf
diff --git a/lesson24/.vscode/launch.json b/lesson24/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100644
--- a/lesson24/.vscode/launch.json
+++ b/lesson24/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson24/.vscode/tasks.json b/lesson24/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson24/.vscode/tasks.json
+++ b/lesson24/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson25/.vscode/launch.json b/lesson25/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100644
--- a/lesson25/.vscode/launch.json
+++ b/lesson25/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson25/.vscode/tasks.json b/lesson25/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson25/.vscode/tasks.json
+++ b/lesson25/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson26/.vscode/launch.json b/lesson26/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100644
--- a/lesson26/.vscode/launch.json
+++ b/lesson26/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson26/.vscode/tasks.json b/lesson26/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100644
--- a/lesson26/.vscode/tasks.json
+++ b/lesson26/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson28/.vscode/launch.json b/lesson28/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100755
--- a/lesson28/.vscode/launch.json
+++ b/lesson28/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson28/.vscode/tasks.json b/lesson28/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100755
--- a/lesson28/.vscode/tasks.json
+++ b/lesson28/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson29~30/.vscode/launch.json b/lesson29~30/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100755
--- a/lesson29~30/.vscode/launch.json
+++ b/lesson29~30/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson29~30/.vscode/tasks.json b/lesson29~30/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100755
--- a/lesson29~30/.vscode/tasks.json
+++ b/lesson29~30/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson32/.vscode/launch.json b/lesson32/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100755
--- a/lesson32/.vscode/launch.json
+++ b/lesson32/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson32/.vscode/tasks.json b/lesson32/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100755
--- a/lesson32/.vscode/tasks.json
+++ b/lesson32/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson34/.vscode/launch.json b/lesson34/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100755
--- a/lesson34/.vscode/launch.json
+++ b/lesson34/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson34/.vscode/tasks.json b/lesson34/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100755
--- a/lesson34/.vscode/tasks.json
+++ b/lesson34/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {
diff --git a/lesson35~36/.vscode/launch.json b/lesson35~36/.vscode/launch.json
index 9b8e176353a3224b0dbc91df42c5ddfd7df1d61d..168cc66b7c2c1e0e0705e6e4a125a22834ae7632 100755
--- a/lesson35~36/.vscode/launch.json
+++ b/lesson35~36/.vscode/launch.json
@@ -8,14 +8,14 @@
"name": "(gdb) 启动",
"type": "cppdbg",
"request": "launch",//文件名
- "miDebuggerServerAddress": "127.0.0.1:1234",//GDB连接的地址和端口,就是连接到本地运行的QEMU
+ "miDebuggerServerAddress": "61.160.194.81:22",// GDB远程服务器的地址和端口
"program": "${workspaceFolder}/main.elf", //GDB调试的可执行程序名称,里面有代码和符号等信息
"args": [],
"stopAtEntry": false, //调试时是否停止在程序的入口点处
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false, //调试时是否使用vscode集成的终端
- "miDebuggerPath": "/opt/riscv/gcc/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
+ "miDebuggerPath": "/opt/riscv/bin/riscv64-unknown-elf-gdb", //RISC-V工具链中的对应于RISC-V平台的GDB调试器
"MIMode": "gdb",
"miDebuggerArgs": "-q -x ./gdbinit", //传递给GDB的参数
"preLaunchTask": "Build and run", //运行GDB之前,先执行tasks.json文件中的"Build and run"操作,名称一定要与tasks.json文件中保持一致
diff --git a/lesson35~36/.vscode/tasks.json b/lesson35~36/.vscode/tasks.json
index 874e3ff27c657908e842c587c281c83fce9d1d0e..2502388126e627b221fd06421f58f4f0e931359f 100755
--- a/lesson35~36/.vscode/tasks.json
+++ b/lesson35~36/.vscode/tasks.json
@@ -16,7 +16,7 @@
"label": "Run RISCV-QEMU",//调用QEMU以用户模式执行RISC-V平台的程序
"type": "shell",
"isBackground": true,//让QEMU在后台运行
- "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 1234 ./*.elf", //-g 1234表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
+ "command": "echo Starting RISCV-QEMU&qemu-riscv32 -g 22 ./*.elf", //-g 22表示打开1234端口等待GDB的连接,进行调试,./*.elf表示
//编译好的RISC-V可执行程序,即main.elf
"problemMatcher": {
"pattern": {