fixed runtime Makefile
This commit is contained in:
@@ -1,14 +1,12 @@
|
|||||||
|
|
||||||
# To set a custom TOOLPATH, call make like this:
|
RISCV_TOOL_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||||
# TOOLPATH=../../../../riscv-gnu-toolchain/drops/bin make ...
|
|
||||||
TOOLPATH ?= ~/dev/riscv-gnu-toolchain/drops/bin
|
|
||||||
|
|
||||||
COMP = $(TOOLPATH)/riscv32-unknown-elf-gcc
|
COMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../vortex_link.ld -ffreestanding -nostartfiles
|
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../vortex_link.ld -ffreestanding -nostartfiles
|
||||||
|
|
||||||
DMP = $(TOOLPATH)/riscv32-unknown-elf-objdump
|
DMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||||
CPY = $(TOOLPATH)/riscv32-unknown-elf-objcopy
|
CPY = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
|
|
||||||
VX_STR = ../../startup/vx_start.s
|
VX_STR = ../../startup/vx_start.s
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
|
|
||||||
COMP = ../../../../riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-gcc
|
RISCV_TOOL_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||||
|
|
||||||
|
COMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../vortex_link.ld
|
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../vortex_link.ld
|
||||||
|
|
||||||
DMP = ../../../../riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objdump
|
DMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||||
CPY = ../../../../riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objcopy
|
CPY = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
|
|
||||||
NEWLIB = ../../newlib/newlib.c ../../newlib/newlib_notimp.c ../../newlib/newlib.s
|
NEWLIB = ../../newlib/newlib.c
|
||||||
VX_STR =
|
VX_STR =
|
||||||
VX_INT = ../../intrinsics/vx_intrinsics.s
|
VX_INT = ../../intrinsics/vx_intrinsics.s
|
||||||
VX_IO =
|
VX_IO = ../../io/vx_io.s ../../io/vx_io.c
|
||||||
VX_API =
|
VX_API =
|
||||||
VX_TEST =
|
VX_TEST =
|
||||||
VX_FIO =
|
VX_FIO =
|
||||||
LIBS = ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libc.a ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
LIBS = $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libc.a $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
||||||
|
|
||||||
VX_MAIN = hello
|
VX_MAIN = hello
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
|
|
||||||
COMP = ../../../../riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-g++
|
RISCV_TOOL_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||||
|
|
||||||
|
COMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-g++
|
||||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostartfiles
|
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostartfiles
|
||||||
CC_FLAGS = -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nostartfiles -nodefaultlibs -Wl,-Bstatic,-T,../vortex_link.ld -march=rv32im -mabi=ilp32
|
CC_FLAGS = -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nostartfiles -nodefaultlibs -Wl,-Bstatic,-T,../vortex_link.ld -march=rv32im -mabi=ilp32
|
||||||
|
|
||||||
DMP = ../../../../riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objdump
|
DMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||||
CPY = ../../../../riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objcopy
|
CPY = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
# VX_STR = ../../startup/vx_start.s
|
# VX_STR = ../../startup/vx_start.s
|
||||||
|
|
||||||
@@ -18,7 +20,7 @@ VX_IO = ../../io/vx_io.s ../../io/vx_io.c
|
|||||||
VX_API = ../../vx_api/vx_api.c
|
VX_API = ../../vx_api/vx_api.c
|
||||||
VX_TEST = ../../tests/tests.c
|
VX_TEST = ../../tests/tests.c
|
||||||
VX_FIO = ../../fileio/fileio.s
|
VX_FIO = ../../fileio/fileio.s
|
||||||
LIBS = -Wl,--whole-archive ./libs/libvecadd.a -Wl,--no-whole-archive ./libs/libOpenCL.a ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libc.a ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
LIBS = -Wl,--whole-archive ./libs/libvecadd.a -Wl,--no-whole-archive ./libs/libOpenCL.a $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libc.a $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
||||||
|
|
||||||
VX_MAIN = vx_pocl_main
|
VX_MAIN = vx_pocl_main
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
|
|
||||||
COMP = /opt/riscv/bin/riscv32-unknown-elf-gcc
|
RISCV_TOOL_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||||
|
|
||||||
|
COMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../vortex_link.ld -ffreestanding -nostartfiles -nostdlib
|
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../vortex_link.ld -ffreestanding -nostartfiles -nostdlib
|
||||||
|
|
||||||
DMP = /opt/riscv/bin/riscv32-unknown-elf-objdump
|
DMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||||
CPY = /opt/riscv/bin/riscv32-unknown-elf-objcopy
|
CPY = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
|
|
||||||
NEWLIB = ../../newlib/newlib.c ../../newlib/newlib_notimp.c ../../newlib/newlib.s
|
NEWLIB = ../../newlib/newlib.c
|
||||||
VX_STR = ../../startup/vx_start.s
|
VX_STR = ../../startup/vx_start.s
|
||||||
VX_INT = ../../intrinsics/vx_intrinsics.s
|
VX_INT = ../../intrinsics/vx_intrinsics.s
|
||||||
VX_IO = ../../io/vx_io.s ../../io/vx_io.c
|
VX_IO = ../../io/vx_io.s ../../io/vx_io.c
|
||||||
@@ -26,7 +28,7 @@ HEX: ELF
|
|||||||
$(CPY) -O ihex vx_nl_main.elf vx_nl_main.hex
|
$(CPY) -O ihex vx_nl_main.elf vx_nl_main.hex
|
||||||
|
|
||||||
ELF:
|
ELF:
|
||||||
$(COMP) $(CC_FLAGS) $(VX_STR) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST) $(VX_MAIN) /opt/riscv/riscv32-unknown-elf/lib/libc.a /opt/riscv/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc -o vx_nl_main.elf
|
$(COMP) $(CC_FLAGS) $(VX_STR) $(VX_FIO) $(NEWLIB) $(VX_INT) $(VX_IO) $(VX_API) $(VX_TEST) $(VX_MAIN) $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libc.a $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc -o vx_nl_main.elf
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf *.o *.elf *.dump *.hex *.qemu *.log *.debug
|
rm -rf *.o *.elf *.dump *.hex *.qemu *.log *.debug
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
COMP = riscv32-unknown-elf-gcc
|
RISCV_TOOL_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||||
|
|
||||||
|
COMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../vortex_link.ld -ffreestanding -nostdlib
|
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,../vortex_link.ld -ffreestanding -nostdlib
|
||||||
|
|
||||||
DMP = riscv32-unknown-elf-objdump
|
DMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||||
CPY = riscv32-unknown-elf-objcopy
|
CPY = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
|
|
||||||
NEWLIB = ../../newlib/newlib.c
|
NEWLIB = ../../newlib/newlib.c
|
||||||
@@ -13,7 +15,7 @@ VX_IO = ../../io/vx_io.s ../../io/vx_io.c
|
|||||||
VX_API = ../../vx_api/vx_api.c
|
VX_API = ../../vx_api/vx_api.c
|
||||||
VX_TEST = ../../tests/tests.c
|
VX_TEST = ../../tests/tests.c
|
||||||
VX_FIO = ../../fileio/fileio.s
|
VX_FIO = ../../fileio/fileio.s
|
||||||
LIBS = ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libc.a ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
LIBS = $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libc.a $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
||||||
|
|
||||||
VX_MAIN = vx_simple_main
|
VX_MAIN = vx_simple_main
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
|
|
||||||
COMP = ../../../../riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-g++
|
RISCV_TOOL_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||||
|
|
||||||
|
COMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-g++
|
||||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostartfiles
|
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostartfiles
|
||||||
CC_FLAGS = -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nostartfiles -nodefaultlibs -Wl,-Bstatic,-T,../vortex_link.ld -march=rv32im -mabi=ilp32
|
CC_FLAGS = -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nostartfiles -nodefaultlibs -Wl,-Bstatic,-T,../vortex_link.ld -march=rv32im -mabi=ilp32
|
||||||
|
|
||||||
DMP = ../../../../riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objdump
|
DMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||||
CPY = ../../../../riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objcopy
|
CPY = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||||
|
|
||||||
# VX_STR = ../../startup/vx_start.s
|
# VX_STR = ../../startup/vx_start.s
|
||||||
|
|
||||||
@@ -18,7 +20,7 @@ VX_IO = ../../io/vx_io.s ../../io/vx_io.c
|
|||||||
VX_API = ../../vx_api/vx_api.c
|
VX_API = ../../vx_api/vx_api.c
|
||||||
VX_TEST = ../../tests/tests.c
|
VX_TEST = ../../tests/tests.c
|
||||||
VX_FIO = ../../fileio/fileio.s
|
VX_FIO = ../../fileio/fileio.s
|
||||||
LIBS = -Wl,--whole-archive ./libs/libvecadd.a -Wl,--no-whole-archive ./libs/libOpenCL.a ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libc.a ../../../../riscv-gnu-toolchain/drops/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
LIBS = -Wl,--whole-archive ./libs/libvecadd.a -Wl,--no-whole-archive ./libs/libOpenCL.a $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libc.a $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
||||||
|
|
||||||
VX_MAIN = vx_pocl_main
|
VX_MAIN = vx_pocl_main
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
COMP = /home/priya/dev/riscv_vec/riscv-gnu/bin/riscv32-unknown-elf-gcc
|
RISCV_TOOL_PATH ?= $(wildcard ../../../../riscv-gnu-toolchain/drops)
|
||||||
|
|
||||||
|
COMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-gcc
|
||||||
|
|
||||||
CC_FLAGS = -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nostartfiles -nodefaultlibs -Wl,-Bstatic,-T,../vortex_link.ld -march=rv32imv -mabi=ilp32
|
CC_FLAGS = -ffreestanding -O0 -Wl,--gc-sections -nostartfiles -nostdlib -nostartfiles -nodefaultlibs -Wl,-Bstatic,-T,../vortex_link.ld -march=rv32imv -mabi=ilp32
|
||||||
|
|
||||||
#DMP = /home/fares/dev/riscv-gnu-toolchain-vector/drops/bin/riscv32-unknown-elf-objdump
|
DMP = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objdump
|
||||||
#CPY = /home/fares/dev/riscv-gnu-toolchain-vector/drops/bin/riscv32-unknown-elf-objcopy
|
CPY = $(RISCV_TOOL_PATH)/bin/riscv32-unknown-elf-objcopy
|
||||||
DMP = /home/priya/dev/riscv_vec/riscv-gnu/bin/riscv32-unknown-elf-objdump
|
|
||||||
CPY = /home/priya/dev/riscv_vec/riscv-gnu/bin/riscv32-unknown-elf-objcopy
|
|
||||||
|
|
||||||
|
|
||||||
# VX_STR = ../../startup/vx_start.s
|
# VX_STR = ../../startup/vx_start.s
|
||||||
@@ -21,8 +21,7 @@ VX_API = ../../vx_api/vx_api.c
|
|||||||
VX_TEST = ../../tests/tests.c
|
VX_TEST = ../../tests/tests.c
|
||||||
VX_FIO = ../../fileio/fileio.s
|
VX_FIO = ../../fileio/fileio.s
|
||||||
VX_VEC = vx_vec.s
|
VX_VEC = vx_vec.s
|
||||||
#LIBS = /home/fares/dev/riscv-gnu-toolchain-vector/drops/riscv32-unknown-elf/lib/libc.a /home/fares/dev/riscv-gnu-toolchain-vector/drops/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
LIBS = $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libc.a $(RISCV_TOOL_PATH)/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
||||||
LIBS = /home/priya/dev/riscv_vec/riscv-gnu/riscv32-unknown-elf/lib/libc.a /home/priya/dev/riscv_vec/riscv-gnu/riscv32-unknown-elf/lib/libstdc++.a -static-libgcc -lgcc
|
|
||||||
|
|
||||||
VX_MAIN = vx_vector_main
|
VX_MAIN = vx_vector_main
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user