From ddd78713ba7b1c718f687def132291ed6b66664b Mon Sep 17 00:00:00 2001 From: Werner <26710260+GuilhermeWerner@users.noreply.github.com> Date: Sat, 25 Dec 2021 08:20:19 -0300 Subject: [PATCH 1/2] Create LICENSE.txt --- LICENSE.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..4b939d7 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 GuilhermeWerner + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 4f9a05286ce446f4a7ef9c155a821e490779c457 Mon Sep 17 00:00:00 2001 From: Werner <26710260+GuilhermeWerner@users.noreply.github.com> Date: Sat, 25 Dec 2021 08:20:21 -0300 Subject: [PATCH 2/2] Update project structure --- .cargo/config.toml | 6 ++++++ .gitignore | 5 +---- Cargo.toml | 4 ++++ src/main.rs => Source/Main.rs | 1 + ps2.json | 3 --- rust-toolchain | 1 + 6 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .cargo/config.toml rename src/main.rs => Source/Main.rs (83%) create mode 100644 rust-toolchain diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..5ca2d0b --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,6 @@ +[build] +target-dir = "Binaries" +target = "ps2.json" + +[unstable] +build-std = ["core"] diff --git a/.gitignore b/.gitignore index 8fb7d78..33080b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,2 @@ -/target - +Binaries/ Cargo.lock - -*.tar.gz diff --git a/Cargo.toml b/Cargo.toml index 99f570b..b5b16ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,10 @@ name = "rust-ps2" version = "0.1.0" edition = "2018" +[[bin]] +name = "RustPS2" +path = "Source/Main.rs" + [dependencies] panic-halt = "0.2.0" prussia_rt = { git = "https://github.com/Ravenslofty/prussia" } diff --git a/src/main.rs b/Source/Main.rs similarity index 83% rename from src/main.rs rename to Source/Main.rs index 44becc8..8288454 100644 --- a/src/main.rs +++ b/Source/Main.rs @@ -1,5 +1,6 @@ #![no_std] #![no_main] +#![allow(non_snake_case)] #![allow(unused_imports)] use panic_halt; diff --git a/ps2.json b/ps2.json index a0134d6..0352121 100644 --- a/ps2.json +++ b/ps2.json @@ -8,16 +8,13 @@ "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": [ diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..bf867e0 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +nightly