X-Git-Url: https://robinkrens.nl/gitweb/?a=blobdiff_plain;f=Makefile;h=6d3ec1935ecbc2ad192a7925281633febe5bc698;hb=47f52d56fac1acc9410a351dbf603c462bf3994c;hp=5cc5791dc34668307068b91de4ce69a1ffa62531;hpb=6e00544afe1ae83fcf51f262cfa744953dc8d023;p=cortex-from-scratch diff --git a/Makefile b/Makefile index 5cc5791..6d3ec19 100644 --- a/Makefile +++ b/Makefile @@ -10,25 +10,26 @@ AS=arm-none-eabi-as MKIMG=arm-none-eabi-objcopy # Compiler flags -# TODO:Cortex-m3 or Cortex-m0? 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 +_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 = uart.o tm1637.o led.o +_DRIVERS = uart.o tm1637.o led.o tsensor.o at24c.o mk450_joystick.o st7735s.o DRIVERS = $(patsubst %, $(DDIR)/%,$(_DRIVERS)) LDIR = obj/lib -_LIBS = string.o stdio.o regfunc.o pool.o +_LIBS = string.o stdio.o regfunc.o pool.o tinyprintf.o syscall.o LIBS = $(patsubst %, $(LDIR)/%,$(_LIBS)) $(DDIR)/%.o: drivers/%.c @@ -57,7 +58,7 @@ kernel: $(OBJ) $(DRIVERS) $(LIBS) # 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: