aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-11-12 17:56:10 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-11-12 17:56:10 +0100
commit533976feb8ea79c15fa905642d75adb58a0e6996 (patch)
tree11d5b9b56754e3457256d23c25535d19fc0402e1 /Makefile
parent30b44ef0b1177d13dd4f58c47979e7a6e598d81a (diff)
downloadrpi-MMU-example-533976feb8ea79c15fa905642d75adb58a0e6996.tar.gz
rpi-MMU-example-533976feb8ea79c15fa905642d75adb58a0e6996.zip
TEST CODE: prepare for switching to PL0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index bb8d06e..6f2600e 100644
--- a/Makefile
+++ b/Makefile
@@ -7,13 +7,25 @@ all : kernel7.img
kernel.o : kernel.c
arm-none-eabi-gcc $(CFLAGS) -c $^ -o $@
+PL0_test.o : PL0_test.c
+ arm-none-eabi-gcc $(CFLAGS) -c $^ -o $@
+
+PL_0_test.elf : PL0_test.o uart.o
+ arm-none-eabi-gcc -T PL0_test.ld -o $@ $(ELFFLAGS) $^
+
+PL_0_test.img : PL_0_test.elf
+ arm-none-eabi-objcopy $^ -O binary $@
+
+PL_0_test_embeddable.o : PL_0_test.img
+ arm-none-eabi-objcopy -I binary -O elf32-littlearm -B arm --rename-section .data=.rodata $^ $@
+
uart.o : uart.c
arm-none-eabi-gcc $(CFLAGS) -c $^ -o $@
boot.o : boot.S
arm-none-eabi-as -mcpu=cortex-a7 $^ -o $@
-kernel.elf : boot.o kernel.o uart.o
+kernel.elf : boot.o kernel.o uart.o PL0_test.o PL_0_test_embeddable.o
arm-none-eabi-gcc -T linker.ld -o $@ $(ELFFLAGS) $^
kernel7.img : kernel.elf