# Compiler flags
LDFLAGS+= -mthumb -mcpu=cortex-m3
-ASFLAGS+= -mcpu=cortex-m3 -mthumb -g
-CFLAGS+= -mcpu=cortex-m3 -mthumb -g -ffreestanding
+ASFLAGS+= -mcpu=cortex-m3 -mthumb
+CFLAGS+= -mcpu=cortex-m3 -mthumb -ffreestanding
+#CFLAGS+= -mcpu=cortex-m3 -mthumb -g -ffreestanding
# Include directory
INCLUDE+= -Iinclude
BIN = bin
ODIR = obj
-_OBJ = ivt.o systick.o sysinfo.o term.o main.o clock.o rtc.o heap.o
+_OBJ = ivt.o systick.o sysinfo.o term.o main.o clock.o rtc.o heap.o syscall.o
OBJ = $(patsubst %, $(ODIR)/%,$(_OBJ))
DDIR = obj/drivers
DRIVERS = $(patsubst %, $(DDIR)/%,$(_DRIVERS))
LDIR = obj/lib
-_LIBS = string.o stdio.o regfunc.o pool.o tinyprintf.o
+_LIBS = string.o stdio.o regfunc.o pool.o tinyprintf.o syscall.o
LIBS = $(patsubst %, $(LDIR)/%,$(_LIBS))
$(DDIR)/%.o: drivers/%.c
# Run in Qemu; note this is a patched version for stm32-f103c8
run:
- /usr/local/bin/qemu-system-arm -serial stdio -M stm32-f103c8 -kernel $(BIN)/kernel.bin
+ /usr/local/bin/qemu-system-arm -monitor stdio -serial stdio -M stm32-f103c8 -kernel $(BIN)/kernel.bin
# Examine all sections
examine-all: