📄 build.mkf
字号:
ifneq ($(STB7109ROOT),)
PLATFORM=mb411stb7109
else
PLATFORM=mb411
endif
RUNTIME=os21
#
# The bootvector code is linked at 0xa0000000 but is position independent.
#
BOOTVECTORLD=sh4ld
BOOTVECTORLDFLAGS=-e 0xa0000000 --defsym _stack=0 --defsym _start=0xa0000000
BOOTVECTORLDBUILD=$(BOOTVECTORLD) $(BOOTVECTORLDFLAGS) -o $@
#
# The bootstrap code is position independent due to being linked as a shared
# library (hence it contains relocations)
#
BOOTSTRAPLD=sh4ld
BOOTSTRAPLDFLAGS=-T bootstrap.ld -Bshareable -Bsymbolic -z defs
BOOTSTRAPLDBUILD=$(BOOTSTRAPLD) $(BOOTSTRAPLDFLAGS) -o $@
ASUSERFLAGS+=-Iinclude
CCUSERFLAGS+=-Iinclude -Izlib -DFLASHERPLATFORM=$(PLATFORM) -DNO_MEMCPY
ZLIBOBJECTS=\
zlib/adler32.po\
zlib/crc32.po\
zlib/uncompr.po\
zlib/trees.po\
zlib/zutil.po\
zlib/inflate.po\
zlib/infback.po\
zlib/inftrees.po\
zlib/inffast.po
FLASHEROBJECTS=flasher.o flashutil.o flashvmem.o
BOOTVECTOROBJECTS=bootvector.po
BOOTSTRAPOBJECTS=bootstrap.po memory_$(PLATFORM).po $(ZLIBOBJECTS)
COMMONOUTFILES=bootvector.out bootstrap.out
OBJECTS=$(FLASHEROBJECTS)\
$(BOOTVECTOROBJECTS)\
$(BOOTSTRAPOBJECTS)\
EXES=flasher.out
CLEAN=\
$(EXES)\
bootvector.img\
bootstrap.img\
testapp.img\
testapp.bin\
$(OBJECTS)\
$(COMMONOUTFILES)\
memory_*.po
MKIMAGE=perl -w mkimage.pl
MKBINROM=perl -w mkbinrom.pl
build: $(EXES) boot rom
flasher.out: $(FLASHEROBJECTS)
$(LDBUILD) $(FLASHEROBJECTS)
boot: bootvector.img bootstrap.img
rom: testapp.bin
bootvector.img: bootvector.out
$(MKIMAGE) -o $@ -e bootvector.out -c 0 -p pic
bootvector.out: $(BOOTVECTOROBJECTS)
$(BOOTVECTORLDBUILD) $(BOOTVECTOROBJECTS)
bootstrap.img: bootstrap.out
$(MKIMAGE) -o $@ -e bootstrap.out -c 0 -p pic
bootstrap.out: $(BOOTSTRAPOBJECTS)
$(BOOTSTRAPLDBUILD) $(BOOTSTRAPOBJECTS)
testapp.img: testapp.exe
$(MKIMAGE) -o $@ -e testapp.exe -c 0 -p deflate
testapp.bin: testapp.img
$(MKBINROM) -o $@ -v bootvector.img -s bootstrap.img -i testapp.img
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -