Add basic ARM rust freestanding binary
Following the modern version of Philipp Oppermann's blog-tutorial. Build with `cargo build --target thumbv7em-none-eabihf`
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@
|
|||||||
gamarjoba_munde/gamarjoba
|
gamarjoba_munde/gamarjoba
|
||||||
baremetal_gamarjoba/baremetal_gamarjoba
|
baremetal_gamarjoba/baremetal_gamarjoba
|
||||||
keyboard/keyboard_kernel
|
keyboard/keyboard_kernel
|
||||||
|
target/
|
||||||
|
|||||||
7
os-in-rust/Cargo.lock
generated
Normal file
7
os-in-rust/Cargo.lock
generated
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "os-in-rust"
|
||||||
|
version = "0.1.0"
|
||||||
14
os-in-rust/Cargo.toml
Normal file
14
os-in-rust/Cargo.toml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
[package]
|
||||||
|
name = "os-in-rust"
|
||||||
|
version = "0.1.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
panic = "abort"
|
||||||
|
|
||||||
|
[profile.release]
|
||||||
|
panic = "abort"
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
15
os-in-rust/src/main.rs
Normal file
15
os-in-rust/src/main.rs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#![no_std]
|
||||||
|
#![no_main]
|
||||||
|
|
||||||
|
use core::panic::PanicInfo;
|
||||||
|
|
||||||
|
#[panic_handler]
|
||||||
|
fn panic(_info: &PanicInfo) -> ! {
|
||||||
|
loop {}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[no_mangle]
|
||||||
|
pub extern "C" fn _start() -> ! {
|
||||||
|
loop {}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user