From 5689f7c9b1c51f823263a7afaeec4930d68d1134 Mon Sep 17 00:00:00 2001 From: Corwin Kuiper Date: Sat, 10 Apr 2021 18:30:08 +0100 Subject: [PATCH] change built target to thumbv4t-none-eabi --- .cargo/config.toml | 2 +- Dockerfile | 7 ++++--- Makefile | 8 ++++---- gba.json | 35 ----------------------------------- 4 files changed, 9 insertions(+), 43 deletions(-) delete mode 100644 gba.json diff --git a/.cargo/config.toml b/.cargo/config.toml index 81b02eb0..069415d8 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -3,4 +3,4 @@ build-std = ["core", "compiler_builtins", "alloc"] build-std-features = ["compiler-builtins-mem"] [build] -target = "gba.json" +target = "thumbv4t-none-eabi" diff --git a/Dockerfile b/Dockerfile index 2a1973e3..c3e94223 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,14 @@ -FROM docker.io/devkitpro/devkitarm:20190212 +FROM docker.io/ubuntu:latest RUN apt-get update && \ - apt-get install -y build-essential && \ + apt-get install -y build-essential binutils-arm-none-eabi curl && \ apt-get clean RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly RUN . "$HOME/.cargo/env" && \ rustup component add rust-src -RUN echo 'export PATH=$PATH:$DEVKITARM/bin' >> $HOME/.bashrc +RUN . "$HOME/.cargo/env" && \ + cargo install gbafix CMD /bin/bash \ No newline at end of file diff --git a/Makefile b/Makefile index c4d4a727..1880d4cd 100644 --- a/Makefile +++ b/Makefile @@ -30,18 +30,18 @@ r-%: out/release/%.gba cargo-release-%: $(RUSTFILES) out/crt0.o @OUTNAME=$(patsubst cargo-release-%,%, $@) - @rustup run nightly cargo build --release --target=gba.json --example=$${OUTNAME} + @rustup run nightly cargo build --release --example=$${OUTNAME} cargo-debug-%: $(RUSTFILES) out/crt0.o @OUTNAME=$(patsubst cargo-debug-%,%, $@) - @rustup run nightly cargo build --target=gba.json --example=$${OUTNAME} + @rustup run nightly cargo build --example=$${OUTNAME} out/crt0.o: crt0.s interrupt_simple.s @mkdir -p $(dir $@) @$(CC) $(ARCH) -o out/crt0.o crt0.s clippy: - rustup run nightly cargo clippy --target=gba.json + rustup run nightly cargo clippy doc: - rustup run nightly cargo doc --target=gba.json \ No newline at end of file + rustup run nightly cargo doc \ No newline at end of file diff --git a/gba.json b/gba.json deleted file mode 100644 index 4137d415..00000000 --- a/gba.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "abi-blacklist": [ - "stdcall", - "fastcall", - "vectorcall", - "thiscall", - "win64", - "sysv64" - ], - "arch": "arm", - "atomic-cas": false, - "cpu": "arm7tdmi", - "data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", - "emit-debug-gdb-scripts": false, - "env": "agb", - "executables": true, - "features": "+soft-float,+strict-align", - "linker": "arm-none-eabi-ld", - "linker-flavor": "ld", - "linker-is-gnu": true, - "llvm-target": "thumbv4-none-eabi", - "os": "none", - "panic-strategy": "abort", - "pre-link-args": { - "ld": [ - "out/crt0.o", - "-Tgba.ld" - ] - }, - "relocation-model": "static", - "target-c-int-width": "32", - "target-endian": "little", - "target-pointer-width": "32", - "vendor": "nintendo" -} \ No newline at end of file