aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorvetch <vetch97@gmail.com>2019-11-12 17:45:03 +0100
committervetch <vetch97@gmail.com>2019-11-12 17:45:03 +0100
commitbff735a698a81067ad6a69ae520f3c93a5cec770 (patch)
tree7b6eca80da44cac337343838acaf3a2307fad4f0 /Makefile
parentfd7c31aacae16695cb612772c1c279273122e541 (diff)
downloadrpi-MMU-example-bff735a698a81067ad6a69ae520f3c93a5cec770.tar.gz
rpi-MMU-example-bff735a698a81067ad6a69ae520f3c93a5cec770.zip
finalize Makefile for writing to rpi
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index bb8d06e..d6e8885 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
CFLAGS=-mcpu=cortex-a7 -ffreestanding -std=gnu11 -Wall -Wextra -I.
-
ELFFLAGS=-ffreestanding -O2 -nostdlib -lgcc -I.
+
all : kernel7.img
kernel.o : kernel.c
@@ -10,6 +10,9 @@ kernel.o : kernel.c
uart.o : uart.c
arm-none-eabi-gcc $(CFLAGS) -c $^ -o $@
+interrupts.o : interrupts.c uart.o
+ arm-none-eabi-gcc $(CFLAGS) -c $^ -o $@
+
boot.o : boot.S
arm-none-eabi-as -mcpu=cortex-a7 $^ -o $@
@@ -48,9 +51,8 @@ qemu-bin : loader.elf kernel7.img pipe_image
./pipe_image --stdout | qemu-system-arm -m 256 -M raspi2 -serial stdio -kernel $<
run-on-rpi : kernel7.img pipe_image
- ./pipe_image --stdout | socat FILE:/dev/ttyUSB0,b115200,raw -
- sleep 1
- screen /dev/ttyUSB0 115200,cs8,-parenb,-cstopb,-hupcl
+ ./pipe_image --stdout | sudo socat FILE:/dev/ttyUSB0,b115200,raw -
+# screen /dev/ttyUSB0 115200,cs8,-parenb,-cstopb,-hupcl
pipe_image : pipe_image.c lib/rs232/rs232.c
gcc -Wall -std=gnu99 -O3 $^ -o $@