From 268ba00a738357db73dac209f0b55eef69b00127 Mon Sep 17 00:00:00 2001 From: ZimingYuan <6514145+ZimingYuan@user.noreply.gitee.com> Date: Mon, 14 Dec 2020 23:27:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E6=AD=A3=E6=8B=BC=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chapter2.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chapter2.md b/chapter2.md index 31a99f7..9ce300e 100644 --- a/chapter2.md +++ b/chapter2.md @@ -160,7 +160,7 @@ you need add your code! **2.2.1 练习一:hello world** - 首先进入app目录下。我们先来编写一个简单的hello world程序,我们编写hellowrold.c源文件如下: + 首先进入app目录下。我们先来编写一个简单的hello world程序,我们编写helloworld.c源文件如下: ``` 1 #include @@ -173,15 +173,15 @@ you need add your code! 8 } ``` -例2.1 hellowrold.c +例2.1 helloworld.c -使用riscv64-unknown-elf-gcc编译该文件,得到的ELF文件hellowrold。 +使用riscv64-unknown-elf-gcc编译该文件,得到的ELF文件helloworld。 -`$riscv64-unknown-elf-gcc hellowrold.c -o elf/hellowrold` +`$riscv64-unknown-elf-gcc helloworld.c -o elf/helloworld` 现在回到上一级目录,使用pke来运行二进制文件: -`$spike obj/pke app/elf/hellowrold` +`$spike obj/pke app/elf/helloworld` ​ 你可以得到以下输出: