cleanup
This commit is contained in:
parent
8eb69bb16e
commit
5ad7268c5f
|
@ -1,15 +1,35 @@
|
||||||
(define memories '(
|
(define memories '(
|
||||||
(memory LowCode
|
(memory HighRAM
|
||||||
(address (#x008000 . #x00FFFF))
|
(address (#x010000 . #x017FFF))
|
||||||
(section code)
|
(section farcode)
|
||||||
(section cdata)
|
(section fardata)
|
||||||
(section idata)
|
(section far)
|
||||||
(section inear)
|
(section cfar)
|
||||||
(section switch)
|
(section chuge)
|
||||||
(section data_init_table)
|
(section data_init_table)
|
||||||
|
(section switch)
|
||||||
|
(section itiny)
|
||||||
|
(section inear)
|
||||||
|
(section ifar)
|
||||||
|
(section ihuge)
|
||||||
|
(type ram)
|
||||||
|
)
|
||||||
|
|
||||||
|
(memory HighBSS
|
||||||
|
(address (#x018000 . #x01FFFF))
|
||||||
|
(section heap)
|
||||||
|
(section huge)
|
||||||
|
(section zhuge)
|
||||||
|
(section zfar)
|
||||||
|
(type ram)
|
||||||
|
)
|
||||||
|
|
||||||
|
(memory MidRAM
|
||||||
|
(address (#x00E000 . #x00FFFF))
|
||||||
|
(section code)
|
||||||
|
(section cnear)
|
||||||
(section reset)
|
(section reset)
|
||||||
(section (boot #x008000))
|
(type ram)
|
||||||
(type rom)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
(memory IOSpace
|
(memory IOSpace
|
||||||
|
@ -17,13 +37,11 @@
|
||||||
(section (VERAIOPort #x00DF00))
|
(section (VERAIOPort #x00DF00))
|
||||||
)
|
)
|
||||||
|
|
||||||
(memory LowData
|
(memory LowRAM
|
||||||
(address (#x001000 . #x007FFF))
|
(address (#x001000 . #x00DEFF))
|
||||||
(section near)
|
(section znear)
|
||||||
(section data)
|
(section near)
|
||||||
(section znear)
|
(type ram)
|
||||||
(section zdata)
|
|
||||||
(section heap)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
(memory stack
|
(memory stack
|
||||||
|
@ -48,5 +66,5 @@
|
||||||
|
|
||||||
(base-address _DirectPageStart DirectPage 0)
|
(base-address _DirectPageStart DirectPage 0)
|
||||||
|
|
||||||
(base-address _NearBaseAddress LowData 0)
|
(base-address _NearBaseAddress LowRAM 0)
|
||||||
))
|
))
|
||||||
|
|
|
@ -11,15 +11,15 @@ MEMORY_MAP := config/memory.scm
|
||||||
|
|
||||||
CFLAGS := --include-system=include/libc \
|
CFLAGS := --include-system=include/libc \
|
||||||
-I include \
|
-I include \
|
||||||
--code-model=small \
|
--code-model=large \
|
||||||
--data-model=small \
|
--data-model=huge \
|
||||||
--64bit-doubles \
|
--64bit-doubles \
|
||||||
--strong-inline \
|
--strong-inline \
|
||||||
--force-switch jump-table
|
--force-switch jump-table
|
||||||
|
|
||||||
ASFLAGS := -I include \
|
ASFLAGS := -I include \
|
||||||
--code-model=small \
|
--code-model=large \
|
||||||
--data-model=small
|
--data-model=huge
|
||||||
|
|
||||||
ifeq ($(RELEASE), "true")
|
ifeq ($(RELEASE), "true")
|
||||||
CFLAGS += -DNDEBUG \
|
CFLAGS += -DNDEBUG \
|
||||||
|
@ -40,14 +40,6 @@ CFLAGS += --debug \
|
||||||
ASFLAGS += --debug
|
ASFLAGS += --debug
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LDFLAGS := $(MEMORY_MAP) \
|
|
||||||
--list-file build.lst \
|
|
||||||
--rom-code \
|
|
||||||
--output-format raw \
|
|
||||||
--raw-multiple-memories \
|
|
||||||
--verbose \
|
|
||||||
--cstartup=sentinel65x
|
|
||||||
|
|
||||||
ifeq ($(ENABLE_RELEASE_BUILD), "true")
|
ifeq ($(ENABLE_RELEASE_BUILD), "true")
|
||||||
CFLAGS += -DRELEASE_BUILD
|
CFLAGS += -DRELEASE_BUILD
|
||||||
CFLAGS += -DNDEBUG
|
CFLAGS += -DNDEBUG
|
||||||
|
@ -57,6 +49,12 @@ endif
|
||||||
|
|
||||||
LIBS := build/libc.a
|
LIBS := build/libc.a
|
||||||
|
|
||||||
|
LDFLAGS := $(MEMORY_MAP) \
|
||||||
|
--rtattr cstartup=sentinel65x \
|
||||||
|
--list-file build.lst \
|
||||||
|
--verbose \
|
||||||
|
--output-format pgz
|
||||||
|
|
||||||
KERNEL_SRC_C := $(wildcard src/*.c) \
|
KERNEL_SRC_C := $(wildcard src/*.c) \
|
||||||
$(wildcard src/*/*.c) \
|
$(wildcard src/*/*.c) \
|
||||||
$(wildcard src/*/*/*.c) \
|
$(wildcard src/*/*/*.c) \
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: build/sentinel-kernel.bin
|
all: build/kernel.pgz
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
@ -7,6 +7,7 @@ clean:
|
||||||
-name '*.pgz' -o \
|
-name '*.pgz' -o \
|
||||||
-name '*.bin' -o \
|
-name '*.bin' -o \
|
||||||
-name '*.elf' -o \
|
-name '*.elf' -o \
|
||||||
|
-name '*.raw' -o \
|
||||||
-name '*.a' \
|
-name '*.a' \
|
||||||
\) -delete
|
\) -delete
|
||||||
@find src -type f \( \
|
@find src -type f \( \
|
||||||
|
@ -29,10 +30,8 @@ clean:
|
||||||
@printf '%s' "$(dir $@)" > $@
|
@printf '%s' "$(dir $@)" > $@
|
||||||
@$(CC) $(CFLAGS) --dependencies $< >> $@
|
@$(CC) $(CFLAGS) --dependencies $< >> $@
|
||||||
|
|
||||||
build/sentinel-kernel.bin: $(KERNEL_OBJ)
|
build/kernel.pgz: $(KERNEL_OBJ)
|
||||||
@echo "Linking $@..."
|
@echo "Linking $@..."
|
||||||
# @$(AR) $@ $^
|
@$(LD) $(LDFLAGS) -o $@ $^
|
||||||
$(LD) $(LDFLAGS) -o $@ $^
|
|
||||||
@rm -f $@
|
|
||||||
@mv build/sentinel-kernel.raw $@
|
|
||||||
-include $(KERNEL_DEP)
|
-include $(KERNEL_DEP)
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -43,12 +43,10 @@ __program_root_section:
|
||||||
;;; ***************************************************************************
|
;;; ***************************************************************************
|
||||||
|
|
||||||
#ifdef __CALYPSI_CODE_MODEL_COMPACT__
|
#ifdef __CALYPSI_CODE_MODEL_COMPACT__
|
||||||
.section boot
|
.section code
|
||||||
#else
|
#else
|
||||||
.section boot, noreorder
|
.section code, noreorder
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
.asciz "WDC"
|
|
||||||
.pubweak __program_start
|
.pubweak __program_start
|
||||||
__program_start:
|
__program_start:
|
||||||
clc
|
clc
|
||||||
|
|
Loading…
Reference in New Issue