mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Merge pull request #711 from DrDoof/fix/installer-toolchain
installer: build with the toolchain from the tree
This commit is contained in:
2 files changed
+16
-6
No files matched your search
@@ -177,9 +177,9 @@ example of compilation console output
|
|||||||
RTLPlayground/installer$ make
|
RTLPlayground/installer$ make
|
||||||
mkdir -p output
|
mkdir -p output
|
||||||
gcc updatebuilder.c -o output/updatebuilder
|
gcc updatebuilder.c -o output/updatebuilder
|
||||||
sdas8051 -plosgff -o output/crtstart.rel crtstart.asm
|
../toolchain/sdcc-3390765201/bin/sdas8051 -plosgff -o output/crtstart.rel crtstart.asm
|
||||||
sdcc -mmcs51 --code-loc 0x1000 -o output/installer.rel -c installer.c
|
../toolchain/sdcc-3390765201/bin/sdcc -mmcs51 --code-loc 0x1000 -o output/installer.rel -c installer.c
|
||||||
sdcc -mmcs51 -Wl-bHOME=0x1100 -Wl-r -o output/rtlinstaller.ihx output/crtstart.rel output/installer.rel
|
../toolchain/sdcc-3390765201/bin/sdcc -mmcs51 -Wl-bHOME=0x1100 -Wl-r -o output/rtlinstaller.ihx output/crtstart.rel output/installer.rel
|
||||||
./output/updatebuilder -i output/rtlinstaller.ihx -o output/rtlplayground_oem_upgrade.bin ../output/rtlplayground.bin
|
./output/updatebuilder -i output/rtlinstaller.ihx -o output/rtlplayground_oem_upgrade.bin ../output/rtlplayground.bin
|
||||||
Input file size: 524288
|
Input file size: 524288
|
||||||
Bytes read: 524288
|
Bytes read: 524288
|
||||||
|
|||||||
+13
-3
@@ -1,9 +1,14 @@
|
|||||||
CODE_LOCATION=0x1000
|
CODE_LOCATION=0x1000
|
||||||
INSTALLER_ADDRESS=0x1100
|
INSTALLER_ADDRESS=0x1100
|
||||||
|
|
||||||
CC = sdcc
|
SDCC_PREFIX = ../toolchain/sdcc-$(shell cat ../sdcc/* | cksum | cut -d' ' -f1)
|
||||||
|
ifeq ($(origin CC),default)
|
||||||
|
SDCC = $(SDCC_PREFIX)/bin/sdcc
|
||||||
|
CC = $(SDCC)
|
||||||
|
ASM = $(SDCC_PREFIX)/bin/sdas8051
|
||||||
|
endif
|
||||||
CC_FLAGS = -mmcs51
|
CC_FLAGS = -mmcs51
|
||||||
ASM = sdas8051
|
ASM ?= sdas8051
|
||||||
AFLAGS= -plosgff
|
AFLAGS= -plosgff
|
||||||
|
|
||||||
BUILDDIR = output
|
BUILDDIR = output
|
||||||
@@ -13,9 +18,14 @@ OBJS = ${SRCS:%.c=$(BUILDDIR)/%.rel}
|
|||||||
|
|
||||||
all: create_build_dir $(BUILDDIR)/updatebuilder $(BUILDDIR)/rtlplayground_oem_upgrade.bin
|
all: create_build_dir $(BUILDDIR)/updatebuilder $(BUILDDIR)/rtlplayground_oem_upgrade.bin
|
||||||
|
|
||||||
create_build_dir:
|
create_build_dir: $(SDCC)
|
||||||
mkdir -p $(BUILDDIR)
|
mkdir -p $(BUILDDIR)
|
||||||
|
|
||||||
|
ifneq ($(SDCC),)
|
||||||
|
$(SDCC):
|
||||||
|
sh ../sdcc/build.sh $(abspath $(SDCC_PREFIX))
|
||||||
|
endif
|
||||||
|
|
||||||
$(BUILDDIR)/updatebuilder: updatebuilder.c
|
$(BUILDDIR)/updatebuilder: updatebuilder.c
|
||||||
gcc $^ -o $@
|
gcc $^ -o $@
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user