From bff735a698a81067ad6a69ae520f3c93a5cec770 Mon Sep 17 00:00:00 2001 From: vetch Date: Tue, 12 Nov 2019 17:45:03 +0100 Subject: finalize Makefile for writing to rpi --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Makefile') 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 $@ -- cgit v1.2.3