diff options
| author | cheapie <no-email-for-you@example.com> | 2026-05-23 20:14:34 -0500 |
|---|---|---|
| committer | cheapie <no-email-for-you@example.com> | 2026-05-23 20:14:34 -0500 |
| commit | 85b5fde272be6ab543aa866baebabddc24566bdb (patch) | |
| tree | b4f2e3bb634effe51c2bdc5585ca4ea8b98d6dfa /c/squares/Makefile | |
| download | rvcontroller-85b5fde272be6ab543aa866baebabddc24566bdb.tar rvcontroller-85b5fde272be6ab543aa866baebabddc24566bdb.tar.gz rvcontroller-85b5fde272be6ab543aa866baebabddc24566bdb.tar.bz2 rvcontroller-85b5fde272be6ab543aa866baebabddc24566bdb.tar.xz rvcontroller-85b5fde272be6ab543aa866baebabddc24566bdb.zip | |
Add initial content
Diffstat (limited to 'c/squares/Makefile')
| -rw-r--r-- | c/squares/Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
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 + |
