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