Commit 7633e546 authored by Mathieu Maret's avatar Mathieu Maret

Add some way to test kernel

parent cb65400d
......@@ -6,7 +6,7 @@ LDFLAGS += -g -m32 -nostdlib -static -fno-common -fno-use-cxa-atexit -fno-except
CFLAGS += -g -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-pie -fno-stack-protector
CXXFLAGS += -g -m32 -Wall -Wextra -Werror -ffreestanding -fno-exceptions -fno-rtti -fno-pie
SUBDIRS := core drivers
SUBDIRS := core drivers tests
CPPFLAGS += $(foreach dir, $(SUBDIRS), -I$(dir))
......@@ -37,6 +37,10 @@ core/irq_handler.o:core/irq_handler.c
%.o:%.asm
$(AS) $(ASFLAGS) -o $@ $<
self_test: CFLAGS += -DRUN_TEST
self_test: clean kernel
qemu-system-x86_64 -kernel kernel -serial stdio
test:kernel
qemu-system-x86_64 -kernel $<
......
#include "serial.h"
#include "vga.h"
void run_test(){
printf("Testing Serial");
serialWrite('h');
serialWrite('e');
serialWrite('l');
serialWrite('l');
serialWrite('o');
}
#pragma once
void run_test();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment