mirror of
https://github.com/cccriscv/mini-riscv-os.git
synced 2025-11-16 04:24:33 +00:00
19 lines
442 B
Markdown
19 lines
442 B
Markdown
# 04-TimerInterrupt
|
|
|
|
## Build & Run
|
|
|
|
```sh
|
|
$ 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 timer.c os.c
|
|
$ make qemu
|
|
Press Ctrl-A and then X to exit QEMU
|
|
qemu-system-riscv32 -nographic -smp 4 -machine virt -bios none -kernel os.elf
|
|
OS start
|
|
timer_handler: 1
|
|
timer_handler: 2
|
|
timer_handler: 3
|
|
timer_handler: 4
|
|
timer_handler: 5
|
|
QEMU: Terminated
|
|
```
|