Initial commit
This commit is contained in:
17
rdraught-pi/src/hello.rs
Normal file
17
rdraught-pi/src/hello.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use libc::printf;
|
||||
|
||||
extern crate libc;
|
||||
extern crate panic_halt;
|
||||
|
||||
#[link(name = "c", kind = "static")]
|
||||
unsafe extern "C" {}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub extern "C" fn main() {
|
||||
unsafe {
|
||||
printf("Hello world!!\n".as_ptr() as *const i8);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user