From a2260f074ce6fb485ee18b05ebf58725ffb6a806 Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Thu, 7 Apr 2022 19:57:38 -0700 Subject: Better build output --- Common.mk | 33 +++++++++++++++++++-------------- usr/main.c | 12 ++++++------ 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Common.mk b/Common.mk index 8cdddbb..50d2429 100644 --- a/Common.mk +++ b/Common.mk @@ -94,46 +94,52 @@ build/kernel7.img: CFLAGS := $(filter-out -g,$(CFLAGS)) build/kernel7.img: AFLAGS := $(filter-out -g,$(AFLAGS)) build/kernel7.img: build/kernel.elf @mkdir -p $(@D) - ${OBJCOPY} $< -O binary $@ + @echo "IMAGE BUILD $@" + @${OBJCOPY} $< -O binary $@ build/kernel.list: build/kernel.elf @mkdir -p $(@D) - ${OBJDUMP} -D $< > $@ + @echo "IMAGE LIST $@" + @${OBJDUMP} -D $< > $@ dump: build/kernel.list build/kernel.elf: ${A_OBJECTD} ${CXX_OBJECTD} ${C_OBJECTD} - @tput setaf 6 2> /dev/null || true; echo Linking Kernel; tput sgr0 2> /dev/null || true @mkdir -p $(@D) - @echo ${C_SOURCEK} - ${CC} -T linker.ld -o $@ -ffreestanding -O3 -nostdlib $^ + @echo "IMAGE LD $@" + @${CC} -T linker.ld -o $@ -ffreestanding -O3 -nostdlib $^ obj/kernel/%.co: kernel/%.c @mkdir -p $(@D) - ${CC} ${CFLAGS} -c $< -o $@ + @echo "KERNEL CC $@" + @${CC} ${CFLAGS} -c $< -o $@ obj/kernel/%.ao: kernel/%.S @mkdir -p $(@D) - ${AS} ${AFLAGS} -c $< -o $@ + @echo "KERNEL AS $@" + @${AS} ${AFLAGS} -c $< -o $@ obj/usr/%.co: usr/%.c @mkdir -p $(@D) - ${CC} ${CFLAGS} -c $< -o $@ + @echo "USER CC $@" + @${CC} ${CFLAGS} -c $< -o $@ obj/usr/%.cppo: usr/%.cpp @mkdir -p $(@D) - ${CCPP} ${CXXFLAGS} -c $< -o $@ + @echo "USER CPP $@" + @${CCPP} ${CXXFLAGS} -c $< -o $@ obj/usr/%.ao: usr/%.S @mkdir -p $(@D) - ${AS} ${AFLAGS} -c $< -o $@ + @echo "USER AS $@" + @${AS} ${AFLAGS} -c $< -o $@ run: build/kernel.elf - @tput setaf 6 2> /dev/null || true; echo Starting QEMU; tput sgr0 2> /dev/null || true + @tput setaf 6 2> /dev/null || true; echo RUNNING IN QEMU; tput sgr0 2> /dev/null || true @${QEMU} -kernel $< ${QFLAGS} debug: build/kernel.list - @tput setaf 6 2> /dev/null || true; echo Starting GDB; tput sgr0 2> /dev/null || true + @tput setaf 6 2> /dev/null || true; echo STARTING GDB; tput sgr0 2> /dev/null || true @${GDB} $< -command=gdbinit sd.hda: @@ -143,8 +149,7 @@ sd.hda: disk: sd.hda clean: - @tput setaf 6 2> /dev/null || true; echo Clearing Build; tput sgr0 2> /dev/null || true - rm -rf obj/* build/* + @-rm -r obj/* build/* tree: @tree -a -I obj\|build\|.git\|.gitignore diff --git a/usr/main.c b/usr/main.c index 2b2c97b..b8b57e5 100644 --- a/usr/main.c +++ b/usr/main.c @@ -11,12 +11,12 @@ #include // IRQ Information Structures -static struct SysTimerInfo stime_0 = { .tick_rate = 5000000, .priority = 0, .arg = 0, .oneshot = 0, }; -static struct SysTimerInfo stime_1 = { .tick_rate = 700000, .priority = 0, .arg = 0, .oneshot = 0, }; -static struct SysTimerInfo stime_2 = { .tick_rate = 300000, .priority = 0, .arg = 0, .oneshot = 0, }; -static struct SysTimerInfo stime_3 = { .tick_rate = 10, .priority = 0, .arg = 0, .oneshot = 0, }; -static struct UartInfo UART_INFO = { .priority = 2, }; -static struct GPIOInfo gpinfo = { .pin = (1<<16 | 1<<12), .priority = 0, }; +// static struct SysTimerInfo stime_0 = { .tick_rate = 5000000, .priority = 0, .arg = 0, .oneshot = 0, }; +// static struct SysTimerInfo stime_1 = { .tick_rate = 700000, .priority = 0, .arg = 0, .oneshot = 0, }; +// static struct SysTimerInfo stime_2 = { .tick_rate = 300000, .priority = 0, .arg = 0, .oneshot = 0, }; +// static struct SysTimerInfo stime_3 = { .tick_rate = 10, .priority = 0, .arg = 0, .oneshot = 0, }; +// static struct UartInfo UART_INFO = { .priority = 2, }; +// static struct GPIOInfo gpinfo = { .pin = (1<<16 | 1<<12), .priority = 0, }; void main(void) { -- cgit v1.2.1