Merge pull request #2 from ianchen0119/patch-1

Update README.md
This commit is contained in:
陳鍾誠
2020-12-01 20:27:12 +08:00
committed by GitHub

View File

@@ -1,17 +1,17 @@
# 03-ContextSwitch # 02-ContextSwitch
## Build & Run ## Build & Run
```sh ```sh
user@DESKTOP-96FRN6B MINGW64 /d/ccc109/sp/11-os/mini-riscv-os/03-ContextSwitch (master) user@DESKTOP-96FRN6B MINGW64 /d/ccc109/sp/11-os/mini-riscv-os/02-ContextSwitch (master)
$ make clean $ make clean
rm -f *.elf rm -f *.elf
user@DESKTOP-96FRN6B MINGW64 /d/ccc109/sp/11-os/mini-riscv-os/03-ContextSwitch (master) user@DESKTOP-96FRN6B MINGW64 /d/ccc109/sp/11-os/mini-riscv-os/02-ContextSwitch (master)
$ make $ make
riscv64-unknown-elf-gcc -nostdlib -fno-builtin -mcmodel=medany -march=rv32ima -mabi=ilp32 -T os.ld -o os.elf start.s sys.s lib.c os.c riscv64-unknown-elf-gcc -nostdlib -fno-builtin -mcmodel=medany -march=rv32ima -mabi=ilp32 -T os.ld -o os.elf start.s sys.s lib.c os.c
user@DESKTOP-96FRN6B MINGW64 /d/ccc109/sp/11-os/mini-riscv-os/03-ContextSwitch (master) user@DESKTOP-96FRN6B MINGW64 /d/ccc109/sp/11-os/mini-riscv-os/02-ContextSwitch (master)
$ make qemu $ make qemu
Press Ctrl-A and then X to exit QEMU Press Ctrl-A and then X to exit QEMU
qemu-system-riscv32 -nographic -smp 4 -machine virt -bios none -kernel os.elf qemu-system-riscv32 -nographic -smp 4 -machine virt -bios none -kernel os.elf