further ivt and isr implementation
[cortex-from-scratch] / Makefile
index 58ae9ac..c4803b9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ AR=$(TOOLROOT)/arm-none-eabi-ar
 AS=arm-none-eabi-as
 MKIMG=arm-none-eabi-objcopy
 
-LDFLAGS+= -mthumb -mcpu=cortex-m3 
+LDFLAGS+= -mthumb -mcpu=cortex-m0 
 CFLAGS+= -mcpu=cortex-m3 -mthumb -g 
 
 as: 
@@ -15,11 +15,16 @@ all:
        $(CC) $(CFLAGS) -c -I./include -ffreestanding -o main.o main.c
        $(CC) $(CFLAGS) -c -I./include -ffreestanding -o uart.o uart.c
        $(CC) $(CFLAGS) -c -I./include -ffreestanding -o ivt.o ivt.c 
-       $(LD) -nostartfiles -T link.ld -o start.out start.o main.o uart.o ivt.o
+       $(CC) $(CFLAGS) -c -I./include -ffreestanding -o systick.o systick.c 
+       $(CC) $(CFLAGS) -c -I./include -ffreestanding -o sysinfo.o sysinfo.c 
+       $(CC) $(CFLAGS) -c -I./include -ffreestanding -o lib.o lib.c 
+       $(CC) $(CFLAGS) -c -I./include -ffreestanding -o mm.o mm.c 
+       $(CC) $(CFLAGS) -c -I./include -ffreestanding -o regf.o regf.c 
+       $(LD) -nostartfiles -T link.ld -o start.out start.o main.o uart.o ivt.o systick.o sysinfo.o lib.o mm.o regf.o
        $(MKIMG) -Obinary -R .data start.out kernel.bin
 
 run:
-       qemu-system-arm -serial stdio  -M lm3s6965evb -kernel kernel.bin
+       /usr/local/bin/qemu-system-arm -serial stdio  -M stm32-f103c8 -kernel kernel.bin
 
 examine:
        arm-none-eabi-objdump -S start.out