From 85b5fde272be6ab543aa866baebabddc24566bdb Mon Sep 17 00:00:00 2001 From: cheapie Date: Sat, 23 May 2026 20:14:34 -0500 Subject: Add initial content --- c/squares/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 c/squares/Makefile (limited to 'c/squares/Makefile') diff --git a/c/squares/Makefile b/c/squares/Makefile new file mode 100644 index 0000000..f957bfa --- /dev/null +++ b/c/squares/Makefile @@ -0,0 +1,20 @@ +all: squares.hex + +squares.o: squares.c + clang -target riscv32-none-elf -I../rvcontroller-libraries -march=rv32imacb_zicntr_zicond_zicsr_zifencei_zihintpause_zilsd_zclsd_zabha_zacas_zbkb_zbkx_zcb_zcmp_zcmt -ffreestanding -O3 -c -o squares.o squares.c + +squares.elf: ../rvcontroller-libraries/rvcontroller-init.o ../rvcontroller-libraries/rvcontroller-ecalls.o squares.o + riscv32-none-elf-ld -T rvcontroller.ld --no-warn-rwx-segments -o squares.elf ../rvcontroller-libraries/rvcontroller-init.o squares.o ../rvcontroller-libraries/rvcontroller-ecalls.o + +dump: squares.elf + riscv32-none-elf-objdump -d squares.elf + +squares.hex: squares.elf + riscv32-none-elf-objcopy -O ihex squares.elf squares.hex + +load: squares.hex + bash -c "wl-copy < squares.hex" + +clean: + rm -f squares.bin squares.elf squares.o init.o + -- cgit v1.2.3