From 56706e1f3837ce9e3e6a97c5062eed8c3ba11513 Mon Sep 17 00:00:00 2001 From: Demo Date: Sat, 9 Mar 2019 13:57:06 -0500 Subject: [PATCH] finally added a makefile --- src/riscv_gpgpu/Makefile | 18 ++++++++++++++++++ src/riscv_gpgpu/gpgpu_test.elf | Bin 11212 -> 11300 bytes src/riscv_gpgpu/hi.sh | 6 +++--- src/riscv_gpgpu/lib/hi.sh | 6 +++--- 4 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 src/riscv_gpgpu/Makefile diff --git a/src/riscv_gpgpu/Makefile b/src/riscv_gpgpu/Makefile new file mode 100644 index 00000000..9af1542d --- /dev/null +++ b/src/riscv_gpgpu/Makefile @@ -0,0 +1,18 @@ + +COMP = /opt/riscv/bin/riscv32-unknown-elf-gcc +CC_FLAGS = -march=rv32i -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib + +DMP = /opt/riscv/bin/riscv32-unknown-elf-objdump +CPY = /opt/riscv/bin/riscv32-unknown-elf-objcopy + + +all: HEX DUMP ELF + +DUMP: ELF + $(DMP) -D gpgpu_test.elf > gpgpu_test.dump + +HEX: ELF + $(CPY) -O ihex gpgpu_test.elf gpgpu_test.hex + +ELF: + $(COMP) $(CC_FLAGS) ./lib/lib.s gpgpu_test.c ./lib/queue.s ./lib/lib.c -o gpgpu_test.elf diff --git a/src/riscv_gpgpu/gpgpu_test.elf b/src/riscv_gpgpu/gpgpu_test.elf index bd41d3a66e2095d003e619172cf8465ab6ce11cc..f8794ed49a09b838351dccd8eb6d6ca1c62a45ee 100755 GIT binary patch delta 774 zcmbV~%S!@L6voeJSqm!@ik3nxw2TqQp@JSmMUQPnwQyniNL11+TtqR`-bH2m2wVn2 zwFz1jK@bQ*v}n;XTD7Tvz`mn1dDk6=`R?zWbI<+mFxA!a+L5Q@W02|*A`jV)hv%;z zdWv0_uDf1+68QllqfwV=0Sm9dOJGglFxW3}0z4{k7HmZeeb@FafHL1e+x~LjdhH$% zY$j@tSZ8caLr>tcz*TU&y;*+-dj)<0Tfqmu0b;FW;8Nr!i9Vp!Ryx$6-K5*;6APn- zj9Vx-{6JmijhOk-P}j`513WGabc5fdh9U0n2fy-2D6u zhAr>~Hk_I~2QCT+E`fK=FT(v1a1IB?%zjpF@Nh_&BdS`nh zsfO|a#AZ%jmgQ(PsO09h=S!Ww>9K$8&Mg)K*_o@bZ$&Cy557y4((zD#Uj@Ip%C5{{ GpB%rwHgrD# delta 674 zcmYk2u}eZx6voeePhU|=DpEs>V1cF~M37O#LoD0Epp2FxUsRwaW#H6%uHlf_&>tX8 zE)_&WLu=qz(9{wRfs0$4eb@J1@802l_jk^B&pG!tx7)evkheBNgEdbflIyb>SGH5u z>eV1q?oZCg9(=Fkx*vuqBEvK?n#3U@@HAKzI023eya-MToC4d+MZNyI4N%Uz(4qfW zPwyWB=A1ykfOA1|208^d1wI20%TE3R91*wzwij=B3DDeR;87GHMpw|bo2n|*Pr6Js z91Is3FHml{h5D=)alQkq$g5Vq1zi>jK7&7*IS}{1f!}#aX4d-vd#nL@{u_*C4xp1n z9W!8X;f5eCws7Ib;x4o%H2ejZtsmij1^yBmYLQU?$$~21np75XmIF0&8@NMt{ zVFcpBgh_B$Xs`lSF)@a~mr0ZXLk#SLfhkcgmJ<1Vc6Dw4AlF!mraWdKy>nbC<{qD- TTdXk>`(m4opI8{XH$L$Pur62I diff --git a/src/riscv_gpgpu/hi.sh b/src/riscv_gpgpu/hi.sh index 7f836145..d44ef33e 100755 --- a/src/riscv_gpgpu/hi.sh +++ b/src/riscv_gpgpu/hi.sh @@ -1,3 +1,3 @@ - /opt/riscv/bin/riscv32-unknown-linux-gnu-gcc -march=rv32i -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib ./lib/lib.s gpgpu_test.c ./lib/queue.s ./lib/lib.c -o gpgpu_test.elf - /opt/riscv/bin/riscv32-unknown-linux-gnu-objdump -D gpgpu_test.elf > gpgpu_test.dump - /opt/riscv/bin/riscv32-unknown-linux-gnu-objcopy -O ihex gpgpu_test.elf gpgpu_test.hex \ No newline at end of file + /opt/riscv/bin/riscv32-unknown-elf-gcc -march=rv32i -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib ./lib/lib.s gpgpu_test.c ./lib/queue.s ./lib/lib.c -o gpgpu_test.elf + /opt/riscv/bin/riscv32-unknown-elf-objdump -D gpgpu_test.elf > gpgpu_test.dump + /opt/riscv/bin/riscv32-unknown-elf-objcopy -O ihex gpgpu_test.elf gpgpu_test.hex diff --git a/src/riscv_gpgpu/lib/hi.sh b/src/riscv_gpgpu/lib/hi.sh index e2aa26b1..dbc82e19 100755 --- a/src/riscv_gpgpu/lib/hi.sh +++ b/src/riscv_gpgpu/lib/hi.sh @@ -1,3 +1,3 @@ - /opt/riscv-nommu/bin/riscv32-unknown-linux-gnu-gcc -march=rv32i -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib queue.c -o queue.elf - /opt/riscv-nommu/bin/riscv32-unknown-linux-gnu-objdump -D queue.elf > queue.dump - /opt/riscv-nommu/bin/riscv32-unknown-linux-gnu-objcopy -O ihex queue.elf queue.hex \ No newline at end of file +/opt/riscv/bin/riscv32-unknown-elf-gcc -march=rv32i -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib queue.c -o queue.elf +/opt/riscv/bin/riscv32-unknown-elf-objdump -D queue.elf > queue.dump +/opt/riscv/bin/riscv32-unknown-elf-objcopy -O ihex queue.elf queue.hex \ No newline at end of file