forked from Firmware/Firmwares
adds some consistency fixes for variable ISA settings
This commit is contained in:
@ -18,19 +18,19 @@
|
||||
ISA?=imc
|
||||
RISCV_ARCH:=rv32$(ISA)
|
||||
RISCV_ABI:=ilp32
|
||||
|
||||
TRIPLET?=riscv64-unknown-elf
|
||||
# Flag : OUTFLAG
|
||||
# Use this flag to define how to to get an executable (e.g -o)
|
||||
OUTFLAG= -o
|
||||
# Flag : CC
|
||||
# Use this flag to define compiler to use
|
||||
CC = riscv32-unknown-elf-gcc
|
||||
CC = $(TRIPLET)-gcc
|
||||
# Flag : LD
|
||||
# Use this flag to define compiler to use
|
||||
LD = riscv32-unknown-elf-gcc
|
||||
LD = $(TRIPLET)-gcc
|
||||
# Flag : AS
|
||||
# Use this flag to define compiler to use
|
||||
AS = riscv32-unknown-elf-as
|
||||
AS = $(TRIPLET)-as
|
||||
# Flag : CFLAGS
|
||||
# Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags"
|
||||
PORT_CFLAGS = -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -O3 -DCLOCKS_PER_SEC=10000000 -nostdlib -nostartfiles -nodefaultlibs \
|
||||
@ -44,7 +44,7 @@ SEPARATE_COMPILE=1
|
||||
# Flag : SEPARATE_COMPILE
|
||||
# You must also define below how to create an object file, and how to link.
|
||||
OBJOUT = -o
|
||||
LFLAGS =
|
||||
LFLAGS = -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI)
|
||||
#--specs=nano.specs -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI)
|
||||
ASFLAGS =
|
||||
OFLAG = -o
|
||||
|
@ -20,6 +20,5 @@ LDFLAGS := -g -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -mcmodel=medlow -Wl,--wrap
|
||||
|
||||
TOOL_DIR=$(dir $(compiler))
|
||||
|
||||
TRIPLET=riscv32-unknown-elf
|
||||
BSP_BASE = ../../bare-metal-bsp
|
||||
include $(BSP_BASE)/env/common-gcc.mk
|
||||
|
@ -16,7 +16,7 @@ void __wrap_scanf(const char* fmt, int* n)
|
||||
|
||||
extern volatile uint32_t tohost;
|
||||
|
||||
void __wrap_exit(int n){
|
||||
void exit(int n){
|
||||
tohost = 0x1;
|
||||
for (;;);
|
||||
}
|
||||
|
Reference in New Issue
Block a user