tg-clock-demo-0.4.8 is not a library.
tg-clock-demo
Chapter-1 extension kernel crate for periodic timer interrupt demo on RISC-V S-mode.
This crate builds a minimal bare-metal kernel that:
- boots in QEMU
virtmachine - enables S-mode timer interrupt
- programs next timer event
- handles timer trap and prints periodic logs
Installation
[]
= "0.4.8"
Quick Start
Run in project directory:
Or run with local script:
Minimal Flow
- initialize trap/timer
- call
tg-clock::init() - on each timer interrupt:
- acknowledge trap
- call
clock_set_next_event() - print tick message
API Summary
- kernel entry and trap flow:
src/main.rs - timer helper library:
tg-clock - linker script for memory layout:
src/linker.ld
Notes
- Target:
riscv64gc-unknown-none-elf - Runtime:
no_stdbare-metal - Depends on
tg-rcore-tutorial-sbiandtg-clock