From 97437b3bcb6bc00daf282454da5b21e128190763 Mon Sep 17 00:00:00 2001 From: cheapie Date: Tue, 10 Nov 2026 16:59:24 -0600 Subject: Add sha256 sample --- assembly/sha256/Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 assembly/sha256/Makefile (limited to 'assembly/sha256/Makefile') 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 + -- cgit v1.2.3