mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
change built target to thumbv4t-none-eabi
This commit is contained in:
parent
bc6f3e6f80
commit
5689f7c9b1
|
@ -3,4 +3,4 @@ build-std = ["core", "compiler_builtins", "alloc"]
|
||||||
build-std-features = ["compiler-builtins-mem"]
|
build-std-features = ["compiler-builtins-mem"]
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
target = "gba.json"
|
target = "thumbv4t-none-eabi"
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
FROM docker.io/devkitpro/devkitarm:20190212
|
FROM docker.io/ubuntu:latest
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y build-essential && \
|
apt-get install -y build-essential binutils-arm-none-eabi curl && \
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
||||||
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
|
||||||
RUN . "$HOME/.cargo/env" && \
|
RUN . "$HOME/.cargo/env" && \
|
||||||
rustup component add rust-src
|
rustup component add rust-src
|
||||||
|
|
||||||
RUN echo 'export PATH=$PATH:$DEVKITARM/bin' >> $HOME/.bashrc
|
RUN . "$HOME/.cargo/env" && \
|
||||||
|
cargo install gbafix
|
||||||
|
|
||||||
CMD /bin/bash
|
CMD /bin/bash
|
8
Makefile
8
Makefile
|
@ -30,18 +30,18 @@ r-%: out/release/%.gba
|
||||||
|
|
||||||
cargo-release-%: $(RUSTFILES) out/crt0.o
|
cargo-release-%: $(RUSTFILES) out/crt0.o
|
||||||
@OUTNAME=$(patsubst cargo-release-%,%, $@)
|
@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
|
cargo-debug-%: $(RUSTFILES) out/crt0.o
|
||||||
@OUTNAME=$(patsubst cargo-debug-%,%, $@)
|
@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
|
out/crt0.o: crt0.s interrupt_simple.s
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
@$(CC) $(ARCH) -o out/crt0.o crt0.s
|
@$(CC) $(ARCH) -o out/crt0.o crt0.s
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
rustup run nightly cargo clippy --target=gba.json
|
rustup run nightly cargo clippy
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
rustup run nightly cargo doc --target=gba.json
|
rustup run nightly cargo doc
|
35
gba.json
35
gba.json
|
@ -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"
|
|
||||||
}
|
|
Loading…
Reference in a new issue