Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Nov 12, 2023
1 parent 20d62e2 commit b5b50bd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
12 changes: 6 additions & 6 deletions example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ elf: $(patsubst %/go.mod,bin/%.elf,$(wildcard */go.mod))
.PHONY: dump
dump: $(patsubst %/go.mod,bin/%.dump,$(wildcard */go.mod))

# .PHONY: ex-rs
# ex-rs:
# cd hello-rs && \
# RUSTFLAGS='-C link-arg=-no-pie -C target-cpu=mips32 -C target-feature=-mips32r2,-fpxx,-nooddspreg,+mips32,+crt-static,+soft-float' \
# cross build --release --target ../mips-unknown-linux-gnu.json -Z build-std -Z build-std-features=panic-unwind && \
# cp ../../target/mips-unknown-linux-gnu/release/hello-rs ../bin/hello-rs.elf
.PHONY: ex-rs
ex-rs:
cd hello-rs && \
RUSTFLAGS='-C link-arg=-no-pie -C target-cpu=mips32 -C target-feature=-mips32r2,-fpxx,-nooddspreg,+mips32,+crt-static,+soft-float' \
cross build --release --target ./mips-unknown-linux-gnu.json -Z build-std -Z build-std-features=panic-unwind && \
cp ../../target/mips-unknown-linux-gnu/release/hello-rs ../bin/hello-rs.elf

bin:
mkdir bin
Expand Down
10 changes: 10 additions & 0 deletions example/hello-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "hello-rs"
edition = "2021"
version = "0.0.1"

[dependencies]
# no dependencies

[profile.release]
panic = "abort"
5 changes: 5 additions & 0 deletions example/hello-rs/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
use std::io::{self, Write};

fn main() {
io::stdout().write_all(b"hello world!\n").unwrap();
}

0 comments on commit b5b50bd

Please sign in to comment.