From cd2b15ef6a31fc02674407582321352a080561ee Mon Sep 17 00:00:00 2001 From: isometimes Date: Mon, 18 Oct 2021 10:31:02 +0100 Subject: [PATCH] Fixed part14's Makefile.gcc after testing and made some required changes to the codebase --- part14-ethernet/Makefile.gcc | 2 +- part14-ethernet/lib/spi.c | 2 ++ part14-ethernet/net/enc28j60.c | 2 +- part14-ethernet/net/enc28j60.h | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/part14-ethernet/Makefile.gcc b/part14-ethernet/Makefile.gcc index 3aa7670..674751a 100644 --- a/part14-ethernet/Makefile.gcc +++ b/part14-ethernet/Makefile.gcc @@ -1,7 +1,7 @@ CFILES = $(wildcard *.c lib/*.c kernel/*.c net/*.c) SFILES = $(wildcard boot/*.S lib/*.S kernel/*.S) OFILES = $(CFILES:.c=.o) $(SFILES:.S=.o) -GCCFLAGS = -Wall -O2 -ffreestanding -nostdinc -nostdlib -nostartfiles +GCCFLAGS = -Wall -O2 -ffreestanding -nostdlib -nostartfiles GCCPATH = ../../gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin all: clean kernel8.img diff --git a/part14-ethernet/lib/spi.c b/part14-ethernet/lib/spi.c index cf1cdf0..c6b0bd5 100644 --- a/part14-ethernet/lib/spi.c +++ b/part14-ethernet/lib/spi.c @@ -1,4 +1,5 @@ #include "../include/io.h" +#include "../include/fb.h" // SPI @@ -83,6 +84,7 @@ void spi_send_recv(unsigned char *sbuffer, unsigned char *rbuffer, unsigned int while(!(REGS_SPI0->cs & CS_DONE)) { while(REGS_SPI0->cs & CS_RXD) { unsigned int r = REGS_SPI0->fifo; + debughex(r); } } diff --git a/part14-ethernet/net/enc28j60.c b/part14-ethernet/net/enc28j60.c index 8570ea2..52ba6a5 100644 --- a/part14-ethernet/net/enc28j60.c +++ b/part14-ethernet/net/enc28j60.c @@ -191,7 +191,7 @@ static void calibrate(void) * Software delay in µs * us: the number of µs to wait **/ -__inline void up_udelay(uint32_t us) +static __inline void up_udelay(uint32_t us) { volatile uint32_t i; diff --git a/part14-ethernet/net/enc28j60.h b/part14-ethernet/net/enc28j60.h index eaab987..7c378c0 100644 --- a/part14-ethernet/net/enc28j60.h +++ b/part14-ethernet/net/enc28j60.h @@ -811,6 +811,6 @@ void ENC_GetPkcnt(ENC_HandleTypeDef *handle); * ****************************************************************************/ -__inline void up_udelay(uint32_t us); +//__inline void up_udelay(uint32_t us); #endif /* ENC28J60_H_INCLUDED */