summaryrefslogtreecommitdiff
path: root/assembly/sha256/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'assembly/sha256/Makefile')
-rw-r--r--assembly/sha256/Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/assembly/sha256/Makefile b/assembly/sha256/Makefile
new file mode 100644
index 0000000..bd09508
--- /dev/null
+++ b/assembly/sha256/Makefile
@@ -0,0 +1,24 @@
+MARCH ?= rv32imacbzicntr_zicond_zicsr_zifencei_zihintpause_zilsd_zclsd_zabha_zacas_zbkb_zbkx_zcb_zcmp_zcmt_zicboz_zk
+
+.PHONY: all dump load clean
+
+all: sha256.hex
+
+sha256.o: sha256.S
+ riscv32be-none-elf-as -I../rvcontroller-libraries -march=${MARCH} -o sha256.o sha256.S
+
+sha256.elf: sha256.o
+ riscv32be-none-elf-ld -T rvcontroller.ld --no-warn-rwx-segments -o sha256.elf sha256.o
+
+dump: sha256.elf
+ riscv32be-none-elf-objdump -d sha256.elf
+
+sha256.hex: sha256.elf
+ riscv32be-none-elf-objcopy -O ihex sha256.elf sha256.hex
+
+load: sha256.hex
+ bash -c "wl-copy < sha256.hex"
+
+clean:
+ rm -f sha256.hex sha256.elf sha256.o
+