Chapter3: power2/3/5 & sleep test worked on k210/qemu based on timer.

This commit is contained in:
Yifan Wu 2020-11-29 10:31:15 +08:00
parent adbe671fe1
commit 1cef77eac7
17 changed files with 183 additions and 82 deletions

View file

@ -14,6 +14,7 @@ mod trap;
mod loader;
mod config;
mod task;
mod timer;
global_asm!(include_str!("entry.asm"));
global_asm!(include_str!("link_app.S"));
@ -34,6 +35,9 @@ pub fn rust_main() -> ! {
println!("[kernel] Hello, world!");
trap::init();
loader::load_apps();
trap::enable_interrupt();
trap::enable_timer_interrupt();
timer::set_next_trigger();
task::run_first_task();
panic!("Unreachable in rust_main!");
}