Create cargo project

This commit is contained in:
GuilhermeWerner
2021-09-15 14:28:24 -03:00
parent 78f672eb4f
commit acf3c45e98
3 changed files with 57 additions and 0 deletions

18
Cargo.toml Normal file
View File

@ -0,0 +1,18 @@
[package]
name = "rust-ps2"
version = "0.1.0"
edition = "2018"
[dependencies]
panic-halt = "0.2.0"
prussia_rt = { git = "https://github.com/Ravenslofty/prussia" }
[profile.dev]
panic = "abort"
[profile.release]
panic = "abort"
[package.metadata.cargo-xbuild]
memcpy = true
sysroot_path = "target/sysroot"

28
ps2.json Normal file
View File

@ -0,0 +1,28 @@
{
"arch": "mips",
"cpu": "mips2",
"data-layout": "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64",
"executables": true,
"features": "+mips2",
"is-builtin": false,
"linker": "mips64el-none-elf-ld",
"linker-flavor": "ld",
"llvm-target": "mipsel-none-elf",
"llvm-args": "-mxgot",
"max-atomic-width": 32,
"os": "none",
"panic_strategy": "abort",
"position-independent-executables": false,
"relro-level": "full",
"target-c-int-width": "32",
"target-endian": "little",
"target-pointer-width": "32",
"soft-float": true,
"vendor": "unknown",
"post-link-args": {
"ld": [
"-Tlinkfile.ld"
]
},
"relocation-model": "static"
}

11
src/main.rs Normal file
View File

@ -0,0 +1,11 @@
#![no_std]
#![no_main]
#![allow(unused_imports)]
use panic_halt;
use prussia_rt;
#[no_mangle]
fn main() -> ! {
loop {}
}