Kernel now builds as a calypsi .a library

This commit is contained in:
Kyle Cardoza 2024-03-28 00:45:44 -04:00
parent 01759c3d99
commit 1309396635
5 changed files with 9 additions and 1252 deletions

1244
build.lst

File diff suppressed because it is too large Load Diff

View File

@ -45,8 +45,7 @@ LDFLAGS := $(MEMORY_MAP) \
--no-data-init-table-section \
--rtattr cstartup=turaco \
--list-file build.lst \
--verbose \
--output-format pgz
--verbose
ifeq ($(ENABLE_RELEASE_BUILD), "true")
CFLAGS += -DRELEASE_BUILD

View File

@ -1,5 +1,5 @@
.PHONY: all
all: build/kernel.bin
all: build/kernel.a
.PHONY: clean
clean:
@ -7,14 +7,14 @@ clean:
-name '*.pgz' -o \
-name '*.bin' -o \
-name '*.elf' -o \
-name '*.a' -o \
-name '*.lst' \
-name '*.a' \
\) -delete
@find src -type f \( \
-name '*.o' -o \
-name '*.d' -o \
-name '$(TARGET)' \
\) -delete
@rm -f *.lst
%.o: %.c
@echo "Compiling $@..."
@ -29,8 +29,8 @@ clean:
@printf '%s' "$(dir $@)" > $@
@$(CC) $(CFLAGS) --dependencies $< >> $@
build/kernel.bin: $(KERNEL_OBJ)
build/kernel.a: $(KERNEL_OBJ)
@echo "Linking $@..."
@$(LD) -o $@ $(LDFLAGS) $^
@$(AR) $@ $^
-include $(KERNEL_DEP)

View File

@ -12,6 +12,8 @@ far void vera_init(void);
far uint8_t vera_peek(uint32_t addr);
far uint16_t vera_peek16(uint32_t addr);
far void vera_poke(uint32_t addr, uint8_t value);
far void vera_poke16(uint32_t addr, uint16_t value);

View File

@ -9,7 +9,7 @@
#include "drivers/vera.h"
void
main(void)
kernel_init(void)
{
vera_init();