Initial test framework

Clean up makefiles
Everything buildable under docker (or natively)
This commit is contained in:
Toby Jaffey 2025-12-10 16:36:33 +00:00
parent 5a0c70a017
commit da7f70c456
48 changed files with 7254 additions and 293 deletions

View file

@ -1,6 +1,6 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
version = 3
[[package]]
name = "aho-corasick"

View file

@ -1,8 +1,13 @@
PROJECT=rust-hello
TOPDIR=../../
all:
cargo build -r --target riscv32im-unknown-none-elf && docker run -v `pwd`:/data -w /data --rm riscv-dev riscv64-unknown-elf-objcopy target/riscv32im-unknown-none-elf/release/rust-hello -O binary rust-hello.bin
cargo build -r --target riscv32im-unknown-none-elf && ${PREFIX}objcopy target/riscv32im-unknown-none-elf/release/${PROJECT} -O binary ${PROJECT}.bin
clean: clean_common
rm -rf target
test: all
../../host/host rust-hello.bin
${TOPDIR}/host/host ${PROJECT}.bin
clean:
rm -rf rust-hello.bin target
include ${TOPDIR}/apps/makefile.common