Compiled on target platform.

This commit is contained in:
Yifan Wu 2020-11-10 23:02:38 +08:00
parent 278bae2391
commit 29f4683ad8
6 changed files with 28 additions and 0 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
.idea/*
os/target/*

2
os/.cargo/config Normal file
View file

@ -0,0 +1,2 @@
[build]
target = "riscv64gc-unknown-none-elf"

5
os/Cargo.lock generated Normal file
View file

@ -0,0 +1,5 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "os"
version = "0.1.0"

9
os/Cargo.toml Normal file
View file

@ -0,0 +1,9 @@
[package]
name = "os"
version = "0.1.0"
authors = ["Yifan Wu <shinbokuow@163.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

6
os/src/lang_items.rs Normal file
View file

@ -0,0 +1,6 @@
use core::panic::PanicInfo;
#[panic_handler]
fn panic(_info: &PanicInfo) -> ! {
loop {}
}

5
os/src/main.rs Normal file
View file

@ -0,0 +1,5 @@
#![no_std]
#![no_main]
mod lang_items;