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/elevator/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/elevator/Makefile')
| -rw-r--r-- | c/elevator/Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/c/elevator/Makefile b/c/elevator/Makefile new file mode 100644 index 0000000..875cd3b --- /dev/null +++ b/c/elevator/Makefile @@ -0,0 +1,20 @@ +all: elevator.hex + +elevator.o: elevator.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 elevator.o elevator.c + +elevator.elf: ../rvcontroller-libraries/rvcontroller-init.o ../rvcontroller-libraries/rvcontroller-ecalls.o elevator.o + riscv32-none-elf-ld -T rvcontroller.ld --no-warn-rwx-segments -o elevator.elf ../rvcontroller-libraries/rvcontroller-init.o elevator.o ../rvcontroller-libraries/rvcontroller-ecalls.o + +dump: elevator.elf + riscv32-none-elf-objdump -d elevator.elf + +elevator.hex: elevator.elf + riscv32-none-elf-objcopy -O ihex elevator.elf elevator.hex + +load: elevator.hex + bash -c "wl-copy < elevator.hex" + +clean: + rm -f elevator.bin elevator.elf elevator.o init.o + |
