diff --git a/Firmware/RISCV/stubs/_exit.c b/Firmware/RISCV/stubs/_exit.c index 33467d0..daf6a97 100644 --- a/Firmware/RISCV/stubs/_exit.c +++ b/Firmware/RISCV/stubs/_exit.c @@ -4,7 +4,7 @@ #include "stub.h" - +#if 0 void _exit(int code) { const char message[] = "\nProgram has exited with code:"; @@ -15,3 +15,4 @@ void _exit(int code) for (;;); } +#endif diff --git a/Template/Makefile b/Template/Makefile index e483b72..c4c628f 100644 --- a/Template/Makefile +++ b/Template/Makefile @@ -13,7 +13,7 @@ TARGET = gd32vf103 # debug build? DEBUG = 1 # optimization -OPT = -O2 +OPT = -O2 #-flto # Build path BUILD_DIR = build @@ -103,7 +103,7 @@ LDSCRIPT = $(FIRMWARE_DIR)/RISCV/env_Eclipse/GD32VF103x8.lds # libraries #LIBS = -lc_nano -lm LIBDIR = -LDFLAGS = -flto $(ARCH) -T$(LDSCRIPT) $(LIBDIR) $(LIBS) $(PERIFLIB_SOURCES) -Wl,--cref -Wl,--no-relax -Wl,--gc-sections -Wl,-M=$(BUILD_DIR)/$(TARGET).map -nostartfiles #-ffreestanding -nostdlib +LDFLAGS = $(OPT) $(ARCH) -T$(LDSCRIPT) $(LIBDIR) $(LIBS) $(PERIFLIB_SOURCES) -Wl,--cref -Wl,--no-relax -Wl,--gc-sections -Wl,-M=$(BUILD_DIR)/$(TARGET).map -nostartfiles #-ffreestanding -nostdlib # default action: build all all: $(BUILD_DIR)/$(TARGET).elf $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin